From b8552faa8e4ccefcd927c1e19fa4daa45ef5bf6b Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov Date: Fri, 18 Nov 2022 19:08:19 +0300 Subject: [PATCH] Add imagePullPolicy into Helm chart (#5313) Co-authored-by: dalli --- helm-chart/Chart.yaml | 2 +- helm-chart/templates/cvat_backend/utils/deployment.yml | 1 + helm-chart/templates/cvat_frontend/deployment.yml | 3 ++- helm-chart/templates/cvat_opa/deployment.yml | 1 + helm-chart/values.yaml | 3 +++ supervisord/all.conf | 2 +- 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml index 50cb09a0..09874e73 100644 --- a/helm-chart/Chart.yaml +++ b/helm-chart/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.3 +version: 0.4.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/helm-chart/templates/cvat_backend/utils/deployment.yml b/helm-chart/templates/cvat_backend/utils/deployment.yml index 7aa4f5e6..64c15733 100644 --- a/helm-chart/templates/cvat_backend/utils/deployment.yml +++ b/helm-chart/templates/cvat_backend/utils/deployment.yml @@ -46,6 +46,7 @@ spec: containers: - name: cvat-app-backend-utils-container image: {{ .Values.cvat.backend.image }}:{{ .Values.cvat.backend.tag }} + imagePullPolicy: {{ .Values.cvat.backend.imagepullpolicy }} {{- with .Values.cvat.backend.utils.resources }} resources: {{- toYaml . | nindent 12 }} diff --git a/helm-chart/templates/cvat_frontend/deployment.yml b/helm-chart/templates/cvat_frontend/deployment.yml index a7b5648a..35528207 100644 --- a/helm-chart/templates/cvat_frontend/deployment.yml +++ b/helm-chart/templates/cvat_frontend/deployment.yml @@ -33,6 +33,7 @@ spec: containers: - name: cvat-frontend-app-container image: {{ .Values.cvat.frontend.image }}:{{ .Values.cvat.frontend.tag }} + imagePullPolicy: {{ .Values.cvat.frontend.imagepullpolicy }} {{- with .Values.cvat.frontend.resources }} resources: {{- toYaml . | nindent 12 }} @@ -62,4 +63,4 @@ spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/helm-chart/templates/cvat_opa/deployment.yml b/helm-chart/templates/cvat_opa/deployment.yml index 4ba8e840..fcaa08d7 100644 --- a/helm-chart/templates/cvat_opa/deployment.yml +++ b/helm-chart/templates/cvat_opa/deployment.yml @@ -33,6 +33,7 @@ spec: containers: - name: cvat-opa-app-container image: {{ .Values.cvat.opa.image }}:{{ .Values.cvat.opa.tag }} + imagePullPolicy: {{ .Values.cvat.opa.imagepullpolicy }} args: - run - --server diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index cb0fd121..db9395b1 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -75,6 +75,7 @@ cvat: replicas: 1 image: cvat/server tag: dev + imagepullploicy: IfNotPresent permissionFix: enabled: true service: @@ -94,6 +95,7 @@ cvat: replicas: 1 image: cvat/ui tag: dev + imagepullploicy: IfNotPresent labels: {} # test: test annotations: {} @@ -136,6 +138,7 @@ cvat: replicas: 1 image: openpolicyagent/opa tag: 0.34.2-rootless + imagepullploicy: IfNotPresent labels: {} # test: test annotations: {} diff --git a/supervisord/all.conf b/supervisord/all.conf index 2c89006d..76e93c87 100644 --- a/supervisord/all.conf +++ b/supervisord/all.conf @@ -64,7 +64,7 @@ numprocs=1 ; apps are dynamically loaded by an environment variable. It can lead to issues ; with docker cache. Thus it is necessary to run collectstatic here for such ; apps. -command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_POSTGRES_HOST)s:5432 -t 0 -- bash -ic \ +command=%(ENV_HOME)s/wait-for-it.sh %(ENV_CVAT_POSTGRES_HOST)s:%(ENV_CVAT_POSTGRES_PORT)% -t 0 -- bash -ic \ "rm -f /tmp/cvat-server/httpd.pid && python3 ~/manage.py migrate && \ python3 ~/manage.py collectstatic --no-input && \ exec python3 $HOME/manage.py runmodwsgi --log-to-terminal --port 8080 \