From c961ac97604f6ec1a495127b185906939e2e5c78 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Mon, 17 Jan 2022 04:22:38 +0530 Subject: [PATCH 1/4] chore(helm): clickhouse env variable Signed-off-by: Rajesh Rajendran --- scripts/helmcharts/openreplay/charts/db/values.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/helmcharts/openreplay/charts/db/values.yaml b/scripts/helmcharts/openreplay/charts/db/values.yaml index 77acb5a80..70c181ce2 100644 --- a/scripts/helmcharts/openreplay/charts/db/values.yaml +++ b/scripts/helmcharts/openreplay/charts/db/values.yaml @@ -75,7 +75,8 @@ autoscaling: targetCPUUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80 -env: {} +env: + CLICKHOUSE_STRING: tcp://clickhouse.db.svc.cluster.local:9000/default nodeSelector: {} From 28d3d3b3fa70da1619cf93a849f1f5932fb13668 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Mon, 17 Jan 2022 04:27:10 +0530 Subject: [PATCH 2/4] chore(helm): chalice EE key Signed-off-by: Rajesh Rajendran --- .../openreplay/charts/chalice/templates/deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml index ab68e07b7..41df5e2f5 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml @@ -38,6 +38,8 @@ spec: {{- end }} imagePullPolicy: {{ .Values.image.pullPolicy }} env: + - name: LICENSE_KEY + value: '{{ .Values.global.enterpriseEditionLicense }}' - name: version_number value: '{{ .Chart.AppVersion }}' - name: pg_host From d9d338f23c0e6e910d27f97f9221dea8fda1727c Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Mon, 17 Jan 2022 04:30:53 +0530 Subject: [PATCH 3/4] chore(cli): making variable optional Signed-off-by: Rajesh Rajendran --- scripts/helm/openreplay-cli | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/helm/openreplay-cli b/scripts/helm/openreplay-cli index 6fa9472f6..b9db53b6c 100755 --- a/scripts/helm/openreplay-cli +++ b/scripts/helm/openreplay-cli @@ -109,7 +109,7 @@ legacyInstall() { } helmInstall() { - helm upgrade --install openreplay openreplay -f vars.yaml + helm upgrade --install openreplay -n app openreplay -f vars.yaml } upgrade() { @@ -127,7 +127,7 @@ status() { [[ $# -eq 0 ]] && usage && exit 1 -PARSED_ARGUMENTS=$(color getopt -a -n openreplay-cli -o vhds:S:l:r:i:I: --long verbose,help,status,start:,stop:,logs:,restart:,legacy-install:,helm-install: -- "$@") +PARSED_ARGUMENTS=$(color getopt -a -n openreplay-cli -o vhds:S:l:r:i:I --long verbose,help,status,start:,stop:,logs:,restart:,legacy-install:,helm-install -- "$@") VALID_ARGUMENTS=$? if [[ "$VALID_ARGUMENTS" != "0" ]]; then usage @@ -140,12 +140,12 @@ do -v | --verbose) VERBOSE=1 ; shift ;; -h | --help) usage ; shift ;; -d | --status) status ; shift ;; + -I | --helm-install) helmInstall; shift ;; -s | --stop) stop $2 ; shift 2 ;; -S | --start) start $2 ; shift 2 ;; -l | --logs) logs "$2" ; shift 2 ;; -r | --restart) restart "$2" ; shift 2 ;; -i | --legacy-install) legacyInstall "$2" ; shift 2 ;; - -I | --helm-install) helmInstall "$2" ; shift 2 ;; # -- means the end of the arguments; drop this, and break out of the while loop --) shift; break ;; # If invalid options were passed, then getopt should have reported an error, From b2bedd39237296d68140df9abb02651176712612 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Mon, 17 Jan 2022 04:33:47 +0530 Subject: [PATCH 4/4] chore(helm): fix variable precidence Signed-off-by: Rajesh Rajendran --- scripts/helmcharts/openreplay/templates/job.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/helmcharts/openreplay/templates/job.yaml b/scripts/helmcharts/openreplay/templates/job.yaml index aa1b4467d..88962a624 100644 --- a/scripts/helmcharts/openreplay/templates/job.yaml +++ b/scripts/helmcharts/openreplay/templates/job.yaml @@ -123,7 +123,7 @@ spec: - name: KAFKA_SSL value: "{{ .Values.global.kafka.kafkaUseSsl }}" - name: PREVIOUS_APP_VERSION - value: "{{ .Values.global.fromVersion }}" + value: "{{ .Values.fromVersion }}" - name: CHART_APP_VERSION value: "{{ .Chart.AppVersion }}" command: