-
Notifications
You must be signed in to change notification settings - Fork 274
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
feat(k8s): custom annotations for builder pods #3365
Conversation
Allow specifying custom annotations for garden- managed pods when using in-cluster building with buildkit or kaniko. This is useful when users want to alter how certain components, like the cluster-autoscaler treat these pods. Fixes #2628
@Orzelius I have no clue why the circleci tests did not run on this PR 🤔 |
it("should return a Kubernetes Deployment manifest for buildkit in-cluster-builder", () => { | ||
const result = getBuildkitDeployment(provider, "authSecretName", [{ name: "imagePullSecretName" }]) | ||
expect(result.kind).eql("Deployment") | ||
expect(result.metadata).eql({ |
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.
I split this into separate expect()
s because otherwise the diffs would be useless because of https://stackoverflow.com/questions/70962366/with-mocha-chai-how-can-i-make-it-show-lines-skipped
c0b9d14
to
51b5b18
Compare
core/test/unit/src/plugins/kubernetes/container/build/kaniko.ts
Outdated
Show resolved
Hide resolved
51b5b18
to
f6cab9e
Compare
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.
Left a few comments. Good job on the tests!
util: joi.object().keys({ | ||
tolerations: joiSparseArray(tolerationSchema()).description( | ||
"Specify tolerations to apply to each garden-util Pod." | ||
"Specify tolerations to apply to the garden-util Pod." |
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.
I think should stay as "each" or even maybe
"Specify tolerations to apply to the garden-util Pod." | |
"Specify tolerations to apply to garden-util pods." |
There's a garden-util
pod per garden managed kubernetes namespace so its technically not a singular "the pod"
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.
Hm, per namespace there is only one; if I run garden deploy it will only change it in one namespace, right? That's why I preferred the signular.
But I am ok with changing it to the plural, changed it in the latest commit 👍
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.
if I run garden deploy it will only change it in one namespace, right?
yes, but if you change the project config it will change for everyone resulting in changes in all namespaces
When passing manifests with undefined values to compareDeployedResources, it would that the to-be-deployed manifest is not a superset of the deployed manifest, even though undefined values are treated the same as non-existing values. This commit fixes that bug.
da59386
to
07d0b47
Compare
What this PR does / why we need it:
Allow specifying custom annotations for garden-
managed pods when using in-cluster building with
buildkit or kaniko.
This is useful when users want to alter how certain
components, like the cluster-autoscaler treat these
pods.
Which issue(s) this PR fixes:
Fixes #2628
Special notes for your reviewer: