mirror of
https://github.com/nikdoof/helm-charts.git
synced 2025-12-13 13:32:16 +00:00
99 lines
3.7 KiB
YAML
99 lines
3.7 KiB
YAML
---
|
|
apiVersion: batch/v1beta1
|
|
kind: CronJob
|
|
metadata:
|
|
name: {{ include "vsphere-influxdb-go.fullname" . }}-cronjob
|
|
{{- if .Values.deploymentAnnotations }}
|
|
annotations:
|
|
{{- range $key, $value := .Values.deploymentAnnotations }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "vsphere-influxdb-go.name" . }}
|
|
helm.sh/chart: {{ include "vsphere-influxdb-go.chart" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ include "vsphere-influxdb-go.name" . }}
|
|
spec:
|
|
schedule: {{ .Values.cronjob.schedule | quote }}
|
|
successfulJobsHistoryLimit: {{ .Values.cronjob.successfulJobsHistoryLimit }}
|
|
failedJobsHistoryLimit: {{ .Values.cronjob.failedJobsHistoryLimit }}
|
|
concurrencyPolicy: Forbid
|
|
{{- if .Values.cronjob.startingDeadlineSeconds }}
|
|
startingDeadlineSeconds: {{ .Values.cronjob.startingDeadlineSeconds }}
|
|
{{- end }}
|
|
jobTemplate:
|
|
spec:
|
|
backoffLimit: 0
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "vsphere-influxdb-go.name" . }}
|
|
helm.sh/chart: {{ include "vsphere-influxdb-go.chart" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ include "vsphere-influxdb-go.name" . }}
|
|
spec:
|
|
restartPolicy: Never
|
|
{{- if .Values.image.pullSecrets }}
|
|
imagePullSecrets:
|
|
{{- range .Values.image.pullSecrets }}
|
|
- name: {{ . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
command: ["/vsphere-influxdb-go", "-config=/config/config.json"]
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
resources:
|
|
{{ toYaml .Values.resources | indent 16 }}
|
|
env:
|
|
- name: VSPHERE_HOSTNAME
|
|
value: {{ .Values.vsphere.hostname }}
|
|
- name: VSPHERE_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ default "vsphere-influxdb-go-secret" .Values.existingSecretName }}
|
|
key: vsphere.username
|
|
- name: VSPHERE_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ default "vsphere-influxdb-go-secret" .Values.existingSecretName }}
|
|
key: vsphere.password
|
|
- name: INFLUX_HOSTNAME
|
|
value: {{ .Values.influxdb.hostname }}
|
|
- name: INFLUX_DATABASE
|
|
value: {{ .Values.influxdb.database }}
|
|
{{- if .Values.influxdb.authenticated }}
|
|
- name: INFLUX_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ default "vsphere-influxdb-go-secret" .Values.existingSecretName }}
|
|
key: influxdb.username
|
|
- name: INFLUX_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ default "vsphere-influxdb-go-secret" .Values.existingSecretName }}
|
|
key: influxdb.password
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: config-volume
|
|
mountPath: /config
|
|
volumes:
|
|
- name: config-volume
|
|
configMap:
|
|
name: vsphere-influxdb-go-config
|
|
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml . | indent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{ toYaml . | indent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{ toYaml . | indent 12 }}:
|
|
{{- end }}
|