From a07c887bc3981ef423d28349a20cf5733039d5e9 Mon Sep 17 00:00:00 2001 From: Tim Collins <45351296+tico24@users.noreply.github.com> Date: Mon, 11 Jan 2021 22:49:15 +0000 Subject: [PATCH] Allow dynamic port binding for dashboard (#5) * Allow dynamic port binding for dashboard * Fix kind k8s version to 1.18 * Further instances where the service port should be set if it's to be properly dynamic Co-authored-by: tim-sendible --- .github/workflows/lint-test.yml | 2 +- charts/sorry-cypress/Chart.yaml | 2 +- charts/sorry-cypress/templates/deployment-dashboard.yml | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index 7e5414e..bb6dffe 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -43,7 +43,7 @@ jobs: - name: Create kind cluster uses: helm/kind-action@v1.1.0 with: - install_local_path_provisioner: true + node_image: kindest/node:v1.18.8 if: steps.list-changed.outputs.changed == 'true' - name: Run chart-testing (install) diff --git a/charts/sorry-cypress/Chart.yaml b/charts/sorry-cypress/Chart.yaml index b36fcaa..07dc8f8 100644 --- a/charts/sorry-cypress/Chart.yaml +++ b/charts/sorry-cypress/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: sorry-cypress description: A Helm chart for Sorry Cypress type: application -version: 0.1.6 +version: 0.1.7 appVersion: 0.6.1 home: https://sorry-cypress.dev/ sources: diff --git a/charts/sorry-cypress/templates/deployment-dashboard.yml b/charts/sorry-cypress/templates/deployment-dashboard.yml index c6961e1..300a56d 100644 --- a/charts/sorry-cypress/templates/deployment-dashboard.yml +++ b/charts/sorry-cypress/templates/deployment-dashboard.yml @@ -25,15 +25,17 @@ spec: - name: CI_URL value: {{ .Values.dashboard.environmentVariables.ciUrl | quote }} {{- end }} + - name: PORT + value: "{{ .Values.dashboard.service.port }}" image: "{{ .Values.dashboard.image.repository }}:{{ .Values.dashboard.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.dashboard.image.pullPolicy }} name: {{ include "sorry-cypress-helm.fullname" . }}-dashboard ports: - - containerPort: 8080 + - containerPort: {{ .Values.dashboard.service.port }} readinessProbe: httpGet: path: / - port: 8080 + port: {{ .Values.dashboard.service.port }} periodSeconds: 10 timeoutSeconds: 5 successThreshold: 2