Unverified Commit deb3127a authored by Abhimanyu Saharan's avatar Abhimanyu Saharan Committed by GitHub

Added pod disruption budget to Influxdb2 and telegraf (#252)

* Added missing securityContext options * Added engine-path * Bumped up the appVersion to 2.0.3 * Fixed args * Fixed invalid engine-path argument * Added pod disruption budget to Influxdb2 and telegraf * Update Chart.yaml * Bumped up version Co-authored-by: 's avatartimhallinflux <timhallinflux@users.noreply.github.com>
parent deefd9d2
apiVersion: v2
appVersion: 2.0.2
appVersion: 2.0.3
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.14
version: 1.0.15
maintainers:
- name: rawkode
email: rawkode@influxdata.com
......
......@@ -20,6 +20,10 @@ spec:
containers:
- name: {{ template "influxdb.fullname" . }}-create-admin-user
image: "{{ .Values.image.repository }}:v{{ .Chart.AppVersion }}"
{{- if .Values.securityContext }}
securityContext:
{{ toYaml .Values.securityContext | nindent 12 }}
{{- end }}
env:
- name: INFLUXDB_PASSWORD
valueFrom:
......@@ -44,4 +48,8 @@ spec:
-p ${INFLUXDB_PASSWORD} \
-t ${INFLUXDB_TOKEN}
restartPolicy: OnFailure
{{- if .Values.securityContext.runAsGroup }}
securityContext:
fsGroup: {{ .Values.securityContext.runAsGroup }}
{{- end }}
{{- end -}}
{{- if .Values.pdb.create }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "influxdb.fullname" . }}
labels:
{{ include "influxdb.labels" . | nindent 4 }}
spec:
{{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}
{{- end }}
{{- if .Values.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "influxdb.selectorLabels" . | nindent 6 }}
{{- end }}
......@@ -34,6 +34,10 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:v{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- influxd
- --engine-path
- {{ .Values.persistence.mountPath }}
ports:
- name: {{ .Values.service.portName }}
containerPort: 8086
......@@ -52,10 +56,14 @@ spec:
port: http
volumeMounts:
- name: data
mountPath: /root/.influxdbv2
mountPath: {{ .Values.persistence.mountPath }}
resources:
{{ .Values.resources | toYaml | nindent 12 | trim }}
{{- if .Values.securityContext.runAsGroup }}
securityContext:
fsGroup: {{ .Values.securityContext.runAsGroup }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 8 | trim }}
......
......@@ -58,6 +58,7 @@ persistence:
# storageClass: "-"
accessMode: ReadWriteOnce
size: 50Gi
mountPath: /root/.influxdbv2
service:
type: ClusterIP
......@@ -79,3 +80,12 @@ ingress:
# kubernetes.io/ingress.class: "nginx"
# kubernetes.io/tls-acme: "true"
path: /
## Pod disruption budget configuration
##
pdb:
## Specifies whether a Pod disruption budget should be created
##
create: true
minAvailable: 1
# maxUnavailable: 1
apiVersion: v2
name: telegraf
version: 1.7.36
version: 1.7.37
appVersion: 1.17
deprecated: false
description: Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
......
{{- if .Values.pdb.create }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ include "telegraf.fullname" . }}
labels:
{{- include "telegraf.labels" . | nindent 4 }}
spec:
{{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}
{{- end }}
{{- if .Values.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "telegraf.selectorLabels" . | nindent 6 }}
{{- end }}
......@@ -168,3 +168,12 @@ metrics:
# hooks:
# postStart: ["/bin/sh", "-c", "echo Telegraf started"]
# preStop: ["/bin/sh", "-c", "sleep 60"]
## Pod disruption budget configuration
##
pdb:
## Specifies whether a Pod disruption budget should be created
##
create: true
minAvailable: 1
# maxUnavailable: 1
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