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: labels:
{{- include "mail-mta-autoconfig.labels" . | nindent 4 }} {{- include "mail-mta-autoconfig.labels" . | nindent 4 }}
spec: spec:
# generate a random backup time between 1 and 5 AM schedule: "{{ .Values.schedule }}"
schedule: {{ .Values.schedule }}
concurrencyPolicy: Forbid concurrencyPolicy: Forbid
jobTemplate: jobTemplate:
spec: spec:
@ -27,7 +26,17 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
command: [ "python3", "watch.py" ] 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 }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 12 }} {{- toYaml . | nindent 12 }}

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

@ -1,7 +1,7 @@
# Default values for mail-mta-autoconfig. # Default values for mail-mta-autoconfig.
image: image:
repository: porto.interlegis.leg.br/library/mail-mta-autoconfig repository: porto.interlegis.leg.br/seit/mail-mta-autoconfig
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: "" tag: ""
@ -27,8 +27,18 @@ podAnnotations: {}
podSecurityContext: {} podSecurityContext: {}
# fsGroup: 2000 # fsGroup: 2000
# Defaults to midnight # Existing secret name.
schedule: "0 0 * * *" # 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: {} securityContext: {}
# capabilities: # capabilities:

Loading…
Cancel
Save