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 links related to projection of keys and file permissions in the ConfigMap documentation #44748

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

adityasamant25
Copy link
Contributor

Fixes #44728

The Configure a Pod to Use a ConfigMap page contains a section called Project keys to specific paths and file permissions.
This section contains a link to a corresponding section in the Secrets guide. The link does not take the user to the precise location.

This PR improves the reader's experience while navigating through this section, by redirecting to the exact locations in the Secrets guide.

Regards,
Aditya

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 15, 2024
@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Jan 15, 2024
@k8s-ci-robot k8s-ci-robot added 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. labels Jan 15, 2024
@adityasamant25 adityasamant25 changed the title Fix links related to projection of keys and file permissions in the ConfigMap documentation Fix links related to projection of keys and file permissions in the ConfigMap documentation PR #44748 Jan 15, 2024
@adityasamant25 adityasamant25 changed the title Fix links related to projection of keys and file permissions in the ConfigMap documentation PR #44748 Fix links related to projection of keys and file permissions in the ConfigMap documentation Jan 15, 2024
Copy link

netlify bot commented Jan 15, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 5799e6e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/65a4f27bd3b3d90008bb5933
😎 Deploy Preview https://deploy-preview-44748--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.

Copy link
Contributor

@Princesso Princesso left a comment

Choose a reason for hiding this comment

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

/lgtm

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

LGTM label has been added.

Git tree hash: 9098ec9738714af1f21be5adc9b83d1418d966ec

@natalisucks
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: natalisucks

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 Jan 16, 2024
@k8s-ci-robot k8s-ci-robot merged commit 909a438 into kubernetes:main Jan 16, 2024
6 checks passed
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Post-merge feedback

[Secrets](/docs/concepts/configuration/secret/#using-secrets-as-files-from-a-pod)
guide explains the syntax.
You can project keys to specific paths. Refer to the corresponding section in the [Secrets](/docs/tasks/inject-data-application/distribute-credentials-secure/#project-secret-keys-to-specific-file-paths) guide for the syntax.
You can set POSIX permissions for keys. Refer to the corresponding section in the [Secrets](/docs/tasks/inject-data-application/distribute-credentials-secure/#set-posix-permissions-for-secret-keys) guide for the syntax.
Copy link
Contributor

Choose a reason for hiding this comment

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

How about:

[more text here]

### Set POSIX permissions for ConfigMap keys

You can set the POSIX file access permission bits for a single key in a volume
backed by a ConfigMap.
If you don't specify any permissions, `0644` is used by default.
You can also set a default POSIX file mode for the entire ConfigMap volume, and
you can override per key if needed.

For example, you can specify a default mode like this:

```yaml
apiVersion: v1
kind: Pod
metadata:
  name: mypod
spec:
  containers:
  - name: mypod
    image: redis
    volumeMounts:
    - name: foo
      mountPath: "/etc/foo"
  volumes:
  - name: foo
    configMap:
      configMapName: example-configmap
      defaultMode: 0400

The ConfigMap is mounted on /etc/foo; all the files created by the
ConfigMap volume mount have permission 0400.

{{< note >}}
If you're defining a Pod or a Pod template using JSON, beware that the JSON
specification doesn't support octal literals for numbers because JSON considers
0400 to be the decimal value 400. In JSON, use decimal values for the
defaultMode instead. If you're writing YAML, you can write the defaultMode
in octal.
{{< /note >}}

@adityasamant25 adityasamant25 deleted the issue-44728 branch February 17, 2024 10:34
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.

Configure a Pod to Use a ConfigMap
5 participants