-
-
Notifications
You must be signed in to change notification settings - Fork 3
fix: Remote logging in Airflow 3.x #683
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4192248
adapt custom logging to resolve RemoteLogIO handler
adwk67 d5970a3
switch logic branches so that change extends beyond 3.x
adwk67 f501f34
fixed version match
adwk67 245f264
integration test
adwk67 3b8e80e
Merge branch 'main' into fix/remote-logging-3.x
adwk67 83232f4
changelog, cleaned up minio install
adwk67 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| {% if test_scenario['values']['openshift'] == 'true' %} | ||
| # see https://github.com/stackabletech/issues/issues/566 | ||
| --- | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestStep | ||
| commands: | ||
| - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' | ||
| timeout: 120 | ||
| {% endif %} |
13 changes: 13 additions & 0 deletions
13
tests/templates/kuttl/remote-logging/00-range-limit.yaml.j2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| {% if test_scenario['values']['executor'] == 'celery' %} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: LimitRange | ||
| metadata: | ||
| name: limit-request-ratio | ||
| spec: | ||
| limits: | ||
| - type: "Container" | ||
| maxLimitRequestRatio: | ||
| cpu: 5 | ||
| memory: 1 | ||
| {% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: minio-credentials | ||
| labels: | ||
| secrets.stackable.tech/class: spark-pi-private-s3-credentials-class | ||
| timeout: 240 | ||
| stringData: | ||
| accessKey: minioAccessKey | ||
| secretKey: minioSecretKey | ||
| # The following two entries are used by the Bitnami chart for MinIO to | ||
| # set up credentials for accessing buckets managed by the MinIO tenant. | ||
| root-user: minioAccessKey | ||
| root-password: minioSecretKey | ||
| --- | ||
| apiVersion: secrets.stackable.tech/v1alpha1 | ||
| kind: SecretClass | ||
| metadata: | ||
| name: spark-pi-private-s3-credentials-class | ||
| spec: | ||
| backend: | ||
| k8sSearch: | ||
| searchNamespace: | ||
| pod: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --- | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestAssert | ||
| timeout: 900 | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: test-minio | ||
| status: | ||
| readyReplicas: 1 | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: minio-client | ||
| labels: | ||
| app: minio-client | ||
| status: | ||
| phase: Running |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| --- | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestStep | ||
| commands: | ||
| - script: >- | ||
| helm install test-minio | ||
| --namespace $NAMESPACE | ||
| --version 14.6.16 | ||
| -f helm-bitnami-minio-values.yaml | ||
| --repo https://charts.bitnami.com/bitnami minio | ||
| timeout: 240 | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: minio-client | ||
| labels: | ||
| app: minio-client | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app: minio-client | ||
| restartPolicy: Never | ||
| containers: | ||
| - name: minio-client | ||
| image: docker.io/bitnamilegacy/minio-client:2024-debian-12 | ||
| command: ["bash", "-c", "sleep infinity"] | ||
| stdin: true | ||
| tty: true | ||
| resources: | ||
| requests: | ||
| memory: 1Gi | ||
| cpu: "1" | ||
| limits: | ||
| memory: 1Gi | ||
| cpu: "2" | ||
| env: | ||
| - name: MINIO_SERVER_ACCESS_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: minio-credentials | ||
| key: root-user | ||
| optional: false | ||
| - name: MINIO_SERVER_SECRET_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: minio-credentials | ||
| key: root-password | ||
| optional: false | ||
| - name: MINIO_SERVER_HOST | ||
| value: test-minio | ||
| - name: MINIO_SERVER_PORT_NUMBER | ||
| value: "9000" | ||
| - name: MINIO_SERVER_SCHEME | ||
| value: http |
8 changes: 8 additions & 0 deletions
8
tests/templates/kuttl/remote-logging/04-prepare-bucket.yaml.j2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestStep | ||
| commands: | ||
| # give minio enough time to start | ||
| - command: sleep 10 | ||
| - command: kubectl exec -n $NAMESPACE minio-client -- sh -c 'mc alias set test-minio http://test-minio:9000 $$MINIO_SERVER_ACCESS_KEY $$MINIO_SERVER_SECRET_KEY' | ||
| - command: kubectl exec -n $NAMESPACE minio-client -- mc mb test-minio/my-bucket | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestAssert | ||
| metadata: | ||
| name: test-airflow-postgresql | ||
| timeout: 480 | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: StatefulSet | ||
| metadata: | ||
| name: airflow-postgresql | ||
| status: | ||
| readyReplicas: 1 | ||
| replicas: 1 |
12 changes: 12 additions & 0 deletions
12
tests/templates/kuttl/remote-logging/10-install-postgresql.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestStep | ||
| commands: | ||
| - script: >- | ||
| helm install airflow-postgresql | ||
| --namespace $NAMESPACE | ||
| --version 16.4.2 | ||
| -f helm-bitnami-postgresql-values.yaml | ||
| oci://registry-1.docker.io/bitnamicharts/postgresql | ||
| --wait | ||
| timeout: 600 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| {% if test_scenario['values']['executor'] == 'celery' %} | ||
| --- | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestAssert | ||
| metadata: | ||
| name: test-airflow-redis | ||
| timeout: 360 | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: StatefulSet | ||
| metadata: | ||
| name: airflow-redis-master | ||
| status: | ||
| readyReplicas: 1 | ||
| replicas: 1 | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: StatefulSet | ||
| metadata: | ||
| name: airflow-redis-replicas | ||
| status: | ||
| readyReplicas: 1 | ||
| replicas: 1 | ||
| {% endif %} |
14 changes: 14 additions & 0 deletions
14
tests/templates/kuttl/remote-logging/20-install-redis.yaml.j2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| {% if test_scenario['values']['executor'] == 'celery' %} | ||
| --- | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestStep | ||
| commands: | ||
| - script: >- | ||
| helm install airflow-redis | ||
| --namespace $NAMESPACE | ||
| --version 17.11.3 | ||
| -f helm-bitnami-redis-values.yaml | ||
| --repo https://charts.bitnami.com/bitnami redis | ||
| --wait | ||
| timeout: 600 | ||
| {% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| --- | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestAssert | ||
| metadata: | ||
| name: test-available-condition | ||
| timeout: 600 | ||
| commands: | ||
| - script: kubectl -n $NAMESPACE wait --for=condition=available airflowclusters.airflow.stackable.tech/airflow --timeout 301s | ||
| --- | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestAssert | ||
| metadata: | ||
| name: test-airflow-cluster | ||
| timeout: 1200 | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: StatefulSet | ||
| metadata: | ||
| name: airflow-webserver-default | ||
| spec: | ||
| template: | ||
| spec: | ||
| terminationGracePeriodSeconds: 120 | ||
| status: | ||
| readyReplicas: 1 | ||
| replicas: 1 | ||
| {% if test_scenario['values']['executor'] == 'celery' %} | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: StatefulSet | ||
| metadata: | ||
| name: airflow-worker-default | ||
| spec: | ||
| template: | ||
| spec: | ||
| terminationGracePeriodSeconds: 300 | ||
| status: | ||
| readyReplicas: 2 | ||
| replicas: 2 | ||
| {% endif %} | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: StatefulSet | ||
| metadata: | ||
| name: airflow-scheduler-default | ||
| spec: | ||
| template: | ||
| spec: | ||
| terminationGracePeriodSeconds: 120 | ||
| status: | ||
| readyReplicas: 1 | ||
| replicas: 1 | ||
| --- | ||
| apiVersion: policy/v1 | ||
| kind: PodDisruptionBudget | ||
| metadata: | ||
| name: airflow-webserver | ||
| status: | ||
| expectedPods: 1 | ||
| currentHealthy: 1 | ||
| disruptionsAllowed: 1 | ||
| {% if test_scenario['values']['executor'] == 'celery' %} | ||
| --- | ||
| apiVersion: policy/v1 | ||
| kind: PodDisruptionBudget | ||
| metadata: | ||
| name: airflow-worker | ||
| status: | ||
| expectedPods: 2 | ||
| currentHealthy: 2 | ||
| disruptionsAllowed: 1 | ||
| {% endif %} | ||
| --- | ||
| apiVersion: policy/v1 | ||
| kind: PodDisruptionBudget | ||
| metadata: | ||
| name: airflow-scheduler | ||
| status: | ||
| expectedPods: 1 | ||
| currentHealthy: 1 | ||
| disruptionsAllowed: 1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.