-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Port rate limiter to experimental charts #4478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
a3ee606
8958d25
238b852
1f10ac8
2d42309
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| suite: "Controller Deployment rate limiter" | ||
| templates: | ||
| - deployment.yaml | ||
| tests: | ||
| - it: should omit workqueue-rate-limiter flag by default | ||
| release: | ||
| name: "test-arc" | ||
| namespace: "test-ns" | ||
| asserts: | ||
| - notContains: | ||
| path: spec.template.spec.containers[0].args | ||
| content: "--workqueue-rate-limiter=bucket_rate_limiter" | ||
| - notContains: | ||
| path: spec.template.spec.containers[0].args | ||
| content: "--workqueue-rate-limiter=typed_rate_limiter" | ||
|
|
||
| - it: should include workqueue-rate-limiter flag when bucket_rate_limiter is configured | ||
| set: | ||
| controller: | ||
| manager: | ||
| config: | ||
| rateLimiter: | ||
| name: "bucket_rate_limiter" | ||
| release: | ||
| name: "test-arc" | ||
| namespace: "test-ns" | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].args | ||
| content: "--workqueue-rate-limiter=bucket_rate_limiter" | ||
|
|
||
| - it: should include workqueue-rate-limiter flag when typed_rate_limiter is configured | ||
| set: | ||
| controller: | ||
| manager: | ||
| config: | ||
| rateLimiter: | ||
| name: "typed_rate_limiter" | ||
| release: | ||
| name: "test-arc" | ||
| namespace: "test-ns" | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].args | ||
| content: "--workqueue-rate-limiter=typed_rate_limiter" | ||
|
|
||
| - it: should render both config and extraArgs in deterministic order | ||
| set: | ||
| controller: | ||
| manager: | ||
| config: | ||
| rateLimiter: | ||
| name: "bucket_rate_limiter" | ||
| container: | ||
| extraArgs: | ||
| - "--workqueue-rate-limiter=typed_rate_limiter" | ||
| release: | ||
| name: "test-arc" | ||
| namespace: "test-ns" | ||
| asserts: | ||
| - contains: | ||
| path: spec.template.spec.containers[0].args | ||
| content: "--workqueue-rate-limiter=bucket_rate_limiter" | ||
| - contains: | ||
| path: spec.template.spec.containers[0].args | ||
| content: "--workqueue-rate-limiter=typed_rate_limiter" | ||
|
Comment on lines
+47
to
+66
|
||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default-case test only asserts the args list does not contain the two specific values. This would still pass if the chart accidentally rendered something like
--workqueue-rate-limiter=(or a future third value). To actually verify the flag is omitted by default, assert that no arg contains the--workqueue-rate-limiter=prefix (e.g., via a singlenotContainson the prefix or a regex-based assertion, depending on helm-unittest capabilities).