-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Support custom Daemonset
Pods
#2453
Comments
It seems to me that approach 2) is less invasive and I do not see any hard reasons not to implement it. @MaciekPytel WDYT? |
I wouldn't mind solution 2 if the autoscaler could retain its current ability to detect DaemonSet-managed pods. The reason is that some daemons we run come from upstream manifests that we'd have to patch—perhaps using kustomize—in order to place such an annotation on those pods. |
Option 2 SGTM. As mentioned there is precedent for using annotations in similar way in CA and I don't really see any downsides to adding it. edit: I assume that annotation would work in addition to current DS pod detection, not replace it. |
Yeah - that is the idea. To add to what we have right now. Not replace current logic. |
Thanks all for your feedback, |
Fix: kubernetes#2453 * Create `utils/pod` package: pod kind detection functions. * Update DaemonSet Pod detection logic: introduce the annotation `cluster-autoscaler.kubernetes.io/daemonset-pod` to declare a Pod as a DaemonSet Pod. * Update `simulator` package to use the new `utils/pod` package function. * Cleanup `getRequiredPodsForNode()` function. Signed-off-by: cedric lamoriniere <[email protected]>
Fixes: kubernetes#2453 * Create `utils/pod` package: pod kind detection functions. * Update DaemonSet Pod detection logic: introduce the annotation `cluster-autoscaler.kubernetes.io/daemonset-pod` to declare a Pod as a DaemonSet Pod. * Update `simulator` package to use the new `utils/pod` package function. * Cleanup `getRequiredPodsForNode()` function. Signed-off-by: cedric lamoriniere <[email protected]>
Fixes: kubernetes#2453 * Create `utils/pod` package: pod kind detection functions. * Update DaemonSet Pod detection logic: introduce the annotation `cluster-autoscaler.kubernetes.io/daemonset-pod` to declare a Pod as a DaemonSet Pod. * Update `simulator` package to use the new `utils/pod` package function. * Cleanup `getRequiredPodsForNode()` function. Signed-off-by: cedric lamoriniere <[email protected]>
Fixes: kubernetes#2453 * Create `utils/pod` package: pod kind detection functions. * Update DaemonSet Pod detection logic: introduce the annotation `cluster-autoscaler.kubernetes.io/daemonset-pod` to declare a Pod as a DaemonSet Pod. * Update `simulator` package to use the new `utils/pod` package function. * Cleanup `getRequiredPodsForNode()` function. Signed-off-by: cedric lamoriniere <[email protected]>
The Daemonset pod detection is currently done in the code by looking at the
OwnerRef.Kind
that reference ether a Daemonset, ReplicaSet, StatefulSet.Internally at Datadog, we implemented thanks to CRD a custom Daemonset that aims to fix several issues that we have with the current Daemonset implementation.
Like the official Daemonset controller, our CustomDaemonset controller is creating and assigning on each Node a Pod, but in our case the OwnerRef.Kind is not
Daemonset
butCustomDaemonset
, which has the consequence that theAutoscaler
considers those pods asnormal
pods, and tries to control them for the cluster scaling and also the bin packing.To allow the support of our use case, we are open to participating in the project. We see two possible implementations:
cluster-autoscaler.kubernetes.io/is-daemonset-pod: "true"
(annotation name TBD)1) Add new configuration flag to provide several
Daemonset
ApiGroup/Kind2) Introduce a new Annotation on Pod to make the Autoscaler consider a Pod as a Daemonset pod.
Solution 2 is our preferred solution because it opens the support of more use cases. Also, it seems aligned with other use cases logic already implemented in the Autoscaler like:
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
Currently with fix it with the following workaround: 25754c8
Feel free to comment on this issue, if you want more information about our use case, if you see corner cases or you think of another possible solution.
The text was updated successfully, but these errors were encountered: