From 1b5f8b8779bedb514d3b32ffc95b2acb1fc70ea5 Mon Sep 17 00:00:00 2001 From: Arjan Schaaf Date: Mon, 24 Apr 2017 16:24:20 +0200 Subject: [PATCH] ConfigMap with proxy-set-headers not required when using the configuration-snippets to add a custom header to a specific Ingress configuration. The Ingress does need to be created for the example to work. --- .../configuration-snippets/nginx/README.md | 10 +++++++++- .../nginx/nginx-load-balancer-conf.yaml | 7 ------- 2 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 examples/customization/configuration-snippets/nginx/nginx-load-balancer-conf.yaml diff --git a/examples/customization/configuration-snippets/nginx/README.md b/examples/customization/configuration-snippets/nginx/README.md index 9adfa78a0..de277c424 100644 --- a/examples/customization/configuration-snippets/nginx/README.md +++ b/examples/customization/configuration-snippets/nginx/README.md @@ -38,7 +38,15 @@ default-http-backend-2657704409-qgwdd 1/1 Running 0 2m nginx-ingress-controller-873061567-4n3k2 1/1 Running 0 42s ``` +## Ingress +The Ingress in this example adds a custom header to Nginx configuration that only applies to that specific Ingress. If you want to add headers that apply globally to all Ingresses, please have a look at [this example](/examples/customization/custom-headers/nginx). + +```console +$ kubectl apply -f ingress.yaml +deployment "nginx-ingress-controller" created +``` + ## Test -Check the contents of the annotation is present in the nginx.conf file using: +Check if the contents of the annotation are present in the nginx.conf file using: `kubectl exec nginx-ingress-controller-873061567-4n3k2 -n kube-system cat /etc/nginx/nginx.conf` diff --git a/examples/customization/configuration-snippets/nginx/nginx-load-balancer-conf.yaml b/examples/customization/configuration-snippets/nginx/nginx-load-balancer-conf.yaml deleted file mode 100644 index 239918267..000000000 --- a/examples/customization/configuration-snippets/nginx/nginx-load-balancer-conf.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -data: - proxy-set-headers: "kube-system/custom-headers" -kind: ConfigMap -metadata: - name: nginx-load-balancer-conf - namespace: kube-system