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

Document annotation nginx.ingress.kubernetes.io/configuration-snippet #43950

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

kundan2707
Copy link
Contributor

@kundan2707 kundan2707 commented Nov 15, 2023

Documented nginx.ingress.kubernetes.io/configuration-snippet ingress-nginx annotation.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. labels Nov 15, 2023
@kundan2707
Copy link
Contributor Author

/language en

Copy link

netlify bot commented Nov 15, 2023

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 93bc0de
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/66425daabe12b30008c51486
😎 Deploy Preview https://deploy-preview-43950--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.

@sftim
Copy link
Contributor

sftim commented Nov 15, 2023

/retitle Document annotation nginx.ingress.kubernetes.io/configuration-snippet

@k8s-ci-robot k8s-ci-robot changed the title added configuration-snippet to label and annotation Document annotation nginx.ingress.kubernetes.io/configuration-snippet Nov 15, 2023
sftim
sftim previously requested changes Nov 15, 2023
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.

Thank you.
I don't think this PR fixes #43698
Please edit the PR description if you agree.


Documenting the one annotation that the issue lists as an example is helpful, but falls short of doing all the work required. To fix that, change the description of this PR.

Comment on lines 1094 to 1095
Example: `nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "Request-Id: $req_id";`
Copy link
Contributor

Choose a reason for hiding this comment

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

Please avoid a multiline example here. I think this would be OK even if it's hard to read as it gives readers the sense that the annotation value is complex.

Suggested change
Example: `nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "Request-Id: $req_id";`
Example: `nginx.ingress.kubernetes.io/configuration-snippet: " more_set_headers \"Request-Id: $req_id\";\nmore_set_headers \"Example: 42\";\n"`

Used on: Ingress

With use of this annotation someone can add additional configuration to the
Nginx location as mentioned in example above. `configuration-snippet` annotation is disabled
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd signpost readers to read the ingress controller's docs for the full details and an example.

@natalisucks
Copy link
Contributor

@kundan2707 Hi there – do you have the capacity to review the feedback left on this PR?

@kundan2707
Copy link
Contributor Author

@natalisucks i will incorporate feeback and push new changes this week.

@sftim
Copy link
Contributor

sftim commented Feb 25, 2024

How's this going @kundan2707?

@kundan2707
Copy link
Contributor Author

@sftim sorry for delay. I incorporated review comments today.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 1, 2024
@divya-mohan0209
Copy link
Contributor

Hey @kundan2707 , please sign the commits appropriately. The PR has been labelled with the cncf-cla:no label.

@rudrakshkarpe
Copy link
Contributor

/easycla

@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 11, 2024
@kundan2707
Copy link
Contributor Author

@divya-mohan0209 cncf-cla : no label removed now.

@kundan2707
Copy link
Contributor Author

@stmcginnis incorporated review comments.

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.

/lgtm

More feedback, if you'd like it.

Comment on lines 1098 to 1100
With use of this annotation someone can add additional
configuration to the
Nginx location as mentioned in example above.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
With use of this annotation someone can add additional
configuration to the
Nginx location as mentioned in example above.
You can use this annotation to set extra configuration on an Ingress that
uses the [NGINX Ingress controller](https://github.com/kubernetes/ingress-nginx/).

With use of this annotation someone can add additional
configuration to the
Nginx location as mentioned in example above.
`configuration-snippet` annotation is disabled
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`configuration-snippet` annotation is disabled
The `configuration-snippet` annotation is ignored

by default since version 1.9.0. `allow-snippet-annotations.`
has to be explicitly enabled to
use this annotation.
Enabling it can be dangerous in multi-tenant cluster, as it can lead people with otherwise
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Enabling it can be dangerous in multi-tenant cluster, as it can lead people with otherwise
Enabling the annotation can be dangerous in a multi-tenant cluster, as it can lead people with otherwise

has to be explicitly enabled to
use this annotation.
Enabling it can be dangerous in multi-tenant cluster, as it can lead people with otherwise
limited permissions being able to retrieve all secrets in the cluster.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
limited permissions being able to retrieve all secrets in the cluster.
limited permissions being able to retrieve all Secrets in the cluster.

configuration to the
Nginx location as mentioned in example above.
`configuration-snippet` annotation is disabled
by default since version 1.9.0. `allow-snippet-annotations.`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
by default since version 1.9.0. `allow-snippet-annotations.`
by default since version 1.9.0 of the ingress controller.
The NGINX ingress controller setting `allow-snippet-annotations`

@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, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 92bc97ae721a201a3957e5aac3b2e4567476e2d4

@reylejano
Copy link
Member

Hi @kundan2707, do you have time to address comments on this PR?

@kundan2707
Copy link
Contributor Author

@reylejano sorry for delay i will incorporate all comments by tommrow.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 13, 2024
@k8s-ci-robot k8s-ci-robot requested a review from sftim May 13, 2024 18:36
@kundan2707
Copy link
Contributor Author

@sftim incorporated your suggesions.

@sftim sftim dismissed their stale review July 24, 2024 12:34

Superseded

@sftim
Copy link
Contributor

sftim commented Jul 24, 2024

/lgtm

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

LGTM label has been added.

Git tree hash: 89166adb96af814cb7aa286ae632cc32ace06232

Copy link
Contributor

@divya-mohan0209 divya-mohan0209 left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: divya-mohan0209

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 Aug 12, 2024
@k8s-ci-robot k8s-ci-robot merged commit 96351bc into kubernetes:main Aug 12, 2024
6 checks passed
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/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.

8 participants