diff --git a/charts/mail-mta-autoconfig/v0.1.0/templates/cronjob.yaml b/charts/mail-mta-autoconfig/v0.1.0/templates/cronjob.yaml index 62647ec..643c43e 100644 --- a/charts/mail-mta-autoconfig/v0.1.0/templates/cronjob.yaml +++ b/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 }} diff --git a/charts/mail-mta-autoconfig/v0.1.0/values.yaml b/charts/mail-mta-autoconfig/v0.1.0/values.yaml index 4767d34..4f2dc82 100644 --- a/charts/mail-mta-autoconfig/v0.1.0/values.yaml +++ b/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: