helm-charts/charts/modjo-microservice/templates/preview.ingress.yaml
2023-12-16 11:25:39 +01:00

29 lines
No EOL
1 KiB
YAML

{{- if and (eq .Values.rollout.strategy.type "BlueGreen") .Values.preview.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "common.names.suffixedName" (dict "root" . "suffix" "preview") }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
annotations:
{{- if .Values.ingress.annotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
tls:
{{- if .Values.ingress.tls }}
- hosts:
- {{ .Values.preview.ingress.hostname | quote }}
secretName: {{ or .Values.ingress.tlsSecretname .Values.preview.ingress.tlsSecretname }}
{{- end }}
rules:
- host: {{ .Values.preview.ingress.hostname | quote }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "common.names.suffixedName" (dict "root" . "suffix" "preview") }}
port:
name: http
{{- end }}