|
| 1 | +apiVersion: kuttl.dev/v1beta1 |
| 2 | +kind: TestStep |
| 3 | +metadata: |
| 4 | + name: install-airflow |
| 5 | +timeout: 480 |
| 6 | +--- |
| 7 | +apiVersion: v1 |
| 8 | +kind: Secret |
| 9 | +metadata: |
| 10 | + name: git-credentials |
| 11 | +type: Opaque |
| 12 | +data: |
| 13 | + # This is a fine-grained access token for the owner of the repo (stackable-airflow/dags) which has read only access |
| 14 | + # to *only* this repo. Contact github users @razvan or @adwk67 for details. |
| 15 | + # This token doesn't expire. |
| 16 | + user: c3RhY2thYmxlLWFpcmZsb3c= |
| 17 | + password: Z2l0aHViX3BhdF8xMUJLUURCRVkwSk1EWlNVQk1RYTdoX0c2OGlhbWtpRkpFV1RMTTF0ajFwbHFTVFNyZ3p3dHZneXI5b2tubGRXaGpVRDZITFRFV0JJcm9yT0dXCg== |
| 18 | +--- |
| 19 | +apiVersion: v1 |
| 20 | +kind: Secret |
| 21 | +metadata: |
| 22 | + name: test-airflow-credentials |
| 23 | +type: Opaque |
| 24 | +stringData: |
| 25 | + adminUser.username: airflow |
| 26 | + adminUser.firstname: Airflow |
| 27 | + adminUser.lastname: Admin |
| 28 | + adminUser.email: [email protected] |
| 29 | + adminUser.password: airflow |
| 30 | + connections.sqlalchemyDatabaseUri: postgresql+psycopg2://airflow:airflow@airflow-postgresql/airflow |
| 31 | +--- |
| 32 | +apiVersion: airflow.stackable.tech/v1alpha1 |
| 33 | +kind: AirflowCluster |
| 34 | +metadata: |
| 35 | + name: airflow |
| 36 | +spec: |
| 37 | + image: |
| 38 | +{% if test_scenario['values']['airflow-latest'].find(",") > 0 %} |
| 39 | + custom: "{{ test_scenario['values']['airflow-latest'].split(',')[1] }}" |
| 40 | + productVersion: "{{ test_scenario['values']['airflow-latest'].split(',')[0] }}" |
| 41 | +{% else %} |
| 42 | + productVersion: "{{ test_scenario['values']['airflow-latest'] }}" |
| 43 | +{% endif %} |
| 44 | + pullPolicy: IfNotPresent |
| 45 | + clusterConfig: |
| 46 | +{% if lookup('env', 'VECTOR_AGGREGATOR') %} |
| 47 | + vectorAggregatorConfigMapName: vector-aggregator-discovery |
| 48 | +{% endif %} |
| 49 | + credentialsSecret: test-airflow-credentials |
| 50 | + dagsGitSync: |
| 51 | + - repo: https://github.com/stackable-airflow/dags |
| 52 | + # v1alpha1 field which should be converted to an enum |
| 53 | + # N.B. only works for the existing v1 field |
| 54 | + credentialsSecret: git-credentials |
| 55 | + gitFolder: "mount-dags-gitsync/dags_airflow3" |
| 56 | + webservers: |
| 57 | + roleConfig: |
| 58 | + listenerClass: external-unstable |
| 59 | + config: |
| 60 | + logging: |
| 61 | + enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} |
| 62 | + roleGroups: |
| 63 | + default: |
| 64 | + envOverrides: &envOverrides |
| 65 | + AIRFLOW_CONN_KUBERNETES_IN_CLUSTER: '{"conn_type": "kubernetes", "extra": {"extra__kubernetes__in_cluster": true}}' |
| 66 | + replicas: 1 |
| 67 | + kubernetesExecutors: |
| 68 | + envOverrides: *envOverrides |
| 69 | + config: |
| 70 | + logging: |
| 71 | + enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} |
| 72 | + schedulers: |
| 73 | + config: |
| 74 | + gracefulShutdownTimeout: 10s |
| 75 | + logging: |
| 76 | + enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} |
| 77 | + roleGroups: |
| 78 | + default: |
| 79 | + envOverrides: *envOverrides |
| 80 | + replicas: 1 |
| 81 | + dagProcessors: |
| 82 | + config: |
| 83 | + gracefulShutdownTimeout: 10s |
| 84 | + logging: |
| 85 | + enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} |
| 86 | + roleGroups: |
| 87 | + default: |
| 88 | + envOverrides: *envOverrides |
| 89 | + replicas: 1 |
0 commit comments