Unverified Commit c41e0320 authored by David McKay's avatar David McKay Committed by GitHub

Askainet influxdb2 ingress (#212)

* influxdb2: make service port configurable * influxdb2: remove mismatching label from service * influxdb2: add ingress * fix: version bump * fix: version bump Co-authored-by: 's avatarIvan Lopez <ivan@askai.net>
parent ae821712
......@@ -5,7 +5,7 @@ name: influxdb2
description: A Helm chart for InfluxDB v2
home: https://www.influxdata.com/products/influxdb-overview/influxdb-2-0/
type: application
version: 1.0.9
version: 1.0.10
maintainers:
- name: rawkode
email: rawkode@influxdata.com
......
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: {{ include "influxdb.fullname" . }}
labels:
{{- include "influxdb.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
- hosts:
- {{ .Values.ingress.hostname | quote }}
secretName: {{ .Values.ingress.secretName }}
{{- end }}
rules:
- host: {{ .Values.ingress.hostname }}
http:
paths:
- path: {{ .Values.ingress.path }}
backend:
serviceName: {{ include "influxdb.fullname" . }}
servicePort: http
{{- end -}}
......@@ -34,7 +34,7 @@ spec:
- -c
- |
influx setup -f \
--host http://{{ template "influxdb.fullname" . }} \
--host http://{{ template "influxdb.fullname" . }}:{{ .Values.service.port }} \
-o {{ .Values.adminUser.organization }} \
-b {{ .Values.adminUser.bucket }} \
-u {{ .Values.adminUser.user }} \
......
apiVersion: v1
kind: Service
metadata:
name: {{ template "influxdb.fullname" . }}
labels:
{{- include "influxdb.labels" . | nindent 4 }}
app.kubernetes.io/component: backup
name: { { template "influxdb.fullname" . } }
labels: { { - include "influxdb.labels" . | nindent 4 } }
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8086
protocol: TCP
name: http
selector:
{{- include "influxdb.selectorLabels" . | nindent 4 }}
- port: { { .Values.service.port } }
targetPort: http
protocol: TCP
name: http
selector: { { - include "influxdb.selectorLabels" . | nindent 4 } }
......@@ -53,3 +53,16 @@ persistence:
# storageClass: "-"
accessMode: ReadWriteOnce
size: 50Gi
service:
port: 80
ingress:
enabled: false
tls: false
# secretName: my-tls-cert # only needed if tls above is true
hostname: influxdb.foobar.com
annotations: {}
# kubernetes.io/ingress.class: "nginx"
# kubernetes.io/tls-acme: "true"
path: /
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