Skip to content
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
13 changes: 13 additions & 0 deletions templates/git-sync-relay/git-sync-relay-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,19 @@ spec:
{{- end }}
{{- if .Values.gitSyncRelay.gitSync.readinessProbe }}
readinessProbe: {{- tpl (toYaml .Values.gitSyncRelay.gitSync.readinessProbe) . | nindent 12 }}
{{- else }}
# /readyz reflects the most recent sync, so a bad Gitsync URL edit marks this pod
# NotReady instead of staying "ready" forever (PINF-816). Not a livenessProbe -- a
# restart can't fix a bad URL. failureThreshold: 1 (not the k8s default of 3): the
# sync itself already retries internally before /readyz ever flips, so no extra
# smoothing is needed here.
readinessProbe:
httpGet:
path: /readyz
port: {{ .Values.gitSyncRelay.gitSync.webhookPort }}
initialDelaySeconds: 5
periodSeconds: 15
failureThreshold: 1
{{- end }}
{{- if .Values.gitSyncRelay.gitSync.startupProbe }}
startupProbe: {{- tpl (toYaml .Values.gitSyncRelay.gitSync.startupProbe) . | nindent 12 }}
Expand Down
10 changes: 8 additions & 2 deletions tests/chart/test_git_sync_relay_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ def test_gsr_deployment_gsr_enabled_with_defaults(self, kube_version):
assert c_by_name["git-daemon"]["image"].startswith("quay.io/astronomer/ap-git-daemon:")
assert c_by_name["git-daemon"]["livenessProbe"]
assert c_by_name["git-daemon"]["startupProbe"]
# git-sync has no hardcoded probe fallback (customer-configurable only), unlike git-daemon
# git-sync has a hardcoded readinessProbe fallback (PINF-816) but no liveness fallback
# -- a restart can't fix a bad URL, so liveness stays customer-configurable-only.
assert "livenessProbe" not in c_by_name["git-sync"]
assert "readinessProbe" not in c_by_name["git-sync"]
assert c_by_name["git-sync"]["readinessProbe"] == {
"httpGet": {"path": "/readyz", "port": 8000},
"initialDelaySeconds": 5,
"periodSeconds": 15,
"failureThreshold": 1,
}
assert "startupProbe" not in c_by_name["git-sync"]
assert c_by_name["git-sync"]["resources"] == {
"limits": {"cpu": "200m", "memory": "256Mi"},
Expand Down