diff --git a/charts/dispatch/Chart.yaml b/charts/dispatch/Chart.yaml index 484c675..7143546 100644 --- a/charts/dispatch/Chart.yaml +++ b/charts/dispatch/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: dispatch description: Netflix Dispatch incident management system -version: 0.5.1 -appVersion: v20240605 +version: 0.5.4 +appVersion: v20240731 maintainers: - name: Tommy Skaug email: tommy@skaug.me diff --git a/charts/dispatch/templates/core-deployment.yaml b/charts/dispatch/templates/core-deployment.yaml index 871c96a..45645ac 100644 --- a/charts/dispatch/templates/core-deployment.yaml +++ b/charts/dispatch/templates/core-deployment.yaml @@ -17,18 +17,20 @@ spec: spec: initContainers: - name: db-init - image: "{{ .Values.initContainers.dbInit.image.repository }}:{{ .Values.initContainers.dbInit.image.tag }}" + image: "{{ .Values.initContainers.dbInit.image.registry }}:{{ .Values.initContainers.dbInit.image.tag }}" envFrom: - secretRef: name: {{ .Values.postgres.secretName }} + {{ if ne .Values.image.pullSecret "" }} + imagePullSecrets: + - name: "{{ .Values.image.pullSecret }}" + {{ end }} containers: - {{ if ne .Values.image.pullSecret "" }} - imagePullSecrets: - - name: "{{ .Values.image.pullSecret }}" - {{ end }} - name: core - image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- with .Values.image }} + image: "{{ coalesce $.Values.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}" + imagePullPolicy: {{ coalesce $.Values.image.pullPolicy .pullPolicy }} + {{- end }} env: - name: MJML_PATH value: /node_modules/.bin diff --git a/charts/dispatch/templates/dispatch-db-init.yaml b/charts/dispatch/templates/dispatch-db-init.yaml index ed86cbf..16ca6de 100644 --- a/charts/dispatch/templates/dispatch-db-init.yaml +++ b/charts/dispatch/templates/dispatch-db-init.yaml @@ -11,18 +11,21 @@ spec: template: spec: restartPolicy: Never + {{ if ne .Values.image.pullSecret "" }} + imagePullSecrets: + - name: "{{ .Values.image.pullSecret }}" + {{ end }} containers: - {{ if ne .Values.image.pullSecret "" }} - imagePullSecrets: - - name: "{{ .Values.image.pullSecret }}" - {{ end }} - name: general-db-init image: "{{ .Values.initContainers.dbInit.image.repository }}:{{ .Values.initContainers.dbInit.image.tag }}" envFrom: - secretRef: name: {{ .Values.postgres.secretName }} - name: dispatch-db-init - image: "{{ .Values.initContainers.dbInit.image.repository }}:{{ .Values.initContainers.dbInit.image.tag }}" + {{- with .Values.image }} + image: "{{ coalesce $.Values.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}" + imagePullPolicy: {{ coalesce $.Values.image.pullPolicy .pullPolicy }} + {{- end }} command: ["dispatch", "database", "init"] env: &dispatchEnv - name: MJML_PATH diff --git a/charts/dispatch/templates/scheduler-deployment.yaml b/charts/dispatch/templates/scheduler-deployment.yaml index 75c2253..2f0a7d8 100644 --- a/charts/dispatch/templates/scheduler-deployment.yaml +++ b/charts/dispatch/templates/scheduler-deployment.yaml @@ -15,14 +15,16 @@ spec: labels: app: {{ include "dispatch.fullname" . }}-scheduler spec: + {{ if ne .Values.image.pullSecret "" }} + imagePullSecrets: + - name: "{{ .Values.image.pullSecret }}" + {{ end }} containers: - {{ if ne .Values.image.pullSecret "" }} - imagePullSecrets: - - name: "{{ .Values.image.pullSecret }}" - {{ end }} - name: scheduler - image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- with .Values.image }} + image: "{{ coalesce $.Values.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}" + imagePullPolicy: {{ coalesce $.Values.image.pullPolicy .pullPolicy }} + {{- end }} command: ["dispatch", "scheduler", "start"] env: - name: MJML_PATH diff --git a/charts/dispatch/templates/web-deployment.yaml b/charts/dispatch/templates/web-deployment.yaml index a31288d..8126ea1 100644 --- a/charts/dispatch/templates/web-deployment.yaml +++ b/charts/dispatch/templates/web-deployment.yaml @@ -17,7 +17,10 @@ spec: spec: initContainers: - name: web-db-upgrade - image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" + {{- with .Values.image }} + image: "{{ coalesce $.Values.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}" + imagePullPolicy: {{ coalesce $.Values.image.pullPolicy .pullPolicy }} + {{- end }} command: ["dispatch", "database", "upgrade"] env: &dispatchEnv - name: MJML_PATH @@ -41,19 +44,24 @@ spec: name: {{ .Values.envFromSecret }} - name: web-plugin-install - image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" + {{- with .Values.image }} + image: "{{ coalesce $.Values.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}" + imagePullPolicy: {{ coalesce $.Values.image.pullPolicy .pullPolicy }} + {{- end }} command: ["dispatch", "plugins", "install"] env: *dispatchEnv envFrom: *envFrom + {{ if ne .Values.image.pullSecret "" }} + imagePullSecrets: + - name: "{{ .Values.image.pullSecret }}" + {{ end }} containers: - {{ if ne .Values.image.pullSecret "" }} - imagePullSecrets: - - name: "{{ .Values.image.pullSecret }}" - {{ end }} - name: web - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- with .Values.image }} + image: "{{ coalesce $.Values.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}" + imagePullPolicy: {{ coalesce $.Values.image.pullPolicy .pullPolicy }} + {{- end }} command: ["dispatch", "server", "start", "dispatch.main:app", "--host=0.0.0.0"] ports: - containerPort: 8000 diff --git a/charts/dispatch/values.yaml b/charts/dispatch/values.yaml index b2cf3df..b1de1dd 100644 --- a/charts/dispatch/values.yaml +++ b/charts/dispatch/values.yaml @@ -1,9 +1,11 @@ envFromSecret: dispatch-secret image: - repository: ghcr.io/tommy-skaug/dispatch - pullPolicy: Always - pullSecret: dispatch-pull-secret + registry: code.252.no + repository: elk-works/dispatch + tag: v20240731@sha256:e6c916d8bb6e02e7e23473229f3aa7643bcd00de5f59553794573a4a4737a635 + pullPolicy: IfNotPresent + pullSecret: "" initContainers: dbInit: