Created
June 17, 2021 20:04
-
-
Save kodefoundry/fa83f27cea2f90c5c5901e728b635845 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: nginx-config | |
namespace: ingress-nginx | |
data: | |
nginx.tmpl: | | |
# This is TEST configuration for {{$.Ingress.Name}}/{{$.Ingress.Namespace}} | |
{{range $ip := split (index $.Ingress.Annotations "custom.nginx.org/test-split-feature") ","}} | |
# Insert config for test-split-feature: {{trim $ip}}; | |
{{end}} | |
{{if index $.Ingress.Annotations "custom.nginx.org/feature-a"}} | |
# Insert config for feature A if the annotation is set | |
{{end}} | |
{{with $value := index $.Ingress.Annotations "custom.nginx.org/feature-b"}} | |
# Print the value assigned to the annotation: {{$value}} | |
{{end}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment