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

[chart] Allow resources override for node DaemonSet + priorityClassName #732

Merged

Conversation

dntosas
Copy link
Contributor

@dntosas dntosas commented Feb 9, 2021

CSI controller and node have different needs in a manner of capacity so
in this commit we enable users to define specific resources for the node
component. This will allow users not to reserve not needed resources on
all of their instances as node is a DaemonSet and may not need as much
CPU/Memory as the controller Pods.

Is this a bug fix or adding new feature?
Adding a feature of overriding resource for the node

What is this PR about? / Why do we need it?
Mitigate overprovisioning capacity for node component

What testing is done?
Tested on our internal clusters

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 9, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @dntosas!

It looks like this is your first PR to kubernetes-sigs/aws-ebs-csi-driver 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/aws-ebs-csi-driver has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 9, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @dntosas. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 9, 2021
@coveralls
Copy link

coveralls commented Feb 9, 2021

Pull Request Test Coverage Report for Build 1580

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 81.286%

Totals Coverage Status
Change from base Build 1572: 0.0%
Covered Lines: 1707
Relevant Lines: 2100

💛 - Coveralls

@dntosas dntosas force-pushed the allow-resources-override-for-node branch from c5c512b to e81e584 Compare February 9, 2021 10:06
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 9, 2021
@dntosas dntosas changed the title [chart] Allow resources override for node DaemonSet [chart] Allow resources override for node DaemonSet Feb 9, 2021
@dntosas dntosas changed the title [chart] Allow resources override for node DaemonSet [chart] Allow resources override for node DaemonSet + priorityClassName Feb 9, 2021
Copy link
Contributor

@ayberk ayberk left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@@ -80,7 +81,7 @@ spec:
timeoutSeconds: 3
periodSeconds: 10
failureThreshold: 5
{{- with .Values.resources }}
{{- with .Values.node.resources }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not a big fan of this change. This would be a breaking change and force the operators to update their setup. Can we somehow give this new value priority and if it doesn't exist fallback to .Values.resources? We can add a deprecation note for the old field on the values file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch ^^

Pushed some changes, adding a condition so the additions would be backwards compatible. Tell me if something like that would work for you :)

@@ -103,7 +104,7 @@ spec:
mountPath: /csi
- name: registration-dir
mountPath: /registration
{{- with .Values.resources }}
{{- with .Values.node.resources }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly here. I understand this makes more sense, but we still have to make sure we don't break existing setups without any warning.

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 9, 2021
CSI controller and node have different needs in a manner of capacity so
in this commit we enable users to define specific resources for the node
component. This will allow users not to reserve not needed resources on
all of their instances as node is a DaemonSet and may not need as much
CPU/Memory as the controller Pods.

Signed-off-by: dntosas <ntosas@gmail.com>
CSI components and especially the node one, may be critical for
operators so in this commit we enable them to define priorities for this
kind of Pods.

Signed-off-by: dntosas <ntosas@gmail.com>
@dntosas dntosas force-pushed the allow-resources-override-for-node branch from c9b1c39 to 5a03305 Compare February 10, 2021 06:23
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 10, 2021
@ayberk
Copy link
Contributor

ayberk commented Feb 11, 2021

Looks great, thanks! It'd be great if you can follow-up with a small CR to add a comment for the resources fields so we have a deprecation warning.

/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 11, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ayberk, dntosas

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 11, 2021
@k8s-ci-robot k8s-ci-robot merged commit d22d0db into kubernetes-sigs:master Feb 11, 2021
@dntosas dntosas deleted the allow-resources-override-for-node branch February 14, 2021 08:30
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants