X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=helm%2F3rdparty%2Finfluxdb%2Ftemplates%2Fingress.yaml;h=c5bbcd43c81cbd17c8aa1f3a02756f8136603b90;hb=refs%2Fchanges%2F20%2F9020%2F24;hp=bc0a341318fdcca270c8d69e79ecb2a90906b2e8;hpb=22ebf743884858441150813c18ba0751771e0eed;p=ric-plt%2Fric-dep.git diff --git a/helm/3rdparty/influxdb/templates/ingress.yaml b/helm/3rdparty/influxdb/templates/ingress.yaml index bc0a341..c5bbcd4 100644 --- a/helm/3rdparty/influxdb/templates/ingress.yaml +++ b/helm/3rdparty/influxdb/templates/ingress.yaml @@ -1,5 +1,9 @@ {{- if .Values.ingress.enabled -}} +{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} +apiVersion: networking.k8s.io/v1 +{{- else }} apiVersion: networking.k8s.io/v1beta1 +{{- end }} kind: Ingress metadata: name: {{ include "influxdb.fullname" . }} @@ -12,7 +16,9 @@ spec: tls: - hosts: - {{ .Values.ingress.hostname | quote }} + {{- if .Values.ingress.secretName }} secretName: {{ .Values.ingress.secretName }} + {{- end -}} {{- end }} {{- if .Values.ingress.className }} ingressClassName: {{ .Values.ingress.className }} @@ -22,7 +28,17 @@ spec: http: paths: - path: {{ .Values.ingress.path }} +{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} + pathType: Prefix +{{- end }} 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" . }} - servicePort: 8086 + servicePort: {{ .Values.service.portName }} +{{- end }} {{- end -}}