AdeshDeshmukh opened a new issue, #77662:
URL: https://github.com/apache/airflow/issues/77662
### Under which category would you file this issue?
Helm chart
### Apache Airflow version
3.2.2 (default image for Helm chart 1.22.0)
### What happened and how to reproduce it?
Enabling the Celery worker HPA with the chart defaults renders `minReplicas:
0` with a single CPU resource metric. Kubernetes requires at least one Object
or External metric when the minimum is zero, so this HPA fails API validation.
```sh
helm template probe airflow \
--repo https://airflow.apache.org \
--version 1.22.0 \
--set executor=CeleryExecutor \
--set workers.celery.hpa.enabled=true \
--show-only templates/workers/worker-hpa.yaml
```
The rendered HPA contains:
```yaml
minReplicas: 0
maxReplicas: 5
metrics:
- resource:
name: cpu
target:
averageUtilization: 80
type: Utilization
type: Resource
```
I verified the rendered manifest locally. [Kubernetes HPA API
reference](https://kubernetes.io/docs/reference/kubernetes-api/autoscaling/horizontal-pod-autoscaler-v2/)
### What you think should happen instead?
Enabling the worker HPA with the default CPU metric should render a valid
HPA. The default minimum should be one replica. An explicit minimum of zero
should still be available for eligible Object or External metric configurations.
### Operating System
macOS (Apple Silicon)
### Deployment
Official Apache Airflow Helm Chart
### Apache Airflow Provider(s)
_No response_
### Versions of Apache Airflow Providers
_No response_
### Official Helm Chart version
1.22.0 (latest released)
### Kubernetes Version
Reproduced with Helm 3.19.0 using helm template. No Kubernetes cluster was
used.
### Helm Chart configuration
```yaml
executor: CeleryExecutor
workers:
celery:
hpa:
enabled: true
```
### Docker Image customizations
None.
### Anything else?
As a workaround, set `workers.celery.hpa.minReplicaCount: 1`. I verified
that this renders `minReplicas: 1` with the same CPU metric.
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]