From f12a3be6ecf28e91a73fa926fdf5882be0d0afca Mon Sep 17 00:00:00 2001 From: Khaliq Date: Wed, 10 Jan 2024 11:16:40 +0200 Subject: [PATCH] conditional volume --- README.md | 2 ++ charts/nango/Chart.yaml | 2 +- charts/nango/templates/jobs/jobs-aws-storage-class.yaml | 2 +- charts/nango/templates/jobs/jobs-deployment.yaml | 8 ++++++-- charts/nango/templates/jobs/jobs-gcp-storage-class.yaml | 2 +- charts/nango/templates/jobs/jobs-pvc.yaml | 2 ++ charts/nango/templates/server/server-deployment.yaml | 8 ++++++-- charts/nango/values.yaml | 2 ++ 8 files changed, 21 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4af8944..f85ed1f 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,8 @@ helm delete nango | | DB_SSL | false | | | ENCRYPTION_KEY | "" | | | CALLBACK_URL | "" | +| | flows_path | /flows | +| | useVolumeForFlows | true | | temporalio | volumeName | temporal-secrets | | | TEMPORAL_ADDRESS | nango-sync.abc | | | TEMPORAL_NAMESPACE | nango-sync.def | diff --git a/charts/nango/Chart.yaml b/charts/nango/Chart.yaml index 3d1fbc7..f4cd4d7 100644 --- a/charts/nango/Chart.yaml +++ b/charts/nango/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: nango type: application -version: 0.0.5 +version: 0.0.6 appVersion: 0.0.2 dependencies: - condition: postgresql.enabled diff --git a/charts/nango/templates/jobs/jobs-aws-storage-class.yaml b/charts/nango/templates/jobs/jobs-aws-storage-class.yaml index a6fc138..da5c376 100644 --- a/charts/nango/templates/jobs/jobs-aws-storage-class.yaml +++ b/charts/nango/templates/jobs/jobs-aws-storage-class.yaml @@ -1,4 +1,4 @@ -{{- if .Values.jobs.volume.aws }} +{{- if .Values.shared.useVolumeForFlows .Values.jobs.volume.aws }} apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: diff --git a/charts/nango/templates/jobs/jobs-deployment.yaml b/charts/nango/templates/jobs/jobs-deployment.yaml index 1dd5375..6faa333 100644 --- a/charts/nango/templates/jobs/jobs-deployment.yaml +++ b/charts/nango/templates/jobs/jobs-deployment.yaml @@ -46,16 +46,20 @@ spec: - name: NANGO_ENTERPRISE value: "false" - name: NANGO_INTEGRATIONS_FULL_PATH - value: /flows + value: {{ .Values.shared.flows_path }} volumeMounts: - - mountPath: /flows + {{- if .Values.shared.useVolumeForFlows }} + - mountPath: {{ .Values.shared.flows_path }} name: {{ .Values.jobs.volume.name }} + {{- end }} - mountPath: /etc/secrets/ name: {{ .Values.temporalio.volumeName }} volumes: + {{- if .Values.shared.useVolumeForFlows }} - name: {{ .Values.jobs.volume.name }} persistentVolumeClaim: claimName: {{ .Values.jobs.volume.claimName }} + {{- end }} - name: {{ .Values.temporalio.volumeName }} secret: secretName: {{ .Values.temporalio.volumeName }} diff --git a/charts/nango/templates/jobs/jobs-gcp-storage-class.yaml b/charts/nango/templates/jobs/jobs-gcp-storage-class.yaml index af2f54e..6c34723 100644 --- a/charts/nango/templates/jobs/jobs-gcp-storage-class.yaml +++ b/charts/nango/templates/jobs/jobs-gcp-storage-class.yaml @@ -1,4 +1,4 @@ -{{- if .Values.jobs.volume.gcp }} +{{- if .Values.shared.useVolumeForFlows .Values.jobs.volume.gcp }} apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: diff --git a/charts/nango/templates/jobs/jobs-pvc.yaml b/charts/nango/templates/jobs/jobs-pvc.yaml index 040b357..af8faf2 100644 --- a/charts/nango/templates/jobs/jobs-pvc.yaml +++ b/charts/nango/templates/jobs/jobs-pvc.yaml @@ -1,3 +1,4 @@ +{{- if .Values.shared.useVolumeForFlows }} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -10,3 +11,4 @@ spec: resources: requests: storage: 1Gi +{{- end }} diff --git a/charts/nango/templates/server/server-deployment.yaml b/charts/nango/templates/server/server-deployment.yaml index 4c52c45..33f7531 100644 --- a/charts/nango/templates/server/server-deployment.yaml +++ b/charts/nango/templates/server/server-deployment.yaml @@ -55,16 +55,20 @@ spec: - name: NANGO_ENTERPRISE value: "true" - name: NANGO_INTEGRATIONS_FULL_PATH - value: /flows + value: {{ .Values.shared.flows_path }} volumeMounts: - - mountPath: /flows + {{- if .Values.shared.useVolumeForFlows }} + - mountPath: {{ .Values.shared.flows_path }} name: {{ .Values.jobs.volume.name }} + {{- end }} - mountPath: /etc/secrets/ name: {{ .Values.temporalio.volumeName }} volumes: + {{- if .Values.shared.useVolumeForFlows }} - name: {{ .Values.jobs.volume.name }} persistentVolumeClaim: claimName: {{ .Values.jobs.volume.claimName }} + {{- end }} - name: {{ .Values.temporalio.volumeName }} secret: secretName: {{ .Values.temporalio.volumeName }} diff --git a/charts/nango/values.yaml b/charts/nango/values.yaml index 79ce2b7..f23f4d9 100644 --- a/charts/nango/values.yaml +++ b/charts/nango/values.yaml @@ -48,6 +48,8 @@ shared: DB_SSL: false ENCRYPTION_KEY: "" CALLBACK_URL: "" + flows_path: /flows + useVolumeForFlows: true temporalio: volumeName: temporal-secrets