Skip to content
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

Add force Daemon Sets option #5444

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

BigDarkClown
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR adds an optional feature that force-schedules all Daemon Set pods on node group templates. That means that node groups which cannot schedule all the expected daemon sets (eg. because of small nodes) will no longer be chosen during scale-up.

The change is disabled and guarded by a manifest flag, so it should not have any effect on the component yet.

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 25, 2023
@k8s-ci-robot k8s-ci-robot requested review from feiskyer and x13n January 25, 2023 15:52
@k8s-ci-robot k8s-ci-robot added area/cluster-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 25, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 25, 2023
@x13n
Copy link
Member

x13n commented Jan 30, 2023

/assign

if pod_util.IsMirrorPod(pod) || pod_util.IsDaemonSetPod(pod) {
selectedPods = append(selectedPods, allPods[id])
// Add scheduled mirror pods and scheduled DS pods if not force scheduling DS
if pod_util.IsMirrorPod(pod) || (!forceDaemonSets && pod_util.IsDaemonSetPod(pod)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will ignore all DaemonSet-like (but not really DaemonSet) pods for which IsDaemonSetPod currently returns true. I think we need to distinguish between "real DS" and "DS-like" pods here to make this function work correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good point. I think we can remedy this by checking which DS pods are already present on the chosen node and inserting new DS pods only for DSs that are not present. That way we will still keep all the "DS-like" pods to the template.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed, PTAL

@BigDarkClown
Copy link
Contributor Author

/hold

Need to test this change some more

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 30, 2023
@BigDarkClown
Copy link
Contributor Author

/unhold
Tested the changes, everything looks

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 1, 2023
@x13n
Copy link
Member

x13n commented Feb 6, 2023

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 6, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BigDarkClown, x13n

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 6, 2023
@k8s-ci-robot k8s-ci-robot merged commit 0ae555c into kubernetes:master Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/cluster-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants