diff --git a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml index 463d0cc8e..2635bc58a 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml @@ -148,7 +148,7 @@ spec: {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} - {{- if eq .Values.pvc.name "hostPath" }} + {{- if eq (tpl .Values.pvc.name . ) "hostPath" }} volumes: - name: datadir hostPath: @@ -162,7 +162,7 @@ spec: volumes: - name: datadir persistentVolumeClaim: - claimName: {{ .Values.pvc.name }} + claimName: "{{ tpl .Values.pvc.name . }}" {{- with .Values.persistence.volumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/chalice/values.yaml b/scripts/helmcharts/openreplay/charts/chalice/values.yaml index 801dd26f7..3269aa503 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/values.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/values.yaml @@ -133,7 +133,7 @@ pvc: # In case of pvc, you'll have to provide the pvc name. # For example # name: openreplay-efs - name: hostPath + name: "{{ .Values.global.pvcRWXName }}" hostMountPath: /openreplay/storage/nfs persistence: {} diff --git a/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml index 257af0d1a..7381541a1 100644 --- a/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml @@ -89,7 +89,7 @@ spec: {{- with .Values.persistence.mounts }} {{- toYaml . | nindent 10 }} {{- end }} - {{- if eq .Values.pvc.name "hostPath" }} + {{- if eq (tpl .Values.pvc.name . ) "hostPath" }} volumes: - name: datadir hostPath: @@ -104,7 +104,7 @@ spec: volumes: - name: datadir persistentVolumeClaim: - claimName: {{ .Values.pvc.name }} + claimName: "{{ tpl .Values.pvc.name . }}" {{- include "openreplay.volume.redis_ca_certificate" .Values.global.redis | nindent 6 }} {{- with .Values.persistence.volumes }} {{- toYaml . | nindent 8 }} diff --git a/scripts/helmcharts/openreplay/charts/sink/values.yaml b/scripts/helmcharts/openreplay/charts/sink/values.yaml index 23ea52025..bdf9b824b 100644 --- a/scripts/helmcharts/openreplay/charts/sink/values.yaml +++ b/scripts/helmcharts/openreplay/charts/sink/values.yaml @@ -102,7 +102,7 @@ pvc: # In case of pvc, you'll have to provide the pvc name. # For example # name: openreplay-efs - name: hostPath + name: "{{ .Values.global.pvcRWXName }}" hostMountPath: /openreplay/storage/nfs persistence: {} diff --git a/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml index d20059fdc..9cb2cca22 100644 --- a/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml @@ -97,7 +97,7 @@ spec: {{- with .Values.persistence.mounts }} {{- toYaml . | nindent 10 }} {{- end }} - {{- if eq .Values.pvc.name "hostPath" }} + {{- if eq (tpl .Values.pvc.name . ) "hostPath" }} volumes: {{- with .Values.persistence.volumes }} {{- toYaml . | nindent 6 }} @@ -114,7 +114,7 @@ spec: {{- end }} - name: datadir persistentVolumeClaim: - claimName: {{ .Values.pvc.name }} + claimName: "{{ tpl .Values.pvc.name . }}" {{- end }} {{- include "openreplay.volume.redis_ca_certificate" .Values.global.redis | nindent 6 }} {{- with .Values.nodeSelector }} diff --git a/scripts/helmcharts/openreplay/charts/storage/values.yaml b/scripts/helmcharts/openreplay/charts/storage/values.yaml index 85fa7ea65..7f165aa4b 100644 --- a/scripts/helmcharts/openreplay/charts/storage/values.yaml +++ b/scripts/helmcharts/openreplay/charts/storage/values.yaml @@ -103,7 +103,7 @@ pvc: # In case of pvc, you'll have to provide the pvc name. # For example # name: openreplay-efs - name: hostPath + name: "{{ .Values.global.pvcRWXName }}" hostMountPath: /openreplay/storage/nfs persistence: {} diff --git a/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml b/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml index e88aabe80..c7d790211 100644 --- a/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml +++ b/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml @@ -35,7 +35,7 @@ spec: - mountPath: /mnt/efs name: datadir restartPolicy: Never - {{- if eq .Values.efsCleaner.pvc.name "hostPath" }} + {{- if eq (tpl .Values.efsCleaner.pvc.name . ) "hostPath" }} volumes: - name: datadir hostPath: @@ -46,6 +46,6 @@ spec: volumes: - name: datadir persistentVolumeClaim: - claimName: {{ .Values.efsCleaner.pvc.name }} + claimName: {{ tpl .Values.efsCleaner.pvc.name . }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/utilities/values.yaml b/scripts/helmcharts/openreplay/charts/utilities/values.yaml index 2076f8349..0da3a40fb 100644 --- a/scripts/helmcharts/openreplay/charts/utilities/values.yaml +++ b/scripts/helmcharts/openreplay/charts/utilities/values.yaml @@ -15,7 +15,7 @@ efsCleaner: # In case of pvc, you'll have to provide the pvc name. # For example # name: openreplay-efs - name: hostPath + name: "{{ .Values.global.pvcRWXName }}" hostMountPath: /openreplay/storage/nfs telemetry: diff --git a/scripts/helmcharts/vars.yaml b/scripts/helmcharts/vars.yaml index 410054b9c..f99811bb7 100644 --- a/scripts/helmcharts/vars.yaml +++ b/scripts/helmcharts/vars.yaml @@ -105,6 +105,10 @@ global: # secret key to inject to assist and peers service assistKey: "SetARandomStringHere" assistJWTSecret: "SetARandomStringHere" + # In case of multiple nodes in the kubernetes cluster, + # we'll have to create an RWX PVC for shared components. + # If it's a single node, we'll use hostVolume, which is the default for the community/oss edition. + pvcRWXName: "hostPath" s3: region: "us-east-1" endpoint: "http://minio.db.svc.cluster.local:9000" @@ -128,25 +132,10 @@ global: emailSslKey: '' emailSslCert: '' emailFrom: 'OpenReplay' - enterpriseEditionLicense: "" domainName: "" -# In case of multiple nodes in the kubernetes cluster, -# we'll have to create an RWX PVC for shared components. -# If it's a single node, we'll use hostVolume, which is the default for the community/oss edition. -# Note: PVC names should be the same for sink, storage and chalice. -# sink: -# pvc: -# name: mysharedpersistence -# storage: -# pvc: -# name: mysharedpersistence - chalice: -# Note: PVC name should be the same as above for sink and storage. - # pvc: - # name: mysharedpersistence env: jwt_secret: "SetARandomStringHere" # captcha_server: ''