diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index 57f5a6bb..c541bfac 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -63,7 +63,7 @@ jobs: cd helm-chart helm dependency update cd .. - helm upgrade -n default cvat -i --create-namespace helm-chart -f helm-chart/values.yaml -f tests/values.test.yaml + helm upgrade -n default release-${{ github.run_id }}-${{ github.run_attempt }} -i --create-namespace helm-chart -f helm-chart/values.yaml -f tests/values.test.yaml - name: Update test config run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index def49b26..c77aacc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,6 +86,7 @@ non-ascii paths while adding files from "Connected file share" (issue #4428) - Fixed FBRS serverless function runtime error on images with alpha channel () - Attaching manifest with custom name () - Uploading non-zip annotaion files () +- Broken helm chart - if using custom release name () - Missing source tag in project annotations () ### Security diff --git a/helm-chart/templates/cvat-postgres-secret.yml b/helm-chart/templates/cvat-postgres-secret.yml index 4e8e1274..fcfb6b9f 100644 --- a/helm-chart/templates/cvat-postgres-secret.yml +++ b/helm-chart/templates/cvat-postgres-secret.yml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" namespace: {{ .Release.Namespace }} labels: {{- include "cvat.labels" . | nindent 4 }} diff --git a/helm-chart/templates/cvat-server-secret.yml b/helm-chart/templates/cvat-server-secret.yml index 137bc743..388d073d 100644 --- a/helm-chart/templates/cvat-server-secret.yml +++ b/helm-chart/templates/cvat-server-secret.yml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: - name: "{{ .Release.Name }}-{{ .Values.cvat.backend.server.secret.name }}" + name: "{{ tpl ( .Values.cvat.backend.server.secret.name) . }}" namespace: {{ .Release.Namespace }} type: generic stringData: diff --git a/helm-chart/templates/cvat_backend/cvat_worker_webhooks/deployment.yml b/helm-chart/templates/cvat_backend/cvat_worker_webhooks/deployment.yml index 6bf8a0ab..20e68177 100644 --- a/helm-chart/templates/cvat_backend/cvat_worker_webhooks/deployment.yml +++ b/helm-chart/templates/cvat_backend/cvat_worker_webhooks/deployment.yml @@ -63,22 +63,22 @@ spec: - name: CVAT_POSTGRES_HOST valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-hostname - name: CVAT_POSTGRES_USER valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-username - name: CVAT_POSTGRES_DBNAME valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-database - name: CVAT_POSTGRES_PASSWORD valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-password {{- else }} - name: CVAT_POSTGRES_HOST diff --git a/helm-chart/templates/cvat_backend/server/deployment.yml b/helm-chart/templates/cvat_backend/server/deployment.yml index 13d554db..688400e0 100644 --- a/helm-chart/templates/cvat_backend/server/deployment.yml +++ b/helm-chart/templates/cvat_backend/server/deployment.yml @@ -62,22 +62,22 @@ spec: - name: SOCIAL_AUTH_GOOGLE_CLIENT_ID valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.cvat.backend.server.secret.name }}" + name: "{{ tpl (.Values.cvat.backend.server.secret.name) . }}" key: googleClientId - name: SOCIAL_AUTH_GOOGLE_CLIENT_SECRET valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.cvat.backend.server.secret.name }}" + name: "{{ tpl (.Values.cvat.backend.server.secret.name) . }}" key: googleClientSecret - name: SOCIAL_AUTH_GITHUB_CLIENT_ID valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.cvat.backend.server.secret.name }}" + name: "{{ tpl (.Values.cvat.backend.server.secret.name) . }}" key: githubClientId - name: SOCIAL_AUTH_GITHUB_CLIENT_SECRET valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.cvat.backend.server.secret.name }}" + name: "{{ tpl (.Values.cvat.backend.server.secret.name) . }}" key: googleClientSecret {{- end }} - name: IAM_OPA_BUNDLE @@ -93,22 +93,22 @@ spec: - name: CVAT_POSTGRES_HOST valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-hostname - name: CVAT_POSTGRES_USER valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-username - name: CVAT_POSTGRES_DBNAME valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-database - name: CVAT_POSTGRES_PASSWORD valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-password {{- else }} - name: CVAT_POSTGRES_HOST diff --git a/helm-chart/templates/cvat_backend/utils/deployment.yml b/helm-chart/templates/cvat_backend/utils/deployment.yml index 64c15733..7dd19d7b 100644 --- a/helm-chart/templates/cvat_backend/utils/deployment.yml +++ b/helm-chart/templates/cvat_backend/utils/deployment.yml @@ -64,22 +64,22 @@ spec: - name: CVAT_POSTGRES_HOST valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-hostname - name: CVAT_POSTGRES_USER valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-username - name: CVAT_POSTGRES_DBNAME valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-database - name: CVAT_POSTGRES_PASSWORD valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-password {{- else }} - name: CVAT_POSTGRES_HOST diff --git a/helm-chart/templates/cvat_backend/worker_default/deployment.yml b/helm-chart/templates/cvat_backend/worker_default/deployment.yml index 01d3dbd1..2ab187b5 100644 --- a/helm-chart/templates/cvat_backend/worker_default/deployment.yml +++ b/helm-chart/templates/cvat_backend/worker_default/deployment.yml @@ -63,22 +63,22 @@ spec: - name: CVAT_POSTGRES_HOST valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-hostname - name: CVAT_POSTGRES_USER valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-username - name: CVAT_POSTGRES_DBNAME valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-database - name: CVAT_POSTGRES_PASSWORD valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-password {{- else }} - name: CVAT_POSTGRES_HOST diff --git a/helm-chart/templates/cvat_backend/worker_low/deployment.yml b/helm-chart/templates/cvat_backend/worker_low/deployment.yml index 70f9b577..08ef0340 100644 --- a/helm-chart/templates/cvat_backend/worker_low/deployment.yml +++ b/helm-chart/templates/cvat_backend/worker_low/deployment.yml @@ -63,22 +63,22 @@ spec: - name: CVAT_POSTGRES_HOST valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-hostname - name: CVAT_POSTGRES_USER valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-username - name: CVAT_POSTGRES_DBNAME valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-database - name: CVAT_POSTGRES_PASSWORD valueFrom: secretKeyRef: - name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}" + name: "{{ tpl (.Values.postgresql.secret.name) . }}" key: postgresql-password {{- else }} - name: CVAT_POSTGRES_HOST diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index db9395b1..1a8a8e66 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -22,7 +22,7 @@ cvat: USE_ALLAUTH_SOCIAL_ACCOUNTS: false secret: create: true - name: cvat-server-secret + name: "{{ .Release.Name }}-cvat-server-secret" socialAccountAuthentication: googleClientId: "" googleClientSecret: "" @@ -191,10 +191,10 @@ postgresql: # If not external following config will be applied by default global: postgresql: - existingSecret: cvat-postgres-secret + existingSecret: "{{ .Release.Name }}-postgres-secret" secret: create: true - name: postgres-secret + name: "{{ .Release.Name }}-postgres-secret" password: cvat_postgresql postgres_password: cvat_postgresql_postgres replication_password: cvat_postgresql_replica