-
Notifications
You must be signed in to change notification settings - Fork 155
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
Evictable pods & gentle label/annotation handling #13180
Conversation
/override pre-kubermatic-e2e-vsphere-ubuntu-1.29 vSphere has issues. |
@xrstf: Overrode contexts on behalf of xrstf: pre-kubermatic-e2e-vsphere-ubuntu-1.29, pre-kubermatic-e2e-vsphere-ubuntu-1.29-customfolder, pre-kubermatic-e2e-vsphere-ubuntu-1.29-datastore-cluster In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Did you consider setting CA flag |
You mean setting it to false? That seems risky, I cannot make this decision for any kind of Pod running in any cluster. KKP should IMHO not assume the autoscaler will just ignore local volumes. |
/approve |
LGTM label has been added. Git tree hash: 29c3638c4f346a8c61cba09bf6cab52c4811762c
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kron4eg, xrstf The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherrypick release/v2.25 |
@xrstf: new pull request created: #13196 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cherrypick release/v2.24 |
@xrstf: #13180 failed to apply on top of branch "release/v2.24":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What this PR does / why we need it:
The Cluster-Autoscaler does not evict Pods that use non-memory emptyDirs, unless they have a special annotation (see here). This PR is meant to add this special annotation to all Pods (i.e. PodTemplateSpecs in Deployments, StatefulSets) that make use of emptyDirs. This applies to both our own Helm charts, as well as addons and all the Go code that reconciles such resources.
In the process of doing this I was coming from the "I could have tested this on a KKP dev system, if only KKP let me manually patch the pod templates grrrrr" standpoint, and so I changed the reconciling code to not overwrite all the labels/annotations in the pod template, but to only merge the required ones into the existing ones.
Also there was a fun bug in the Azure CCM code, which accidentally used openstack labels. A harmless bug,as there can never be both openstack and azure CCMs in the same cluster namespace, but still fun. To prevent such mistakes and to slim down the code a bit, the labelling of CCM deployments is now mostly taken care of by the wrapper code.
The S3 exporter was also blocking the cluster-autoscaler because pods in the kube-system namespace are treated differently. To allow it to be evictable, a PDB has to be provided. The same applies to the Vertical Pod Autoscaler (VPA).
NB: Setting
.Name
or.Namespace
is never required or useful in our reconciling framework. I removed some leftovers from older code.What type of PR is this?
/kind feature
/kind design
Does this PR introduce a user-facing change? Then add your Release Note here:
Documentation: