github.com/nginxinc/kubernetes-ingress@v1.12.5/tests/data/custom-annotations/mergeable/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}} 18 {{range $server := .Servers}} { 19 {{range $location := $server.Locations}} 20 location {{$location.Path}} { 21 {{with $location.MinionIngress}} 22 {{range $ip := split (index $location.MinionIngress.Annotations "custom.nginx.org/test-split-feature") "}}"}} 23 # Insert config for test-split-feature minion: {{trim $ip}}; 24 {{end}} 25 {{end}} 26 } {{end}} 27 } {{end}}