apache / apache/airflow

Volume is missing for sshKeySecret when dag persistence is enabled.

Open
#27,476 23 comments 10 reactions 0 assignees View on GitHub
area:helm-chart kind:bug
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 10h
Merged PRs (30d)
483

Description

### Official Helm Chart version

1.7.0 (latest released)

### Apache Airflow version

2.3.4

### Kubernetes Version

1.22.6

### Helm Chart configuration

```
# Git sync
dags:
persistence:
enabled: true
size: 1Gi
storageClassName:
accessMode: ReadWriteOnce
existingClaim: airflow-dags
subPath: ~
gitSync:
enabled: true
repo: "ssh://git@..."
branch: "main"
rev: HEAD
depth: 1
maxFailures: 0
subPath: ""
sshKeySecret: airflow-ssh-secret
```

### Docker Image customisations

_No response_

### What happened

This commit: https://github.com/apache/airflow/commit/3fc895b9dfe8e7b77538bd80754fb17ccf92db49 causes the following error because volumeMount is created but the volume is missing:
```upgrade.go:369: [debug] warning: Upgrade "airflow" failed: cannot patch "airflow-scheduler" with kind Deployment: Deployment.apps "airflow-scheduler" is invalid: spec.template.spec.containers[2].volumeMounts[0].name: Not found: "dags"```

### What you think should happen instead

I don't see any relation between dag persistency and git-sync configuration. The fact is that the same configuration works when `credentialsSecret` is defined but stopped working with `sshKeySecret`.

### How to reproduce

Follow commit https://github.com/apache/airflow/commit/3fc895b9dfe8e7b77538bd80754fb17ccf92db49

### Anything else

_No response_

### Are you willing to submit PR?

- [ ] 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)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing commit 3fc895b9dfe8e7b77538bd80754fb17ccf92db49 and reproducing the Helm upgrade with dag persistence and gitSync.sshKeySecret enabled. Trace the generated Deployment volumeMounts and volumes; done means the chart renders and upgrades successfully without the missing "dags" volume error.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.