Unverified Commit 1f61245b authored by Greg Robinson's avatar Greg Robinson Committed by GitHub

Update ingress to v1 from v1beta1 for Influxdb2. (#386)

parent e62e767e
......@@ -5,7 +5,7 @@ name: influxdb2
description: A Helm chart for InfluxDB v2
home: https://www.influxdata.com/products/influxdb/
type: application
version: 2.0.2
version: 2.0.3
maintainers:
- name: rawkode
email: rawkode@influxdata.com
......
{{- 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" . }}
labels:
{{- include "influxdb.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{ toYaml .Values.ingress.annotations | indent 4 }}
spec:
{{- if .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName }}
{{- end -}}
{{- if .Values.ingress.tls }}
tls:
- hosts:
- {{ .Values.ingress.hostname | quote }}
secretName: {{ .Values.ingress.secretName }}
{{- end }}
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
rules:
- host: {{ .Values.ingress.hostname }}
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:
number: 8086
{{- else }}
serviceName: {{ include "influxdb.fullname" . }}
servicePort: {{ .Values.service.portName }}
servicePort: 8086
{{- end }}
{{- end -}}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment