Skip to content

Commit

Permalink
Fix KEDA Autoscaler connectionFromEnv (apache#15561)
Browse files Browse the repository at this point in the history
  • Loading branch information
YuDorogov authored Apr 29, 2021
1 parent 5045419 commit 924af8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions chart/templates/workers/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ spec:
{{- include "custom_airflow_environment" . | indent 10 }}
{{- include "standard_airflow_environment" . | indent 10 }}
containers:
{{- if and (.Values.dags.gitSync.enabled) (not .Values.dags.persistence.enabled) }}
{{- include "git_sync_container" . | indent 8 }}
{{- end }}
- name: worker
image: {{ template "airflow_image" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
Expand Down Expand Up @@ -176,6 +173,9 @@ spec:
- name: KRB5CCNAME
value: {{ include "kerberos_ccache_path" . | quote }}
{{- end }}
{{- if and (.Values.dags.gitSync.enabled) (not .Values.dags.persistence.enabled) }}
{{- include "git_sync_container" . | indent 8 }}
{{- end }}
{{- if $persistence }}
- name: worker-gc
image: {{ template "airflow_image" . }}
Expand Down
4 changes: 2 additions & 2 deletions chart/tests/test_git_sync_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_should_add_git_sync_container_to_worker_if_persistence_is_not_enabled_b
show_only=["templates/workers/worker-deployment.yaml"],
)

assert "git-sync" == jmespath.search("spec.template.spec.containers[0].name", docs[0])
assert "git-sync" == jmespath.search("spec.template.spec.containers[1].name", docs[0])

def test_should_not_add_sync_container_to_worker_if_git_sync_and_persistence_are_enabled(self):
docs = render_chart(
Expand All @@ -73,4 +73,4 @@ def test_should_not_add_sync_container_to_worker_if_git_sync_and_persistence_are
show_only=["templates/workers/worker-deployment.yaml"],
)

assert "git-sync" != jmespath.search("spec.template.spec.containers[0].name", docs[0])
assert "git-sync" != jmespath.search("spec.template.spec.containers[1].name", docs[0])

0 comments on commit 924af8d

Please sign in to comment.