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

Adding Kubernetes Secret mapping documentation. #178

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

j7nw4r
Copy link

@j7nw4r j7nw4r commented Aug 14, 2022

It took me a while to figure out how to actually do mapping to K8s secrets using this plugin. I eventually found the issue that outlines how to do so. It may be useful to add this to the docs.

@google-cla
Copy link

google-cla bot commented Aug 14, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@j7nw4r
Copy link
Author

j7nw4r commented Aug 23, 2022

@tam7t @sbadame Is there anything I need to do for this PR?

@tam7t
Copy link
Contributor

tam7t commented Oct 13, 2022

Hello thank you for the contribution! I left a few comments if you're still interested in updating the PR. Sorry that it took so long to review!

A particular use case for this plugin is to manage and map to Kubernetes secrets. Below is an example of how to set up a `SecretsProviderClass` to do so:

```yaml
apiVersion: secrets-store.csi.x-k8s.io/v1alpha1
Copy link
Contributor

Choose a reason for hiding this comment

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

secrets-store.csi.x-k8s.io/v1 is preferred to the v1alpha1 version

parameters:
secrets: |
- resourceName: "projects/core-workshop/secrets/cbci-workshop-token/versions/latest"
fileName: "token"
Copy link
Contributor

Choose a reason for hiding this comment

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

path is preferred to fileName

(they both work but the reasoning is that in #136 we added the ability to have nested paths instead of just single level of files)

fileName: "token"
```

Note that the `secretObject.data.objectName` must match the fileName of the secret.
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe like[].path of the secret. to be more clear that its that field in the yaml

@j7nw4r j7nw4r requested a review from amitmodak as a code owner July 18, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants