Adding deployment for e2term
[ric-plt/ric-dep.git] / helm / 3rdparty / influxdb / templates / ingress.yaml
1 {{- if .Values.ingress.enabled -}}
2 {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
3 apiVersion: networking.k8s.io/v1
4 {{- else }}
5 apiVersion: networking.k8s.io/v1beta1
6 {{- end }}
7 kind: Ingress
8 metadata:
9   name: {{ include "influxdb.fullname" . }}
10   labels:
11     {{- include "influxdb.labels" . | nindent 4 }}
12   annotations:
13 {{ toYaml .Values.ingress.annotations | indent 4 }}
14 spec:
15 {{- if .Values.ingress.tls }}
16   tls:
17     - hosts:
18       - {{ .Values.ingress.hostname | quote }}
19       {{- if .Values.ingress.secretName }}
20       secretName: {{ .Values.ingress.secretName }}
21       {{- end -}}
22 {{- end }}
23 {{- if .Values.ingress.className }}
24   ingressClassName: {{ .Values.ingress.className }}
25 {{- end }}
26   rules:
27   - host: {{ .Values.ingress.hostname }}
28     http:
29       paths:
30       - path: {{ .Values.ingress.path }}
31 {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
32         pathType: Prefix
33 {{- end }}
34         backend:
35 {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
36           service:
37             name: {{ include "influxdb.fullname" . }}
38             port:
39               name: {{ .Values.service.portName }}
40 {{- else }}
41           serviceName: {{ include "influxdb.fullname" . }}
42           servicePort: {{ .Values.service.portName }}
43 {{- end }}
44 {{- end -}}