From aca0213fcf9b7c1e920fca740dd0721d78fa8ea4 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Tue, 26 Mar 2024 14:34:21 +0100 Subject: [PATCH] feat(helm): Override the tmp directory path --- .../openreplay/charts/canvas-handler/templates/deployment.yaml | 2 +- scripts/helmcharts/openreplay/charts/canvas-handler/values.yaml | 2 +- .../openreplay/charts/chalice/templates/deployment.yaml | 2 +- scripts/helmcharts/openreplay/charts/chalice/values.yaml | 2 +- .../openreplay/charts/imagestorage/templates/deployment.yaml | 2 +- scripts/helmcharts/openreplay/charts/imagestorage/values.yaml | 2 +- .../helmcharts/openreplay/charts/sink/templates/deployment.yaml | 2 +- scripts/helmcharts/openreplay/charts/sink/values.yaml | 2 +- .../openreplay/charts/storage/templates/deployment.yaml | 2 +- scripts/helmcharts/openreplay/charts/storage/values.yaml | 2 +- .../openreplay/charts/utilities/templates/efs-cron.yaml | 2 +- scripts/helmcharts/openreplay/charts/utilities/values.yaml | 2 +- scripts/helmcharts/openreplay/templates/job.yaml | 2 +- scripts/helmcharts/openreplay/values.yaml | 1 + 14 files changed, 14 insertions(+), 13 deletions(-) diff --git a/scripts/helmcharts/openreplay/charts/canvas-handler/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/canvas-handler/templates/deployment.yaml index f268a081c..2492dddfd 100644 --- a/scripts/helmcharts/openreplay/charts/canvas-handler/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/canvas-handler/templates/deployment.yaml @@ -105,7 +105,7 @@ spec: - name: datadir hostPath: # Ensure the file directory is created. - path: {{ .Values.pvc.hostMountPath }} + path: {{ tpl .Values.pvc.hostMountPath . }} type: DirectoryOrCreate {{- else }} volumes: diff --git a/scripts/helmcharts/openreplay/charts/canvas-handler/values.yaml b/scripts/helmcharts/openreplay/charts/canvas-handler/values.yaml index 776b470ad..152287787 100644 --- a/scripts/helmcharts/openreplay/charts/canvas-handler/values.yaml +++ b/scripts/helmcharts/openreplay/charts/canvas-handler/values.yaml @@ -104,7 +104,7 @@ pvc: # For example # name: openreplay-efs name: "{{ .Values.global.pvcRWXName }}" - hostMountPath: /openreplay/storage/nfs + hostMountPath: "{{ .Values.global.orTmpDir }}" persistence: {} # # Spec of spec.template.spec.containers[*].volumeMounts diff --git a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml index 73e70886a..c236f8d9a 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml @@ -166,7 +166,7 @@ spec: - name: datadir hostPath: # Ensure the file directory is created. - path: {{ .Values.pvc.hostMountPath }} + path: {{ tpl .Values.pvc.hostMountPath . }} type: DirectoryOrCreate {{- with .Values.persistence.volumes }} {{- toYaml . | nindent 6 }} diff --git a/scripts/helmcharts/openreplay/charts/chalice/values.yaml b/scripts/helmcharts/openreplay/charts/chalice/values.yaml index 383f00e06..36aaed3e4 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/values.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/values.yaml @@ -134,7 +134,7 @@ pvc: # For example # name: openreplay-efs name: "{{ .Values.global.pvcRWXName }}" - hostMountPath: /openreplay/storage/nfs + hostMountPath: "{{ .Values.global.orTmpDir }}" persistence: {} # # Spec of spec.template.spec.containers[*].volumeMounts diff --git a/scripts/helmcharts/openreplay/charts/imagestorage/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/imagestorage/templates/deployment.yaml index 747d8232f..ccca25a7d 100644 --- a/scripts/helmcharts/openreplay/charts/imagestorage/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/imagestorage/templates/deployment.yaml @@ -105,7 +105,7 @@ spec: - name: datadir hostPath: # Ensure the file directory is created. - path: {{ .Values.pvc.hostMountPath }} + path: {{ tpl .Values.pvc.hostMountPath . }} type: DirectoryOrCreate {{- else }} volumes: diff --git a/scripts/helmcharts/openreplay/charts/imagestorage/values.yaml b/scripts/helmcharts/openreplay/charts/imagestorage/values.yaml index a247300fe..332409223 100644 --- a/scripts/helmcharts/openreplay/charts/imagestorage/values.yaml +++ b/scripts/helmcharts/openreplay/charts/imagestorage/values.yaml @@ -104,7 +104,7 @@ pvc: # For example # name: openreplay-efs name: "{{ .Values.global.pvcRWXName }}" - hostMountPath: /openreplay/storage/nfs + hostMountPath: "{{ .Values.global.orTmpDir }}" persistence: {} # # Spec of spec.template.spec.containers[*].volumeMounts diff --git a/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml index 9f1329d84..dc28ed493 100644 --- a/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/sink/templates/deployment.yaml @@ -87,7 +87,7 @@ spec: - name: datadir hostPath: # Ensure the file directory is created. - path: {{ .Values.pvc.hostMountPath }} + path: {{ tpl .Values.pvc.hostMountPath . }} type: DirectoryOrCreate {{- include "openreplay.volume.redis_ca_certificate" .Values.global.redis | nindent 6 }} {{- with .Values.persistence.volumes }} diff --git a/scripts/helmcharts/openreplay/charts/sink/values.yaml b/scripts/helmcharts/openreplay/charts/sink/values.yaml index bdf9b824b..c7526ffbf 100644 --- a/scripts/helmcharts/openreplay/charts/sink/values.yaml +++ b/scripts/helmcharts/openreplay/charts/sink/values.yaml @@ -103,7 +103,7 @@ pvc: # For example # name: openreplay-efs name: "{{ .Values.global.pvcRWXName }}" - hostMountPath: /openreplay/storage/nfs + hostMountPath: "{{ .Values.global.orTmpDir }}" persistence: {} # # Spec of spec.template.spec.containers[*].volumeMounts diff --git a/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml index f0850ab11..bc5ea5a9c 100644 --- a/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/storage/templates/deployment.yaml @@ -105,7 +105,7 @@ spec: - name: datadir hostPath: # Ensure the file directory is created. - path: {{ .Values.pvc.hostMountPath }} + path: {{ tpl .Values.pvc.hostMountPath . }} type: DirectoryOrCreate {{- else }} volumes: diff --git a/scripts/helmcharts/openreplay/charts/storage/values.yaml b/scripts/helmcharts/openreplay/charts/storage/values.yaml index 7f165aa4b..471c41dcb 100644 --- a/scripts/helmcharts/openreplay/charts/storage/values.yaml +++ b/scripts/helmcharts/openreplay/charts/storage/values.yaml @@ -104,7 +104,7 @@ pvc: # For example # name: openreplay-efs name: "{{ .Values.global.pvcRWXName }}" - hostMountPath: /openreplay/storage/nfs + hostMountPath: "{{ .Values.global.orTmpDir }}" persistence: {} # # Spec of spec.template.spec.containers[*].volumeMounts diff --git a/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml b/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml index 454ce848e..d859489b5 100644 --- a/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml +++ b/scripts/helmcharts/openreplay/charts/utilities/templates/efs-cron.yaml @@ -48,7 +48,7 @@ spec: - name: datadir hostPath: # Ensure the file directory is created. - path: {{ .Values.efsCleaner.pvc.hostMountPath }} + path: {{ tpl .Values.efsCleaner.pvc.hostMountPath . }} type: DirectoryOrCreate {{- else }} volumes: diff --git a/scripts/helmcharts/openreplay/charts/utilities/values.yaml b/scripts/helmcharts/openreplay/charts/utilities/values.yaml index 76a51ecbe..c3940f0db 100644 --- a/scripts/helmcharts/openreplay/charts/utilities/values.yaml +++ b/scripts/helmcharts/openreplay/charts/utilities/values.yaml @@ -12,7 +12,7 @@ efsCleaner: # For example # name: openreplay-efs name: "{{ .Values.global.pvcRWXName }}" - hostMountPath: /openreplay/storage/nfs + hostMountPath: "{{ .Values.global.orTmpDir }}" telemetry: # https://crontab.guru/#5_12_*_*_* diff --git a/scripts/helmcharts/openreplay/templates/job.yaml b/scripts/helmcharts/openreplay/templates/job.yaml index 7321a0959..a766880a1 100644 --- a/scripts/helmcharts/openreplay/templates/job.yaml +++ b/scripts/helmcharts/openreplay/templates/job.yaml @@ -346,7 +346,7 @@ spec: - name: datadir hostPath: # Ensure the file directory is created. - path: /openreplay/storage/nfs + path: {{.Values.global.orTmpDir}} type: DirectoryOrCreate {{- else }} - name: datadir diff --git a/scripts/helmcharts/openreplay/values.yaml b/scripts/helmcharts/openreplay/values.yaml index 415ba997d..a4273492c 100644 --- a/scripts/helmcharts/openreplay/values.yaml +++ b/scripts/helmcharts/openreplay/values.yaml @@ -47,6 +47,7 @@ global: env: {} # If you're accessing OpenReplay with http, then update the value to http ORSecureAccess: true + orTmpDir: "/openreplay/storage/nfs" chalice: env: