airflow-helm / charts

The User-Community Airflow Helm Chart is the standard way to deploy Apache Airflow on Kubernetes with Helm. Originally created in 2017, it has since helped thousands of companies create production-ready deployments of Airflow on Kubernetes.
https://github.com/airflow-helm/charts/tree/main/charts/airflow
Apache License 2.0
647 stars 475 forks source link

Custom probe command for Flower #705

Closed EinavDanielDX closed 1 year ago

EinavDanielDX commented 1 year ago

Checks

Motivation

I'm trying to set flower with authentication (user password) taken from env variables. using this techniuq i need the livness and readiness probes to work with the following command:

- "exec curl --user $FLOWER_USER:$FLOWER_PASSWORD 'http://localhost:5555$AIRFLOW__CELERY__FLOWER_URL_PREFIX "```

instead of the one set in the helm chart

- "exec curl --user $AIRFLOW__CELERY__FLOWER_BASIC_AUTH 'http://localhost:5555$AIRFLOW__CELERY__FLOWER_URL_PREFIX '"

Implementation

I'd suggest allow user to set these values

flower.livenessProbe.command flower.readinessProbe.command

And change the probe command section in /flower-deployment.yaml into this:

              command:
                - "bash"
                - "-c"
                {{- if flower.livenessProbe.command }}
                - {{ .Values.flower.livenessProbe.command }} 
                {{- else if or (.Values.flower.basicAuthSecret) (.Values.airflow.config.AIRFLOW__CELERY__FLOWER_BASIC_AUTH) }}
                - "exec curl --user $AIRFLOW__CELERY__FLOWER_BASIC_AUTH 'http://localhost:5555{{ .Values.airflow.config.AIRFLOW__CELERY__FLOWER_URL_PREFIX }}'"
                {{- else }}
                - "exec curl 'http://localhost:5555{{ .Values.airflow.config.AIRFLOW__CELERY__FLOWER_URL_PREFIX }}'"
                {{- end }}

Are you willing & able to help?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had activity in 60 days. It will be closed in 7 days if no further activity occurs.

Thank you for your contributions.


Issues never become stale if any of the following is true:

  1. they are added to a Project
  2. they are added to a Milestone
  3. they have the lifecycle/frozen label