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

Cheatsheet syntax to retrieve Secret values with dashes (-) in their key names #32491

Merged
merged 3 commits into from
Jul 12, 2022

Conversation

stemid
Copy link
Contributor

@stemid stemid commented Mar 25, 2022

This template syntax was not obvious to me until someone pointed it out on stackexchange, it should be in the cheatsheet for future users. Because trying to retrieve a value with dashes in its key-name using the normal template syntax will result in an error.

I placed the example under the other example that also deals with "non-standard" characters in key names like period.

This template syntax was not obvious to me until someone pointed it out on stackexchange, it should be in the cheatsheet for future users. Because trying to retrieve a value with dashes in its key-name using the normal template syntax will result in an error.
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 25, 2022
@k8s-triage-robot
Copy link

Unknown CLA label state. Rechecking for CLA labels.

Send feedback to sig-contributor-experience at kubernetes/community.

/check-cla
/easycla

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 25, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: stemid / name: Stefan Midjich (5e9e7d0)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Mar 25, 2022
@reylejano
Copy link
Member

@stemid , the CLA must be signed before this PR can be reviewed
Please sign the CLA
https://github.com/kubernetes/community/blob/master/CLA.md

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 26, 2022
@Sea-n
Copy link
Member

Sea-n commented Jun 11, 2022

Hey @krousey, you are in the reviewers list, how do you think about this suggestion?
/cc @krousey

The labels are missing due to no CLA signed.
/language en

@k8s-ci-robot k8s-ci-robot requested a review from krousey June 11, 2022 02:00
@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Jun 11, 2022
@Sea-n
Copy link
Member

Sea-n commented Jun 11, 2022

/sig docs

@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Jun 11, 2022
@stemid
Copy link
Contributor Author

stemid commented Jun 13, 2022

Hey @krousey, you are in the reviewers list, how do you think about this suggestion? /cc @krousey

The labels are missing due to no CLA signed. /language en

Why do people keep saying I haven't signed the CLA? I have definitely signed it.

@Sea-n
Copy link
Member

Sea-n commented Jun 13, 2022

The labels are missing due to no CLA signed.
/language en

Why do people keep saying I haven't signed the CLA? I have definitely signed it.

I know you already signed CLA when I reviewing your PR.

What I am saying is that CLA hasn't been signed at the beginning, so the bot didn't automatically add language label and assign reviewer.

@netlify
Copy link

netlify bot commented Jun 14, 2022

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit dd9061e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/62acbce28f8e710009c2fae1
😎 Deploy Preview https://deploy-preview-32491--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@reylejano
Copy link
Member

/lgtm

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

LGTM label has been added.

Git tree hash: b798801610dccbe44afc73159c07ddd7652f0388

@kbhawkey
Copy link
Contributor

I have not tested this template. @stemid, did you evaluate the command and template? Thanks.

@stemid
Copy link
Contributor Author

stemid commented Jul 12, 2022

Sure @kbhawkey I have tested it verbatim.

kubectl create secret generic my-secret --from-literal=key-name-with-dashes=supersecret
kubectl get secret my-secret --template='{{index .data "key-name-with-dashes"}}'
c3VwZXJzZWNyZXQ=

@kbhawkey
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kbhawkey

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 Jul 12, 2022
@k8s-ci-robot k8s-ci-robot merged commit fe11368 into kubernetes:main Jul 12, 2022
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. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants