Skip to content
Snippets Groups Projects
Commit 4f22a28c authored by OZGCloud's avatar OZGCloud
Browse files

add ingress annotations

parent 6efe067e
No related branches found
No related tags found
No related merge requests found
......@@ -25,10 +25,16 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
{{- with .Values.ingress.configuration_snippet}}
annotations: {{- toYaml . | nindent 4 }}
annotations:
{{- if .Values.ingress.configuration_snippet }}
{{- with .Values.ingress.configuration_snippet }}
{{- toYaml . | nindent 4 }}
{{- end }}
more_set_headers "Access-Control-Allow-Origin: {{ (include "app.alfaAddress" .) }}";
{{- end }}
{{- with .Values.ingress.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if (.Values.ingress).certManagerAnnotations -}}
{{- range (.Values.ingress).certManagerAnnotations }}
{{ . | indent 4 }}
......
......@@ -44,3 +44,23 @@ tests:
more_set_headers "Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,X-XSRF-TOKEN";
more_set_headers "Access-Control-Expose-Headers: Content-Length,Content-Range";
more_set_headers "Access-Control-Allow-Origin: https://helm.test.sh.ozg-cloud.de";
- it: Should disable nginx configuration snippet
set:
ingress:
configuration_snippet: null
asserts:
- notExists:
path: metadata.annotations["nginx.ingress.kubernetes.io/configuration-snippet"]
- it: Should contain annotations
set:
ingress:
annotations:
foo: bar
hello: world
asserts:
- equal:
path: metadata.annotations.foo
value: bar
- equal:
path: metadata.annotations.hello
value: world
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment