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

fix: validate additionalProviderPaths does not contain providers dir #898

Conversation

paulczar
Copy link
Contributor

Signed-off-by: Paul Czarkowski username.taken@gmail.com

What this PR does / why we need it:

Checks if additionalProviderPaths matches providerPaths to avoid duplicate volume mounts,

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #897

Signed-off-by: Paul Czarkowski <username.taken@gmail.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 14, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @paulczar. 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 14, 2022
@nilekhc
Copy link
Contributor

nilekhc commented Mar 14, 2022

/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 Mar 14, 2022
Copy link
Member

@aramase aramase left a comment

Choose a reason for hiding this comment

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

@paulczar thank you for the PR!

  1. Could we also add the same check for volumes:

    - name: providers-dir
    hostPath:
    path: {{ .Values.linux.providersDir }}
    type: DirectoryOrCreate
    {{- range $i, $path := .Values.linux.additionalProvidersDirs }}
    - name: providers-dir-{{ $i }}
    hostPath:
    path: "{{ $path }}"
    type: DirectoryOrCreate
    {{- end }}

  2. The windows template as well: https://github.com/kubernetes-sigs/secrets-store-csi-driver/blob/main/manifest_staging/charts/secrets-store-csi-driver/templates/secrets-store-csi-driver-windows.yaml#L183

Signed-off-by: Paul Czarkowski <username.taken@gmail.com>
@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 Mar 15, 2022
@paulczar
Copy link
Contributor Author

@aramase good catch! hopefully this fixes both comments.

@k8s-ci-robot
Copy link
Contributor

@paulczar: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-secrets-store-csi-driver-image-scan 8bcfcc6 link false /test pull-secrets-store-csi-driver-image-scan

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Copy link
Member

@aramase aramase left a comment

Choose a reason for hiding this comment

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

/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 Mar 15, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aramase, paulczar, smirman

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 Mar 15, 2022
@aramase
Copy link
Member

aramase commented Mar 15, 2022

Ignore pull-secrets-store-csi-driver-image-scan failure. Opened #900 to fix new CVEs in base image.

@aramase
Copy link
Member

aramase commented Mar 16, 2022

/retitle fix: validate additionalProviderPaths does not contain providers dir

@aramase aramase changed the title validate additionalProviderPaths does not contain providerPath fix: validate additionalProviderPaths does not contain providers dir Mar 16, 2022
@k8s-ci-robot k8s-ci-robot changed the title fix: validate additionalProviderPaths does not contain providers dir fix: validate additionalProviderPaths does not contain providers dir Mar 16, 2022
k8s-ci-robot pushed a commit that referenced this pull request Mar 17, 2022
…does not contain providers dir (#902)

* validate additionalProviderPaths does not contain providerPath

Signed-off-by: Paul Czarkowski <username.taken@gmail.com>

* update volumes, make same change for windows

Signed-off-by: Paul Czarkowski <username.taken@gmail.com>

Co-authored-by: Paul Czarkowski <username.taken@gmail.com>
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/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.

helm chart fails if user sets linux.providersDir=/var/run/secrets-store-csi-providers
5 participants