diff --git a/charts/pontoon/Chart.yaml b/charts/pontoon/Chart.yaml index 6f3629a..9601a5f 100644 --- a/charts/pontoon/Chart.yaml +++ b/charts/pontoon/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: pontoon home: https://github.com/mozilla/pontoon -version: 1.1.1 +version: 1.2.0 # Pontoon no longer cuts releases. # See https://github.com/mozilla/pontoon/releases/tag/2018-12-19 # and https://hub.docker.com/r/skillsnetwork/pontoon/tags diff --git a/charts/pontoon/templates/pontoon-sync-projects-cronjob.yaml b/charts/pontoon/templates/pontoon-sync-projects-cronjob.yaml index 58a99df..6b509f3 100644 --- a/charts/pontoon/templates/pontoon-sync-projects-cronjob.yaml +++ b/charts/pontoon/templates/pontoon-sync-projects-cronjob.yaml @@ -21,6 +21,10 @@ spec: heritage: {{ .Release.Service }} release: {{ .Release.Name }} component: "pontoon-sync-projects-cronjob" + annotations: + {{- range $key, $value := .Values.syncProjectCronjob.podAnnotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} spec: template: spec: @@ -30,7 +34,7 @@ spec: {{- end }} serviceAccountName: {{ include "pontoon.serviceAccountName" . }} securityContext: - {{- toYaml .Values.podSecurityContext | nindent 12 }} + {{- toYaml .Values.syncProjectCronjob.podSecurityContext | nindent 12 }} restartPolicy: OnFailure {{- if or .Values.ssh.config .Values.ssh.privateKeys }} initContainers: @@ -50,7 +54,7 @@ spec: containers: - name: sync-projects securityContext: - {{- toYaml .Values.securityContext | nindent 16 }} + {{- toYaml .Values.syncProjectCronjob.securityContext | nindent 16 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: ["python"] @@ -99,15 +103,15 @@ spec: - name: "dummy-volume" emptyDir: {} {{- end }} - {{- with .Values.nodeSelector }} + {{- with .Values.syncProjectCronjob.nodeSelector }} nodeSelector: {{- toYaml . | nindent 12 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.syncProjectCronjob.affinity }} affinity: {{- toYaml . | nindent 12 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.syncProjectCronjob.tolerations }} tolerations: {{- toYaml . | nindent 12 }} {{- end }} diff --git a/charts/pontoon/templates/pontoon-worker-deployment.yaml b/charts/pontoon/templates/pontoon-worker-deployment.yaml index bd49bf8..ebee22e 100644 --- a/charts/pontoon/templates/pontoon-worker-deployment.yaml +++ b/charts/pontoon/templates/pontoon-worker-deployment.yaml @@ -25,9 +25,9 @@ spec: checksum/pontoon-secrets: {{ include (print $.Template.BasePath "/pontoon-secrets.yaml") . | sha256sum }} checksum/pontoon-ssh-secrets: {{ include (print $.Template.BasePath "/pontoon-ssh-secrets.yaml") . | sha256sum }} checksum/pontoon-settings: {{ include (print $.Template.BasePath "/pontoon-settings-configmap.yaml") . | sha256sum }} - {{- range $key, $value := .Values.podAnnotations }} + {{- range $key, $value := .Values.worker.podAnnotations }} {{ $key }}: {{ $value | quote }} - {{- end }} + {{- end }} labels: app: {{ include "pontoon.fullname" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} @@ -41,7 +41,7 @@ spec: {{- end }} serviceAccountName: {{ include "pontoon.serviceAccountName" . }} securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- toYaml .Values.worker.podSecurityContext | nindent 8 }} {{- if or .Values.ssh.config .Values.ssh.privateKeys }} initContainers: - name: copy-ssh-secrets @@ -60,13 +60,13 @@ spec: containers: - name: pontoon-worker securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} + {{- toYaml .Values.worker.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: ["celery"] args: {{- toYaml .Values.worker.celeryArgs | nindent 12 }} resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml .Values.worker.resources | nindent 12 }} envFrom: - secretRef: name: "{{ include "pontoon.fullname" . }}-secrets" @@ -107,15 +107,15 @@ spec: - name: "dummy-volume" emptyDir: {} {{- end }} - {{- with .Values.nodeSelector }} + {{- with .Values.worker.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.worker.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.worker.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/pontoon/values.yaml b/charts/pontoon/values.yaml index 027a3a3..22bdc25 100644 --- a/charts/pontoon/values.yaml +++ b/charts/pontoon/values.yaml @@ -68,6 +68,13 @@ worker: - "--without-gossip" - "--without-mingle" - "--without-heartbeat" + podAnnotations: {} + resources: {} + nodeSelector: {} + tolerations: [] + affinity: {} + podSecurityContext: {} + securityContext: {} autoscaling: enabled: false minReplicas: 1 @@ -81,7 +88,13 @@ syncProjectCronjob: suspend: false successfulJobsHistoryLimit: 10 failedJobsHistoryLimit: 10 + podAnnotations: {} resources: {} + nodeSelector: {} + tolerations: [] + affinity: {} + podSecurityContext: {} + securityContext: {} # Configuration values for the postgres dependency # ref: https://github.com/bitnami/charts/blob/master/bitnami/postgresql/README.md