Skip to content

Commit c606241

Browse files
committed
chore: move results backend and broker to cluster config in tests
1 parent 63160e1 commit c606241

12 files changed

Lines changed: 124 additions & 108 deletions

tests/templates/kuttl/cluster-operation/08-install-airflow.yaml.j2

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ spec:
5555
host: airflow-postgresql
5656
database: airflow
5757
credentialsSecretName: airflow-postgresql-credentials
58+
celeryResultsBackend:
59+
postgresql:
60+
host: airflow-postgresql
61+
database: airflow
62+
credentialsSecretName: airflow-postgresql-credentials
63+
celeryBroker:
64+
redis:
65+
host: airflow-redis-master
66+
credentialsSecretName: airflow-redis-credentials
5867
webservers:
5968
roleConfig:
6069
listenerClass: external-unstable
@@ -65,15 +74,6 @@ spec:
6574
default:
6675
replicas: 1
6776
celeryExecutors:
68-
resultBackend:
69-
postgresql:
70-
host: airflow-postgresql
71-
database: airflow
72-
credentialsSecretName: airflow-postgresql-credentials
73-
broker:
74-
redis:
75-
host: airflow-redis-master
76-
credentialsSecretName: airflow-redis-credentials
7777
config:
7878
logging:
7979
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}

tests/templates/kuttl/external-access/install-airflow-cluster.yaml.j2

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ spec:
4848
host: airflow-postgresql
4949
database: airflow
5050
credentialsSecretName: airflow-postgresql-credentials
51+
{% if test_scenario['values']['executor'] == 'celery' %}
52+
celeryResultsBackend:
53+
postgresql:
54+
host: airflow-postgresql
55+
database: airflow
56+
credentialsSecretName: airflow-postgresql-credentials
57+
celeryBroker:
58+
redis:
59+
host: airflow-redis-master
60+
credentialsSecretName: airflow-redis-credentials
61+
{% endif %}
5162
webservers:
5263
roleConfig:
5364
listenerClass: test-external-stable-$NAMESPACE
@@ -63,15 +74,6 @@ spec:
6374
replicas: 1
6475
{% if test_scenario['values']['executor'] == 'celery' %}
6576
celeryExecutors:
66-
resultBackend:
67-
postgresql:
68-
host: airflow-postgresql
69-
database: airflow
70-
credentialsSecretName: airflow-postgresql-credentials
71-
broker:
72-
redis:
73-
host: airflow-redis-master
74-
credentialsSecretName: airflow-redis-credentials
7577
roleGroups:
7678
default:
7779
replicas: 1

tests/templates/kuttl/ldap/60-install-airflow-cluster.yaml.j2

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ commands:
7171
host: airflow-postgresql
7272
database: airflow
7373
credentialsSecretName: airflow-postgresql-credentials
74+
{% if test_scenario['values']['executor'] == 'celery' %}
75+
celeryResultsBackend:
76+
postgresql:
77+
host: airflow-postgresql
78+
database: airflow
79+
credentialsSecretName: airflow-postgresql-credentials
80+
celeryBroker:
81+
redis:
82+
host: airflow-redis-master
83+
credentialsSecretName: airflow-redis-credentials
84+
{% endif %}
7485
authentication:
7586
- authenticationClass: {% if test_scenario['values']['ldap-authentication'] == 'no-tls' -%}
7687
no-tls-$NAMESPACE
@@ -92,15 +103,6 @@ commands:
92103
replicas: 1
93104
{% if test_scenario['values']['executor'] == 'celery' %}
94105
celeryExecutors:
95-
resultBackend:
96-
postgresql:
97-
host: airflow-postgresql
98-
database: airflow
99-
credentialsSecretName: airflow-postgresql-credentials
100-
broker:
101-
redis:
102-
host: airflow-redis-master
103-
credentialsSecretName: airflow-redis-credentials
104106
config:
105107
logging:
106108
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}

