diff --git a/charts/testkube-cloud-api/templates/deployment.yaml b/charts/testkube-cloud-api/templates/deployment.yaml index e0e0d7c9a..1c7cc9f69 100644 --- a/charts/testkube-cloud-api/templates/deployment.yaml +++ b/charts/testkube-cloud-api/templates/deployment.yaml @@ -34,7 +34,11 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} + {{ if .Values.global.privateRegistry }} + image: "{{ .Values.global.privateRegistry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + {{ else }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + {{ end }} imagePullPolicy: {{ .Values.image.pullPolicy }} env: - name: ENTERPRISE_MODE diff --git a/charts/testkube-cloud-api/templates/migrations-job.yaml b/charts/testkube-cloud-api/templates/migrations-job.yaml index 329b93668..1c7fef94a 100644 --- a/charts/testkube-cloud-api/templates/migrations-job.yaml +++ b/charts/testkube-cloud-api/templates/migrations-job.yaml @@ -22,7 +22,11 @@ spec: {{- end }} initContainers: - name: wait-for + {{ if .Values.global.privateRegistry }} + image: "{{ .Values.global.privateRegistry}}/mongo:6.0.5-jammy" + {{- else }} image: mongo:6.0.5-jammy + {{- end }} command: - bash - -c @@ -51,7 +55,11 @@ spec: {{- end }} containers: - name: migrations + {{ if .Values.global.privateRegistry }} + image: "{{ .Values.global.privateRegistry}}/{{ .Values.api.migrations.image.repository }}:{{ .Values.image.tag }}" + {{- else }} image: {{ .Values.api.migrations.image.repository }}:{{ .Values.image.tag }} + {{- end }} args: - up env: diff --git a/charts/testkube-cloud-api/templates/minio.yaml b/charts/testkube-cloud-api/templates/minio.yaml index 48f49158d..6e1ed995e 100644 --- a/charts/testkube-cloud-api/templates/minio.yaml +++ b/charts/testkube-cloud-api/templates/minio.yaml @@ -38,7 +38,11 @@ spec: {{- end }} containers: - name: minio + {{ if .Values.global.privateRegistry }} + image: {{ .Values.global.privateRegistry }}/{{ .Values.minio.image.repository }}:{{ .Values.minio.image.tag | quote }} + {{ else }} image: "{{ .Values.minio.image.repository }}:{{ .Values.minio.image.tag }}" + {{ end }} imagePullPolicy: {{ .Values.minio.image.pullPolicy }} args: - server diff --git a/charts/testkube-cloud-api/templates/tests/test-connection.yaml b/charts/testkube-cloud-api/templates/tests/test-connection.yaml index 5ce3c54d0..13dd1677a 100644 --- a/charts/testkube-cloud-api/templates/tests/test-connection.yaml +++ b/charts/testkube-cloud-api/templates/tests/test-connection.yaml @@ -9,7 +9,11 @@ metadata: spec: containers: - name: wget + {{ if .Valuse.global.usePrivateRegistry}} + image: {{ .Values.global.registry.url }}/busybox + {{ else }} image: busybox + {{ end }} command: ['wget'] args: ['{{ include "testkube-cloud-api.fullname" . }}:{{ .Values.service.port }}'] restartPolicy: Never diff --git a/charts/testkube-cloud-ui/templates/deployment.yaml b/charts/testkube-cloud-ui/templates/deployment.yaml index eef5a0da6..ecda4f3a6 100644 --- a/charts/testkube-cloud-ui/templates/deployment.yaml +++ b/charts/testkube-cloud-ui/templates/deployment.yaml @@ -34,7 +34,11 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} + {{ if .Valuse.global.privateRegistry }} + image: "{{ .Values.global.privateRegistry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + {{ else }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + {{ end }} imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http diff --git a/charts/testkube-cloud-ui/templates/tests/test-connection.yaml b/charts/testkube-cloud-ui/templates/tests/test-connection.yaml index 8e58c7024..866b12729 100644 --- a/charts/testkube-cloud-ui/templates/tests/test-connection.yaml +++ b/charts/testkube-cloud-ui/templates/tests/test-connection.yaml @@ -9,7 +9,11 @@ metadata: spec: containers: - name: wget + {{ if .Values.global.privateRegistry }} + image: "{{ .Values.global.privateRegistry }}/busybox" + {{ else }} image: busybox + {{ end }} command: ['wget'] args: ['{{ include "testkube-cloud-ui.fullname" . }}:{{ .Values.service.port }}'] restartPolicy: Never diff --git a/charts/testkube-enterprise/values.yaml b/charts/testkube-enterprise/values.yaml index e23c99416..8959dba25 100644 --- a/charts/testkube-enterprise/values.yaml +++ b/charts/testkube-enterprise/values.yaml @@ -28,6 +28,8 @@ global: certManager: # -- Certificate Issuer ref (only used if `provider` is set to `cert-manager`) issuerRef: "" + # -- PrivateRegistry to use for all images + privateRegistry: # -- Image pull secrets to use for testkube-cloud-api and testkube-cloud-ui imagePullSecrets: [] ingress: