github.com/nginxinc/kubernetes-ingress@v1.12.5/tests/data/custom-annotations/standard/nginx-config.yaml (about) 1 kind: ConfigMap 2 apiVersion: v1 3 metadata: 4 name: nginx-config 5 namespace: nginx-ingress 6 data: 7 ingress-template: | 8 # This is TEST configuration for {{$.Ingress.Name}}/{{$.Ingress.Namespace}} 9 {{range $ip := split (index $.Ingress.Annotations "custom.nginx.org/test-split-feature") ","}} 10 # Insert config for test-split-feature: {{trim $ip}}; 11 {{end}} 12 {{if index $.Ingress.Annotations "custom.nginx.org/feature-a"}} 13 # Insert config for feature A if the annotation is set 14 {{end}} 15 {{with $value := index $.Ingress.Annotations "custom.nginx.org/feature-b"}} 16 # Print the value assigned to the annotation: {{$value}} 17 {{end}}