From 07da01895b83e81285816d5e46242a8e1ef81c9a Mon Sep 17 00:00:00 2001 From: Burak Karakan Date: Fri, 24 Jun 2022 19:08:15 +0100 Subject: [PATCH 1/3] feat: add a new option to control submodule strategy for gitSync deployments Signed-off-by: Burak Karakan --- charts/airflow/templates/_helpers/pods.tpl | 2 ++ charts/airflow/values.yaml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/charts/airflow/templates/_helpers/pods.tpl b/charts/airflow/templates/_helpers/pods.tpl index 0e5bdd8b..a259ac5e 100644 --- a/charts/airflow/templates/_helpers/pods.tpl +++ b/charts/airflow/templates/_helpers/pods.tpl @@ -228,6 +228,8 @@ EXAMPLE USAGE: {{ include "airflow.container.git_sync" (dict "Release" .Release value: "true" - name: GIT_SYNC_MAX_SYNC_FAILURES value: {{ .Values.dags.gitSync.maxFailures | quote }} + - name: GIT_SYNC_SUBMODULES + value: {{ .Values.dags.gitSync.submoduleStrategy | quote }} {{- if .Values.dags.gitSync.sshSecret }} - name: GIT_SYNC_SSH value: "true" diff --git a/charts/airflow/values.yaml b/charts/airflow/values.yaml index 9b7b987d..60c2050a 100644 --- a/charts/airflow/values.yaml +++ b/charts/airflow/values.yaml @@ -1360,6 +1360,10 @@ dags: ## syncTimeout: 120 + ## the git submodule behavior to use for syncs: one of 'recursive', 'shallow', or 'off' + ## + submoduleStrategy: recursive + ## the name of a pre-created Secret with git http credentials ## httpSecret: "" From 2c47b78fcfb9e21a4bb7c35d68afa8d297fd2692 Mon Sep 17 00:00:00 2001 From: Burak Karakan Date: Sun, 12 Feb 2023 15:38:27 +0300 Subject: [PATCH 2/3] chore: fix the formatting of the allowed values for submodules Signed-off-by: Burak Karakan --- charts/airflow/values.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/airflow/values.yaml b/charts/airflow/values.yaml index 60c2050a..4af8ac7d 100644 --- a/charts/airflow/values.yaml +++ b/charts/airflow/values.yaml @@ -1360,7 +1360,8 @@ dags: ## syncTimeout: 120 - ## the git submodule behavior to use for syncs: one of 'recursive', 'shallow', or 'off' + ## the git submodule behavior + ## - allowed values: "recursive", "shallow", "off" ## submoduleStrategy: recursive From a70107dd4968cb893c4152dda2767caf73692db0 Mon Sep 17 00:00:00 2001 From: Burak Karakan Date: Sun, 12 Feb 2023 15:39:15 +0300 Subject: [PATCH 3/3] refactor: rename the submoduleStrategy value to submodules Signed-off-by: Burak Karakan --- charts/airflow/templates/_helpers/pods.tpl | 2 +- charts/airflow/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/airflow/templates/_helpers/pods.tpl b/charts/airflow/templates/_helpers/pods.tpl index a259ac5e..3cacda28 100644 --- a/charts/airflow/templates/_helpers/pods.tpl +++ b/charts/airflow/templates/_helpers/pods.tpl @@ -229,7 +229,7 @@ EXAMPLE USAGE: {{ include "airflow.container.git_sync" (dict "Release" .Release - name: GIT_SYNC_MAX_SYNC_FAILURES value: {{ .Values.dags.gitSync.maxFailures | quote }} - name: GIT_SYNC_SUBMODULES - value: {{ .Values.dags.gitSync.submoduleStrategy | quote }} + value: {{ .Values.dags.gitSync.submodules | quote }} {{- if .Values.dags.gitSync.sshSecret }} - name: GIT_SYNC_SSH value: "true" diff --git a/charts/airflow/values.yaml b/charts/airflow/values.yaml index 4af8ac7d..65ce9370 100644 --- a/charts/airflow/values.yaml +++ b/charts/airflow/values.yaml @@ -1363,7 +1363,7 @@ dags: ## the git submodule behavior ## - allowed values: "recursive", "shallow", "off" ## - submoduleStrategy: recursive + submodules: recursive ## the name of a pre-created Secret with git http credentials ##