diff --git a/.github/workflows/helm-build-push.yml b/.github/workflows/helm-build-push.yml index 499025a7fc1..5af94051a5d 100644 --- a/.github/workflows/helm-build-push.yml +++ b/.github/workflows/helm-build-push.yml @@ -19,16 +19,21 @@ jobs: with: fetch-depth: 0 - # We publish our 'release' Semver tags as X.Y.Z-stackhpc.[1-9]+ - # so if main branch chart version doesn't match this then abort - - name: Fail on dev chart version - run: yq .version deployment/helm/Chart.yaml | grep "\-stackhpc.[0-9]\+$" + - name: Fail on semver pre-release chart version + run: yq .version deployment/helm/Chart.yaml | grep -v '[a-zA-Z-]' if: ${{ github.ref_name == 'main'}} - # Stable 'release' image tags should be of the form "v-stackhpc.X" - - name: Fail on dev image version - run: yq .appVersion deployment/helm/Chart.yaml | grep "^v[0-9]" | grep "\-stackhpc.[0-9]\+$" - if: ${{ github.ref_name == 'main'}} + - name: Fail if image tags don't exist + run: >- + curl -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" + https://ghcr.io/v2/stackhpc/danswer/danswer-backend/tags/list + | jq .tags + | grep $( yq .appVersion deployment/helm/Chart.yaml )-$( yq .tagSuffix deployment/helm/values.yaml ) + && + curl -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" + https://ghcr.io/v2/stackhpc/danswer/danswer-web-server/tags/list + | jq .tags + | grep $( yq .appVersion deployment/helm/Chart.yaml )-$( yq .tagSuffix deployment/helm/values.yaml ) - name: Configure Git run: | diff --git a/deployment/helm/Chart.yaml b/deployment/helm/Chart.yaml index c0c47496ab2..246390ccb84 100644 --- a/deployment/helm/Chart.yaml +++ b/deployment/helm/Chart.yaml @@ -5,18 +5,8 @@ home: https://www.danswer.ai/ sources: - "https://github.com/danswer-ai/danswer" type: application -version: 0.5.10-stackhpc.1 -appVersion: v0.5.10-stackhpc.1 -annotations: - category: Productivity - licenses: MIT - images: | - - name: webserver - image: docker.io/danswer/danswer-web-server:latest - - name: background - image: docker.io/danswer/danswer-backend:latest - - name: vespa - image: vespaengine/vespa:8.277.17 +version: 0.1.0 +appVersion: v0.5.10 dependencies: - name: postgresql version: 14.3.1 diff --git a/deployment/helm/templates/api-deployment.yaml b/deployment/helm/templates/api-deployment.yaml index a10932807b8..f607da4783d 100644 --- a/deployment/helm/templates/api-deployment.yaml +++ b/deployment/helm/templates/api-deployment.yaml @@ -37,7 +37,7 @@ spec: - name: api-server securityContext: {{- toYaml .Values.api.securityContext | nindent 12 }} - image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default .Values.appVersionOverride | default .Chart.AppVersion }}" + image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default .Values.appVersionOverride | default .Chart.AppVersion }}-{{ .Values.tagSuffix }}" imagePullPolicy: {{ .Values.api.image.pullPolicy }} command: - "/bin/sh" diff --git a/deployment/helm/templates/webserver-deployment.yaml b/deployment/helm/templates/webserver-deployment.yaml index a50e4e79b7e..af99247cee2 100644 --- a/deployment/helm/templates/webserver-deployment.yaml +++ b/deployment/helm/templates/webserver-deployment.yaml @@ -37,7 +37,7 @@ spec: - name: web-server securityContext: {{- toYaml .Values.webserver.securityContext | nindent 12 }} - image: "{{ .Values.webserver.image.repository }}:{{ .Values.webserver.image.tag | default .Values.appVersionOverride | default .Chart.AppVersion }}" + image: "{{ .Values.webserver.image.repository }}:{{ .Values.webserver.image.tag | default .Values.appVersionOverride | default .Chart.AppVersion }}-{{ .Values.tagSuffix }}" imagePullPolicy: {{ .Values.webserver.image.pullPolicy }} ports: - name: http diff --git a/deployment/helm/values.yaml b/deployment/helm/values.yaml index 9142f5235ee..2dec646b5cf 100644 --- a/deployment/helm/values.yaml +++ b/deployment/helm/values.yaml @@ -7,6 +7,12 @@ nameOverride: "" fullnameOverride: "" appVersionOverride: # e.g "v0.3.93" +# The suffix to add to the backend and web-server image +# tags to refer to downstream image modifications. +# The full image ref will be: +# {{ image-name }}:{{ image-tag or appVersion }}-{{ tagSuffix }} +tagSuffix: stackhpc.1 + inferenceCapability: service: name: inference-model-server-service