tests/templates/kuttl/logging/41-install-airflow-cluster.yaml.j2

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ spec:
9696
host: airflow-postgresql
9797
database: airflow
9898
credentialsSecretName: airflow-postgresql-credentials
99+
{% if test_scenario['values']['executor'] == 'celery' %}
100+
celeryResultsBackend:
101+
postgresql:
102+
host: airflow-postgresql
103+
database: airflow
104+
credentialsSecretName: airflow-postgresql-credentials
105+
celeryBroker:
106+
redis:
107+
host: airflow-redis-master
108+
credentialsSecretName: airflow-redis-credentials
109+
{% endif %}
99110
dagsGitSync:
100111
- repo: https://github.com/stackabletech/example-dags
101112
gitFolder: dags
@@ -162,15 +173,6 @@ spec:
162173
configMap: airflow-log-config
163174
{% if test_scenario['values']['executor'] == 'celery' %}
164175
celeryExecutors:
165-
resultBackend:
166-
postgresql:
167-
host: airflow-postgresql
168-
database: airflow
169-
credentialsSecretName: airflow-postgresql-credentials
170-
broker:
171-
redis:
172-
host: airflow-redis-master
173-
credentialsSecretName: airflow-redis-credentials
174176
config:
175177
resources:
176178
cpu:

tests/templates/kuttl/mount-dags-configmap/30-install-airflow-cluster.yaml.j2

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ spec:
9393
host: airflow-postgresql
9494
database: airflow
9595
credentialsSecretName: airflow-postgresql-credentials
96+
{% if test_scenario['values']['executor'] == 'celery' %}
97+
celeryResultsBackend:
98+
postgresql:
99+
host: airflow-postgresql
100+
database: airflow
101+
credentialsSecretName: airflow-postgresql-credentials
102+
celeryBroker:
103+
redis:
104+
host: airflow-redis-master
105+
credentialsSecretName: airflow-redis-credentials
106+
{% endif %}
96107
volumes:
97108
- name: test-cm-dag
98109
configMap:
@@ -114,15 +125,6 @@ spec:
114125
replicas: 1
115126
{% if test_scenario['values']['executor'] == 'celery' %}
116127
celeryExecutors:
117-
resultBackend:
118-
postgresql:
119-
host: airflow-postgresql
120-
database: airflow
121-
credentialsSecretName: airflow-postgresql-credentials
122-
broker:
123-
redis:
124-
host: airflow-redis-master
125-
credentialsSecretName: airflow-redis-credentials
126128
config:
127129
logging:
128130
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}

tests/templates/kuttl/mount-dags-gitsync/30-install-airflow-cluster.yaml.j2

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,17 @@ spec:
9292
host: airflow-postgresql
9393
database: airflow
9494
credentialsSecretName: airflow-postgresql-credentials
95+
{% if test_scenario['values']['executor'] == 'celery' %}
96+
celeryResultsBackend:
97+
postgresql:
98+
host: airflow-postgresql
99+
database: airflow
100+
credentialsSecretName: airflow-postgresql-credentials
101+
celeryBroker:
102+
redis:
103+
host: airflow-redis-master
104+
credentialsSecretName: airflow-redis-credentials
105+
{% endif %}
95106
dagsGitSync:
96107
{% if test_scenario['values']['access'] == 'ssh' %}
97108
- repo: ssh://git@github.com/stackable-airflow/dags.git
@@ -132,15 +143,6 @@ spec:
132143
replicas: 1
133144
{% if test_scenario['values']['executor'] == 'celery' %}
134145
celeryExecutors:
135-
resultBackend:
136-
postgresql:
137-
host: airflow-postgresql
138-
database: airflow
139-
credentialsSecretName: airflow-postgresql-credentials
140-
broker:
141-
redis:
142-
host: airflow-redis-master
143-
credentialsSecretName: airflow-redis-credentials
144146
config:
145147
logging:
146148
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}

tests/templates/kuttl/orphaned-resources/30-install-airflow-cluster.yaml.j2

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ spec:
5555
host: airflow-postgresql
5656
database: airflow
5757
credentialsSecretName: airflow-postgresql-credentials
58+
celeryResultsBackend:
59+
postgresql:
60+
host: airflow-postgresql
61+
database: airflow
62+
credentialsSecretName: airflow-postgresql-credentials
63+
celeryBroker:
64+
redis:
65+
host: airflow-redis-master
66+
credentialsSecretName: airflow-redis-credentials
5867
webservers:
5968
roleConfig:
6069
listenerClass: external-unstable
@@ -65,15 +74,6 @@ spec:
6574
default:
6675
replicas: 1
6776
celeryExecutors:
68-
resultBackend:
69-
postgresql:
70-
host: airflow-postgresql
71-
database: airflow
72-
credentialsSecretName: airflow-postgresql-credentials
73-
broker:
74-
redis:
75-
host: airflow-redis-master
76-
credentialsSecretName: airflow-redis-credentials
7777
config:
7878
logging:
7979
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}

