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

Helm - Enable configuring request and limit for containers in webhook jobs #7434

Merged

Conversation

bhumijgupta
Copy link
Member

@bhumijgupta bhumijgupta commented Aug 4, 2021

What this PR does / why we need it:

This PR adds two additional fields in helm values namely controller.admissionWebhooks.createSecretJob.resources and controller.admissionWebhooks.patchWebhookJob.resources that can be used to configure the container resources limits and requests for job-createSecret and job-patchWebhook.
By default, the values are empty object, and no explicit resource limits are set by the user.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Which issue/s this PR fixes

Fixes #7105

How Has This Been Tested?

Ran automated tests make kind-e2e-chart-tests and manually deployed the helm chart and checked resources request and limits in the jobs

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…ateSecret and patchWebhook job

Signed-off-by: Bhumij Gupta <[email protected]>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 4, 2021
@k8s-ci-robot
Copy link
Contributor

@bhumijgupta: This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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 needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority labels Aug 4, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @bhumijgupta. Thanks for your PR.

I'm waiting for a kubernetes 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 area/helm Issues or PRs related to helm charts label Aug 4, 2021
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 4, 2021
@rikatz
Copy link
Contributor

rikatz commented Aug 5, 2021

@bhumijgupta thanks for the PR.

Left some minor comment.

Also, would be good to add some e2e test, which would be basically adding a new file in https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx/ci with some random values that should work in resources for both files :)

@rikatz
Copy link
Contributor

rikatz commented Aug 5, 2021

/ok-to-test

@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 Aug 5, 2021
@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 Aug 5, 2021
@bhumijgupta
Copy link
Member Author

Added test and addressed the review comments

@bhumijgupta bhumijgupta requested a review from rikatz August 5, 2021 16:37
@bhumijgupta
Copy link
Member Author

/kind feature

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Aug 5, 2021
Copy link
Member

@tao12345666333 tao12345666333 left a comment

Choose a reason for hiding this comment

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

LGTM

I need to test locally later

@rikatz
Copy link
Contributor

rikatz commented Aug 5, 2021

CI is catching stuff :)
/lgtm
/approve
Thanks!

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bhumijgupta, rikatz

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 Aug 5, 2021
@k8s-ci-robot k8s-ci-robot merged commit 6f0401f into kubernetes:main Aug 5, 2021
rchshld pushed a commit to joomcode/ingress-nginx that referenced this pull request May 19, 2023
… jobs (kubernetes#7434)

* helm: add feature to configure request and limit for container in createSecret and patchWebhook job

Signed-off-by: Bhumij Gupta <[email protected]>

* Remove empty line in helm template

Signed-off-by: Bhumij Gupta <[email protected]>

* Add test for admission webhook job container resources

Signed-off-by: Bhumij Gupta <[email protected]>

* Add new line character at the end of charts ci file

Signed-off-by: Bhumij Gupta <[email protected]>
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/helm Issues or PRs related to helm charts 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. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. 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.

[FR] Ability to define requests and limits of the admissionWebhooks with the Helm Chart
4 participants