Skip to content

Commit 96351bc

Browse files
authored
Merge pull request #43950 from kundan2707/configuration-snippet
Document annotation nginx.ingress.kubernetes.io/configuration-snippet
2 parents a25ef2d + 93bc0de commit 96351bc

File tree

1 file changed

+18
-0
lines changed
  • content/en/docs/reference/labels-annotations-taints

1 file changed

+18
-0
lines changed

content/en/docs/reference/labels-annotations-taints/_index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,24 @@ Used on: IngressClass
12091209
When a IngressClass resource has this annotation set to `"true"`, new Ingress resource
12101210
without a class specified will be assigned this default class.
12111211

1212+
### nginx.ingress.kubernetes.io/configuration-snippet
1213+
1214+
Type: Annotation
1215+
1216+
Example: `nginx.ingress.kubernetes.io/configuration-snippet: " more_set_headers \"Request-Id: $req_id\";\nmore_set_headers \"Example: 42\";\n"`
1217+
1218+
Used on: Ingress
1219+
1220+
You can use this annotation to set extra configuration on an Ingress that
1221+
uses the [NGINX Ingress Controller] (https://github.com/kubernetes/ingress-nginx/)
1222+
The `configuration-snippet` annotation is ignored
1223+
by default since version 1.9.0 of the ingress controller.
1224+
The NGINX ingress controller setting `allow-snippet-annotations.`
1225+
has to be explicitly enabled to
1226+
use this annotation.
1227+
Enabling the annotation can be dangerous in a multi-tenant cluster, as it can lead people with otherwise
1228+
limited permissions being able to retrieve all Secrets in the cluster.
1229+
12121230
### kubernetes.io/ingress.class (deprecated)
12131231

12141232
Type: Annotation

0 commit comments

Comments
 (0)