helm-charts/autopush/templates/ingress.yaml

42 lines
1.1 KiB
YAML
Raw Normal View History

2025-01-03 14:18:54 +01:00
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "autopush.fullname" . }}
labels:
{{- include "autopush.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.ingress.className }}
ingressClassName: {{ . }}
{{- end }}
{{- with .Values.ingress.tls }}
tls:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- host: {{ .Values.ingress.host | quote }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "autopush.fullname" $ }}-autoconnect
port:
name: http
- host: {{ printf "updates.%s" .Values.ingress.host | quote }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "autopush.fullname" $ }}-autoendpoint
port:
name: http
{{- end }}