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 ...@@ -5,7 +5,7 @@ name: influxdb2
description: A Helm chart for InfluxDB v2 description: A Helm chart for InfluxDB v2
home: https://www.influxdata.com/products/influxdb-overview/influxdb-2-0/ home: https://www.influxdata.com/products/influxdb-overview/influxdb-2-0/
type: application type: application
version: 1.0.9 version: 1.0.10
maintainers: maintainers:
- name: rawkode - name: rawkode
email: rawkode@influxdata.com 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: ...@@ -34,7 +34,7 @@ spec:
- -c - -c
- | - |
influx setup -f \ influx setup -f \
--host http://{{ template "influxdb.fullname" . }} \ --host http://{{ template "influxdb.fullname" . }}:{{ .Values.service.port }} \
-o {{ .Values.adminUser.organization }} \ -o {{ .Values.adminUser.organization }} \
-b {{ .Values.adminUser.bucket }} \ -b {{ .Values.adminUser.bucket }} \
-u {{ .Values.adminUser.user }} \ -u {{ .Values.adminUser.user }} \
......
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ template "influxdb.fullname" . }} name: { { template "influxdb.fullname" . } }
labels: labels: { { - include "influxdb.labels" . | nindent 4 } }
{{- include "influxdb.labels" . | nindent 4 }}
app.kubernetes.io/component: backup
spec: spec:
type: ClusterIP type: ClusterIP
ports: ports:
- port: 80 - port: { { .Values.service.port } }
targetPort: 8086 targetPort: http
protocol: TCP protocol: TCP
name: http name: http
selector: selector: { { - include "influxdb.selectorLabels" . | nindent 4 } }
{{- include "influxdb.selectorLabels" . | nindent 4 }}
...@@ -53,3 +53,16 @@ persistence: ...@@ -53,3 +53,16 @@ persistence:
# storageClass: "-" # storageClass: "-"
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
size: 50Gi 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