From 1f8adfdedc21495d54580bcfdc69305b76d247b4 Mon Sep 17 00:00:00 2001 From: Gaspard FEREY Date: Wed, 11 Dec 2024 16:59:35 +0100 Subject: [PATCH] Notes to explain Git-Sync, disabled by default --- charts/airflow/Chart.yaml | 2 +- charts/airflow/templates/NOTES.txt | 38 +++++++++++++++++++++++------- charts/airflow/values.schema.json | 2 +- charts/airflow/values.yaml | 2 +- 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/charts/airflow/Chart.yaml b/charts/airflow/Chart.yaml index 1790e51..eca65bb 100644 --- a/charts/airflow/Chart.yaml +++ b/charts/airflow/Chart.yaml @@ -23,7 +23,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.2 +version: 0.0.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/airflow/templates/NOTES.txt b/charts/airflow/templates/NOTES.txt index 3d9e760..d4f6834 100644 --- a/charts/airflow/templates/NOTES.txt +++ b/charts/airflow/templates/NOTES.txt @@ -13,19 +13,29 @@ **Informations de connexion :** {{- with index .Values.airflow.airflow.users 0 }} -- Votre nom d'utilisateur est **{{ .username }}** -- Votre mot de passe est **{{ .password }}** +- Votre nom d'utilisateur: **{{ .username }}** +- Votre password: **{{ .password }}** {{- end -}} {{- if .Values.ingress.enabled }} - Vous pouvez vous connecter à Apache Airflow avec votre navigateur à ce [lien](http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .Values.ingress.hostname }}) {{- end -}} +**Git-Sync :** +{{- if not .Values.airflow.dags.gitSync.enabled }} +- **Git-Sync est désactivé !** + Pour une utilisation optimale de ce service, il est recommandé d'activer Git-Sync depuis la page de configuration de votre service + et de spécifier des identifiants et un dépôt git qui sera utilisé comme repertoire de travail. +{{- else }} +- Git-Sync est configuré pour synchroniser le repertoire de DAG avec la branche `{{ .Values.airflow.dags.gitSync.branch }}` + du dépôt git `{{ .Values.airflow.dags.gitSync.repo }}{{ .Values.airflow.dags.gitSync.repoSubPath }}`. +{{- end -}} + {{- if not (empty $pvcList) }} **NOTES sur la suppression :** -- **Vous pouvez supprimer ce chart en toute sécurité et en recréer un plus tard** +- Vous pouvez supprimer ce chart en toute sécurité et en recréer un plus tard - Les volumes de données ne seront pas supprimés -- Si vous démarrez un nouveau {{ .Chart.Name }}, il réutilisera automatiquement ces volumes. +- Si vous démarrez un nouveau Apache Airflow, il réutilisera automatiquement ces volumes - Si vous souhaitez supprimer définitivement ces volumes : `kubectl delete pvc {{ join " " $pvcList }}` {{- end -}} @@ -37,20 +47,30 @@ **Connection information:** {{- with index .Values.airflow.airflow.users 0 }} -- Your username is **{{ .username }}** -- Your password is **{{ .password }}** +- Your username: **{{ .username }}** +- Your password: **{{ .password }}** {{- end -}} {{- if .Values.ingress.enabled }} - You can connect to Apache Airflow with your browser on this [link](http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .Values.ingress.hostname }}) {{- end -}} +**Git-Sync :** +{{- if not .Values.airflow.dags.gitSync.enabled }} +- **Git-Sync is disabled!** + For optimal use of this service, it is recommended to enable Git-Sync from the configuration page of your service + and to specify credentials and a Git repository that will be used as the working directory. +{{- else }} +- Git-Sync is configured to synchronize the DAG directory with the branch `{{ .Values.airflow.dags.gitSync.branch }}` + of the Git repository `{{ .Values.airflow.dags.gitSync.repo }}{{ .Values.airflow.dags.gitSync.repoSubPath }}`. +{{- end -}} + {{- if not (empty $pvcList) }} **NOTES about deletion:** -- **You can safely delete this chart and recreate one later** +- You can safely delete this chart and recreate one later - The underlying data volumes will not be deleted -- If you start a new Airflow service, it will automatically reuse those volumes +- If you start a new Apache Airflow service, it will automatically reuse those volumes - If you want to delete those volumes definitely: `kubectl delete pvc {{ join " " $pvcList }}` {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/charts/airflow/values.schema.json b/charts/airflow/values.schema.json index 266ec05..91abe3f 100644 --- a/charts/airflow/values.schema.json +++ b/charts/airflow/values.schema.json @@ -398,7 +398,7 @@ "enabled": { "description": "Use GitSync to synchronize DAGs with a git repository", "type": "boolean", - "default": true + "default": false }, "resources": { "description": "Your service will have at least the requested resources and never more than its limits. No limit for a resource and you can consume everything left on the host machine.", diff --git a/charts/airflow/values.yaml b/charts/airflow/values.yaml index 317e02f..b67e7b7 100644 --- a/charts/airflow/values.yaml +++ b/charts/airflow/values.yaml @@ -58,7 +58,7 @@ airflow: persistence: enabled: false gitSync: - enabled: true + enabled: false resources: requests: cpu: 200m