Skip to content

Conversation

@alpeb
Copy link
Member

@alpeb alpeb commented Nov 12, 2024

This adds the status stanza to the HTTPLocalRateLimitPolicy CRD, and implements its handling in the policy status controller.

For the controller to accept an HTTPLocalRateLimitPolicy CR it checks that:

  • The targetRef is an existing Server
  • If there are multiple HTTPLocalRateLimitPolicy CRs pointing to the same server, only accept the oldest one, or if created at the same time, the first in alphabetical order (that logic was moved from the inbound indexer to the status controller).

6cd7dc2: Update RL CRD and RBAC to allow patching its status
69aee01: Update golden files
60f25b7: Implement status handling for HTTPLocalRateLimitPolicy CRD
fc99d3a: Update existing unit tests
0204acf: New unit tests

Examples

Not accepted CR:

...
status:
  conditions:
  - lastTransitionTime: "2024-11-12T23:10:05Z"
    message: ""
    reason: RateLimitReasonAlreadyExists
    status: "False"
    type: Accepted
  targetRef:
    group: policy.linkerd.io
    kind: Server
    name: web-http

Accepted CR:

...
status:
  conditions:
  - lastTransitionTime: "2024-11-12T23:10:05Z"
    message: ""
    reason: Accepted
    status: "True"
    type: Accepted
  targetRef:
    group: policy.linkerd.io
    kind: Server
    name: web-http

@alpeb alpeb requested a review from a team as a code owner November 12, 2024 23:23
@alpeb alpeb merged commit ce6c172 into main Nov 13, 2024
44 checks passed
@alpeb alpeb deleted the alpeb/ratelimit-status branch November 13, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants