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

Duplicated examples about ConfigMaps as volume mounts #46364

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pegasas
Copy link
Contributor

@pegasas pegasas commented May 14, 2024

fix: #45847

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign natalisucks for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language labels May 14, 2024
@k8s-ci-robot k8s-ci-robot added sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 14, 2024
Copy link

netlify bot commented May 14, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit e79d5c9
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/6642e49ce9940200085a00f5
😎 Deploy Preview https://deploy-preview-46364--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 configuration.

@salaxander
Copy link
Contributor

/lgtm

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

LGTM label has been added.

Git tree hash: e9c2d5897358757849a775ea36e467bb131e4e3b

@network-charles
Copy link
Contributor

Hi @pegasas, thanks for opening this PR. However, both examples are valid. Passing the config map as an environmental variable makes the configuration available as an environmental variable, so when you execute env on your Linux terminal, your config is available as a key/value pair.
However, passing the config map as a volume, makes your configuration available as a file in a specific file path where the volume is mounted. This means that when the volume is detached, your configuration will no longer be available.

@pegasas
Copy link
Contributor Author

pegasas commented Jun 1, 2024

Hi @pegasas, thanks for opening this PR. However, both examples are valid. Passing the config map as an environmental variable makes the configuration available as an environmental variable, so when you execute env on your Linux terminal, your config is available as a key/value pair. However, passing the config map as a volume, makes your configuration available as a file in a specific file path where the volume is mounted. This means that when the volume is detached, your configuration will no longer be available.

Hi, @network-charles ,
I have ever this similar callout before and have discussed this issue similar like #45847 (comment)
it seems aligned with your call-out for me.

@network-charles
Copy link
Contributor

I don't quite understand your reply. Are you saying my comment is valid and the PR needs to be closed?

@pegasas
Copy link
Contributor Author

pegasas commented Jun 1, 2024

I don't quite understand your reply. Are you saying my comment is valid and the PR needs to be closed?

I think yes it is, this PR is ready for merge.
The way I saw your comment is to clarify two different configmap usage, isn't it?
What I wants to comment here is to say that I have discuss the issue with the commenter before,
it turns out the example on character has cover the two case mentioned in your comments.

https://kubernetes.io/docs/concepts/configuration/configmap/#configmaps-and-pods
image

So that indeed,we can directly delete other redundant example on this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicated examples about ConfigMaps as volume mounts
4 participants