Code Review
/
ric-plt
/
ric-dep.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
RIC-919 Upgrade influxdb helm chart v1.8 > v2.2
[ric-plt/ric-dep.git]
/
helm
/
3rdparty
/
influxdb
/
templates
/
ingress.yaml
diff --git
a/helm/3rdparty/influxdb/templates/ingress.yaml
b/helm/3rdparty/influxdb/templates/ingress.yaml
index
bc0a341
..
c5bbcd4
100644
(file)
--- a/
helm/3rdparty/influxdb/templates/ingress.yaml
+++ b/
helm/3rdparty/influxdb/templates/ingress.yaml
@@
-1,5
+1,9
@@
{{- if .Values.ingress.enabled -}}
{{- if .Values.ingress.enabled -}}
+{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
+apiVersion: networking.k8s.io/v1
+{{- else }}
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1beta1
+{{- end }}
kind: Ingress
metadata:
name: {{ include "influxdb.fullname" . }}
kind: Ingress
metadata:
name: {{ include "influxdb.fullname" . }}
@@
-12,7
+16,9
@@
spec:
tls:
- hosts:
- {{ .Values.ingress.hostname | quote }}
tls:
- hosts:
- {{ .Values.ingress.hostname | quote }}
+ {{- if .Values.ingress.secretName }}
secretName: {{ .Values.ingress.secretName }}
secretName: {{ .Values.ingress.secretName }}
+ {{- end -}}
{{- end }}
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
@@
-22,7
+28,17
@@
spec:
http:
paths:
- path: {{ .Values.ingress.path }}
http:
paths:
- path: {{ .Values.ingress.path }}
+{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
+ pathType: Prefix
+{{- end }}
backend:
backend:
+{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
+ service:
+ name: {{ include "influxdb.fullname" . }}
+ port:
+ name: {{ .Values.service.portName }}
+{{- else }}
serviceName: {{ include "influxdb.fullname" . }}
serviceName: {{ include "influxdb.fullname" . }}
- servicePort: 8086
+ servicePort: {{ .Values.service.portName }}
+{{- end }}
{{- end -}}
{{- end -}}