Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/grafana] Add extraContainerVolumes #22264

Merged
merged 4 commits into from
May 7, 2020
Merged

[stable/grafana] Add extraContainerVolumes #22264

merged 4 commits into from
May 7, 2020

Conversation

chris-downs
Copy link
Contributor

Is this a new chart

No

What this PR does / why we need it:

This PR adds a new extraContainerVolumes variable to define arbitrary volumes in the pod spec.

The current options for adding additional volumes (extraVolumeMounts and extraSecretMounts) do not allow you to define volumes for a sidecar container without them being automatically mounted in the main grafana container. This is not always desirable as the volumes for the sidecar may contain secrets that should not be exposed to grafana.

Example use case with the Google Cloud SQL Proxy:

...
extraContainers: |
  - name: cloudsql-proxy
    image: gcr.io/cloudsql-docker/gce-proxy:1.16
    command: ["/cloud_sql_proxy",
              "-instances=<instance_name>=tcp:5432",
              "-credential_file=/secrets/cloudsql/credentials.json"]
    securityContext:
      runAsUser: 2  # non-root user
      allowPrivilegeEscalation: false
    volumeMounts:
      - name: cloudsql-instance-credentials
        mountPath: /secrets/cloudsql
        readOnly: true

## Volumes that can be used in extra containers that will not be mounted to grafana deployment pods
extraContainerVolumes:
  - name: cloudsql-instance-credentials
    secret:
      secretName: cloudsql-instance-credentials
...

Which issue this PR fixes

N\A

Special notes for your reviewer:

N\A

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • DCO signed
  • Chart Version bumped
  • Variables are documented in the README.md
  • Title of the PR starts with chart name (e.g. [stable/mychartname])

…t as default.

Signed-off-by: Chris Downs <downs@mythical.games>
…s, add them to the volumes section of the pod spec

Signed-off-by: Chris Downs <downs@mythical.games>
…ADME

Signed-off-by: Chris Downs <downs@mythical.games>
Signed-off-by: Chris Downs <downs@mythical.games>
@k8s-ci-robot k8s-ci-robot requested review from maorfr and zanhsieh May 5, 2020 21:54
@helm-bot helm-bot added Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 5, 2020
@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 May 5, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @chris-downs. Thanks for your PR.

I'm waiting for a helm 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.

@chris-downs
Copy link
Contributor Author

/assign @rtluckie

@k8s-ci-robot
Copy link
Contributor

@chris-downs: GitHub didn't allow me to assign the following users: rtluckie.

Note that only helm members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @rtluckie

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.

@zanhsieh
Copy link
Collaborator

zanhsieh commented May 7, 2020

/assign
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 7, 2020
@chris-downs
Copy link
Contributor Author

/retest

@zanhsieh
Copy link
Collaborator

zanhsieh commented May 7, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 7, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chris-downs, zanhsieh

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 May 7, 2020
@k8s-ci-robot k8s-ci-robot merged commit 740135e into helm:master May 7, 2020
irlevesque pushed a commit to quantopian/charts that referenced this pull request Jul 13, 2020
* [stable/grafana] adding extraContainerVolumes variable with empty list as default.

Signed-off-by: Chris Downs <downs@mythical.games>

* [stable/grafana] if there are volumes defined by extraContainerVolumes, add them to the volumes section of the pod spec

Signed-off-by: Chris Downs <downs@mythical.games>

* [stable/grafana] documenting new extraContainerVolumes variable in README

Signed-off-by: Chris Downs <downs@mythical.games>

* [stable/grafana] bumping chart version

Signed-off-by: Chris Downs <downs@mythical.games>
includerandom pushed a commit to includerandom/helm_charts that referenced this pull request Jul 19, 2020
* [stable/grafana] adding extraContainerVolumes variable with empty list as default.

Signed-off-by: Chris Downs <downs@mythical.games>

* [stable/grafana] if there are volumes defined by extraContainerVolumes, add them to the volumes section of the pod spec

Signed-off-by: Chris Downs <downs@mythical.games>

* [stable/grafana] documenting new extraContainerVolumes variable in README

Signed-off-by: Chris Downs <downs@mythical.games>

* [stable/grafana] bumping chart version

Signed-off-by: Chris Downs <downs@mythical.games>
li-adrienloiseau pushed a commit to li-adrienloiseau/charts that referenced this pull request Jul 29, 2020
* [stable/grafana] adding extraContainerVolumes variable with empty list as default.

Signed-off-by: Chris Downs <downs@mythical.games>

* [stable/grafana] if there are volumes defined by extraContainerVolumes, add them to the volumes section of the pod spec

Signed-off-by: Chris Downs <downs@mythical.games>

* [stable/grafana] documenting new extraContainerVolumes variable in README

Signed-off-by: Chris Downs <downs@mythical.games>

* [stable/grafana] bumping chart version

Signed-off-by: Chris Downs <downs@mythical.games>
Signed-off-by: Adrien Loiseau <adrien.loiseau@logic-immo.com>
mmingorance-dh pushed a commit to mmingorance-dh/charts that referenced this pull request Aug 28, 2020
* [stable/grafana] adding extraContainerVolumes variable with empty list as default.

Signed-off-by: Chris Downs <downs@mythical.games>

* [stable/grafana] if there are volumes defined by extraContainerVolumes, add them to the volumes section of the pod spec

Signed-off-by: Chris Downs <downs@mythical.games>

* [stable/grafana] documenting new extraContainerVolumes variable in README

Signed-off-by: Chris Downs <downs@mythical.games>

* [stable/grafana] bumping chart version

Signed-off-by: Chris Downs <downs@mythical.games>
Signed-off-by: Miguel Mingorance <miguel.mingorance@deliveryhero.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). lgtm Indicates that a PR is ready to be merged. ok-to-test size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants