Update custom headers annotation documentation (#12319)

Signed-off-by: Satyam Zode <satyamz@users.noreply.github.com>
Co-authored-by: Satyam Zode <satyamz@users.noreply.github.com>
This commit is contained in:
k8s-infra-cherrypick-robot 2024-11-06 09:59:31 -08:00 committed by GitHub
parent ee2a4fe03a
commit 567a6c2ef2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -338,7 +338,13 @@ nginx.ingress.kubernetes.io/custom-http-errors: "404,415"
``` ```
### Custom Headers ### Custom Headers
This annotation is of the form `nginx.ingress.kubernetes.io/custom-headers: custom-headers-configmap` to specify a configmap name that contains custom headers. This annotation uses `more_set_headers` nginx directive. This annotation is of the form `nginx.ingress.kubernetes.io/custom-headers: <namespace>/<custom headers configmap>` to specify a namespace and configmap name that contains custom headers. This annotation uses `more_set_headers` nginx directive.
Example annotation for following example configmap:
```yaml
nginx.ingress.kubernetes.io/custom-headers: default/custom-headers-configmap
```
Example configmap: Example configmap:
```yaml ```yaml
@ -348,6 +354,7 @@ data:
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: custom-headers-configmap name: custom-headers-configmap
namespace: default
``` ```
!!! attention !!! attention