Browse Source

Add envfile secret to mail-mta-autoconfig

master
Fábio Kaiser Rauber 2 years ago
parent
commit
c972af436a
  1. 15
      charts/mail-mta-autoconfig/v0.1.0/templates/cronjob.yaml
  2. 16
      charts/mail-mta-autoconfig/v0.1.0/values.yaml

15
charts/mail-mta-autoconfig/v0.1.0/templates/cronjob.yaml

@ -5,8 +5,7 @@ metadata:
labels:
{{- include "mail-mta-autoconfig.labels" . | nindent 4 }}
spec:
# generate a random backup time between 1 and 5 AM
schedule: {{ .Values.schedule }}
schedule: "{{ .Values.schedule }}"
concurrencyPolicy: Forbid
jobTemplate:
spec:
@ -27,7 +26,17 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: [ "python3", "watch.py" ]
restartPolicy: OnFailure
{{ if .Values.secretName }}
volumeMounts:
- mountPath: "/root/.env"
name: envfile
subPath: .env
readOnly: true
volumes:
- name: envfile
secret:
secretName: {{ .Values.secretName }}
{{ end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 12 }}

16
charts/mail-mta-autoconfig/v0.1.0/values.yaml

@ -1,7 +1,7 @@
# Default values for mail-mta-autoconfig.
image:
repository: porto.interlegis.leg.br/library/mail-mta-autoconfig
repository: porto.interlegis.leg.br/seit/mail-mta-autoconfig
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
@ -27,8 +27,18 @@ podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
# Defaults to midnight
schedule: "0 0 * * *"
# Existing secret name.
# The secret must define the following variables:
# PDNS_API_SERVER=https://pdns.api.url
# PDNS_API_KEY=anapikey
# REDIS_HOST=hostname
# REDIS_DB=3
# REDIS_PASS=agoodredispassword
# DKIM_SELECTOR=dkimselector
secretName: ""
# Defaults to every 5 minutes
schedule: "*/5 * * * *"
securityContext: {}
# capabilities:

Loading…
Cancel
Save