tests/templates/kuttl/overrides/10-install-airflow.yaml.j2

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ spec:
6161
host: airflow-postgresql
6262
database: airflow
6363
credentialsSecretName: airflow-postgresql-credentials
64+
celeryResultsBackend:
65+
postgresql:
66+
host: airflow-postgresql
67+
database: airflow
68+
credentialsSecretName: airflow-postgresql-credentials
69+
celeryBroker:
70+
redis:
71+
host: airflow-redis-master
72+
credentialsSecretName: airflow-redis-credentials
6473
webservers:
6574
roleConfig:
6675
listenerClass: external-unstable
@@ -75,15 +84,6 @@ spec:
7584
COMMON_VAR: group-value # overrides role value
7685
GROUP_VAR: group-value # only defined here at group level
7786
celeryExecutors:
78-
resultBackend:
79-
postgresql:
80-
host: airflow-postgresql
81-
database: airflow
82-
credentialsSecretName: airflow-postgresql-credentials
83-
broker:
84-
redis:
85-
host: airflow-redis-master
86-
credentialsSecretName: airflow-redis-credentials
8787
envOverrides:
8888
COMMON_VAR: role-value # overridden by role group below
8989
ROLE_VAR: role-value # only defined here at role level

tests/templates/kuttl/remote-logging/40-install-airflow-cluster.yaml.j2

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ spec:
5555
host: airflow-postgresql
5656
database: airflow
5757
credentialsSecretName: airflow-postgresql-credentials
58+
{% if test_scenario['values']['executor'] == 'celery' %}
59+
celeryResultsBackend:
60+
postgresql:
61+
host: airflow-postgresql
62+
database: airflow
63+
credentialsSecretName: airflow-postgresql-credentials
64+
celeryBroker:
65+
redis:
66+
host: airflow-redis-master
67+
credentialsSecretName: airflow-redis-credentials
68+
{% endif %}
5869
webservers:
5970
roleConfig:
6071
listenerClass: external-unstable
@@ -68,15 +79,6 @@ spec:
6879
AIRFLOW__LOGGING__REMOTE_LOG_CONN_ID: minio_conn
6980
{% if test_scenario['values']['executor'] == 'celery' %}
7081
celeryExecutors:
71-
resultBackend:
72-
postgresql:
73-
host: airflow-postgresql
74-
database: airflow
75-
credentialsSecretName: airflow-postgresql-credentials
76-
broker:
77-
redis:
78-
host: airflow-redis-master
79-
credentialsSecretName: airflow-redis-credentials
8082
roleGroups:
8183
default:
8284
replicas: 2

tests/templates/kuttl/resources/30-install-airflow-cluster.yaml.j2

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ spec:
5555
host: airflow-postgresql
5656
database: airflow
5757
credentialsSecretName: airflow-postgresql-credentials
58+
celeryResultsBackend:
59+
postgresql:
60+
host: airflow-postgresql
61+
database: airflow
62+
credentialsSecretName: airflow-postgresql-credentials
63+
celeryBroker:
64+
redis:
65+
host: airflow-redis-master
66+
credentialsSecretName: airflow-redis-credentials
5867
webservers:
5968
roleConfig:
6069
listenerClass: external-unstable
@@ -65,15 +74,6 @@ spec:
6574
default:
6675
replicas: 1
6776
celeryExecutors:
68-
resultBackend:
69-
postgresql:
70-
host: airflow-postgresql
71-
database: airflow
72-
credentialsSecretName: airflow-postgresql-credentials
73-
broker:
74-
redis:
75-
host: airflow-redis-master
76-
credentialsSecretName: airflow-redis-credentials
7777
config:
7878
logging:
7979
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}

0 commit comments

Comments
 (0)