mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-12-25 03:48:30 +00:00
56 lines
1.9 KiB
YAML
56 lines
1.9 KiB
YAML
{{- if .Values.web.ingress.enabled -}}
|
|
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
|
|
apiVersion: networking.k8s.io/v1
|
|
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
{{- else if .Capabilities.APIVersions.Has "extensions/v1beta1" }}
|
|
apiVersion: extensions/v1beta1
|
|
{{- end }}
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "temporal.componentname" (list . "web") }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "temporal.name" . }}
|
|
helm.sh/chart: {{ include "temporal.chart" . }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" }}
|
|
app.kubernetes.io/component: web
|
|
app.kubernetes.io/part-of: {{ .Chart.Name }}
|
|
{{- with .Values.web.ingress.annotations }}
|
|
annotations:
|
|
{{ toYaml . | indent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if .Values.web.ingress.tls }}
|
|
tls:
|
|
{{- range .Values.web.ingress.tls }}
|
|
- hosts:
|
|
{{- range .hosts }}
|
|
- {{ . | quote }}
|
|
{{- end }}
|
|
secretName: {{ .secretName }}
|
|
{{- end }}
|
|
{{- end }}
|
|
rules:
|
|
{{- range .Values.web.ingress.hosts }}
|
|
{{- $url := splitList "/" . }}
|
|
- host: {{ first $url }}
|
|
http:
|
|
paths:
|
|
- path: /{{ rest $url | join "/" }}
|
|
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "temporal.fullname" $ }}-web
|
|
port:
|
|
number: {{ $.Values.web.service.port }}
|
|
{{- else if $.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
|
|
backend:
|
|
serviceName: {{ include "temporal.fullname" $ }}-web
|
|
servicePort: {{ $.Values.web.service.port }}
|
|
{{- end }}
|
|
{{- end}}
|
|
{{- end }}
|