Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update git-sync to v4.4.0 #901

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/airflow/docs/faq/configuration/airflow-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ dags:
gitSync:
enabled: true
repo: "https://github.com/USERNAME/REPOSITORY.git"
branch: "master"
revision: "master"
```

</details>
Expand Down
6 changes: 2 additions & 4 deletions charts/airflow/docs/faq/dags/load-dag-definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ dags:

## NOTE: some git providers will need an `ssh://` prefix
repo: "[email protected]:USERNAME/REPOSITORY.git"
branch: "master"
revision: "HEAD"
revision: "master"

## the sub-path within your repo where dags are located
## NOTE: airflow will only see dags under this path, but the whole repo will still be synced
Expand Down Expand Up @@ -111,8 +110,7 @@ dags:
enabled: true

repo: "https://github.com/USERNAME/REPOSITORY.git"
branch: "master"
revision: "HEAD"
revision: "master"

## the sub-path within your repo where dags are located
## NOTE: airflow will only see dags under this path, but the whole repo will still be synced
Expand Down
7 changes: 3 additions & 4 deletions charts/airflow/examples/google-gke/custom-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,9 @@ dags:
## the url of the git repo
repo: "[email protected]:USERNAME/REPOSITORY.git"

## the git branch to check out
branch: master

## the git revision (tag or hash) to check out
## the git revision (branch, tag, or hash) to check out
## specifying "HEAD" will use the repo's default branch
## when specifying a hash, it must be a full hash, and not an abbreviated form.
revision: HEAD

## the name of a pre-created Secret with git ssh credentials
Expand Down
42 changes: 19 additions & 23 deletions charts/airflow/templates/_helpers/pods.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -246,53 +246,49 @@ EXAMPLE USAGE: {{ include "airflow.container.git_sync" (dict "Release" .Release
{{- include "airflow.envFrom" . | indent 4 }}
env:
{{- if .sync_one_time }}
- name: GIT_SYNC_ONE_TIME
- name: GITSYNC_ONE_TIME
value: "true"
{{- end }}
- name: GIT_SYNC_ROOT
- name: GITSYNC_ROOT
value: "/dags"
- name: GIT_SYNC_DEST
- name: GITSYNC_LINK
value: "repo"
- name: GIT_SYNC_REPO
- name: GITSYNC_REPO
value: {{ .Values.dags.gitSync.repo | quote }}
- name: GIT_SYNC_BRANCH
value: {{ .Values.dags.gitSync.branch | quote }}
- name: GIT_SYNC_REV
- name: GIT_SYNC_REF
value: {{ .Values.dags.gitSync.revision | quote }}
- name: GIT_SYNC_DEPTH
- name: GITSYNC_DEPTH
value: {{ .Values.dags.gitSync.depth | quote }}
- name: GIT_SYNC_WAIT
value: {{ .Values.dags.gitSync.syncWait | quote }}
- name: GIT_SYNC_TIMEOUT
value: {{ .Values.dags.gitSync.syncTimeout | quote }}
- name: GIT_SYNC_ADD_USER
- name: GITSYNC_PERIOD
value: "{{ .Values.dags.gitSync.syncWait }}s"
- name: GITSYNC_SYNC_TIMEOUT
value: "{{ .Values.dags.gitSync.syncTimeout }}s"
- name: GITSYNC_ADD_USER
value: "true"
- name: GIT_SYNC_MAX_SYNC_FAILURES
- name: GITSYNC_MAX_FAILURES
value: {{ .Values.dags.gitSync.maxFailures | quote }}
- name: GIT_SYNC_SUBMODULES
- name: GITSYNC_SUBMODULES
value: {{ .Values.dags.gitSync.submodules | quote }}
{{- if .Values.dags.gitSync.sshSecret }}
- name: GIT_SYNC_SSH
value: "true"
- name: GIT_SSH_KEY_FILE
- name: GITSYNC_SSH_KEY_FILE
value: "/etc/git-secret/id_rsa"
{{- end }}
{{- if .Values.dags.gitSync.sshKnownHosts }}
- name: GIT_KNOWN_HOSTS
- name: GITSYNC_SSH_KNOWN_HOSTS
value: "true"
- name: GIT_SSH_KNOWN_HOSTS_FILE
- name: GITSYNC_SSH_KNOWN_HOSTS_FILE
value: "/etc/git-secret/known_hosts"
{{- else }}
- name: GIT_KNOWN_HOSTS
- name: GITSYNC_SSH_KNOWN_HOSTS
value: "false"
{{- end }}
{{- if .Values.dags.gitSync.httpSecret }}
- name: GIT_SYNC_USERNAME
- name: GITSYNC_USERNAME
valueFrom:
secretKeyRef:
name: {{ .Values.dags.gitSync.httpSecret }}
key: {{ .Values.dags.gitSync.httpSecretUsernameKey }}
- name: GIT_SYNC_PASSWORD
- name: GITSYNC_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.dags.gitSync.httpSecret }}
Expand Down
10 changes: 4 additions & 6 deletions charts/airflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,7 @@ dags:
##
image:
repository: registry.k8s.io/git-sync/git-sync
tag: v3.6.9
tag: v4.4.0
pullPolicy: IfNotPresent
uid: 65533
gid: 65533
Expand Down Expand Up @@ -1554,11 +1554,9 @@ dags:
##
repoSubPath: ""

## the git branch to check out
##
branch: master

## the git revision (tag or hash) to check out
## the git revision (branch, tag, or hash) to check out
## specifying "HEAD" will use the repo's default branch
## when specifying a hash, it must be a full hash, and not an abbreviated form
##
revision: HEAD

Expand Down
Loading