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

vault-secrets-webhook: Allow users to specify resources for init-containers #1331

Merged
merged 3 commits into from
May 20, 2021

Conversation

sopriani
Copy link
Contributor

@sopriani sopriani commented May 19, 2021

Q A
Bug fix? no
New feature? yes
API breaks? no
Deprecations? no
Related tickets fixes #1328
License Apache 2.0

What's in this PR?

Introduced environment variables ( VAULT_ENV_CPU_REQUEST, VAULT_ENV_MEMORY_REQUEST, VAULT_ENV_CPU_LIMIT, VAULT_ENV_MEMORY_LIMIT) for vault-secrets-webhook. Instead of applying hard-coded values, this provides the users an option to specify resource requests and limits for the init-containers being added during pod mutation for secrets viz vault-env and copy-vault-env. Without this change, it is not possible to run mutated pods with "guaranteed" QoS using the default settings - they always run with "burstable".

Hint: Set VAULT_ENV_CPU_LIMIT=50m to be able to run the mutated pod with guaranteed QoS.

Checklist

  • Code meets the Developer Guide
  • [n] User guide and development docs updated (if needed)
  • Related Helm chart(s) updated (if needed)

…init-containers vault-env and copy-vault-env from environment variables VAULT_ENV_CPU_REQUEST, VAULT_ENV_MEMORY_REQUEST, VAULT_ENV_CPU_LIMIT, VAULT_ENV_MEMORY_LIMIT
@CLAassistant
Copy link

CLAassistant commented May 19, 2021

CLA assistant check
All committers have signed the CLA.

@sopriani sopriani changed the title [vault-secrets-webhook] Read values for resource requests&limits for … [vault-secrets-webhook] Allow users to specify resources for init-containers May 19, 2021
@sopriani sopriani changed the title [vault-secrets-webhook] Allow users to specify resources for init-containers vault-secrets-webhook: Allow users to specify resources for init-containers May 19, 2021
Copy link
Contributor

@pbalogh-sa pbalogh-sa left a comment

Choose a reason for hiding this comment

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

Thanks @sopriani ! Please bump the vault-secrets-webhook chart version, otherwise LGTM.

@bonifaido bonifaido self-assigned this May 20, 2021
bonifaido
bonifaido previously approved these changes May 20, 2021
Copy link
Member

@bonifaido bonifaido left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@bonifaido
Copy link
Member

Can you fix the tests? You can check it in the build logs.

@bonifaido bonifaido merged commit 4988a44 into bank-vaults:master May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants