Skip to content

Remove duplicated volume mount for git sync in scheduler template#12717

Merged
dimberman merged 1 commit intoapache:masterfrom
PolideaInternal:fix-readme-gitsync-helm
Feb 8, 2021
Merged

Remove duplicated volume mount for git sync in scheduler template#12717
dimberman merged 1 commit intoapache:masterfrom
PolideaInternal:fix-readme-gitsync-helm

Conversation

@turbaszek
Copy link
Member

closes: #12716

Before:

➜ helm install airflow . --namespace airflow --set executor=CeleryExecutor --set airflow_dags_mount_path=/airflow/dags \
  --set dags.persistence.enabled=true \
  --set dags.gitSync.enabled=true \
  --set dags.gitSync.repo=https://github.com/turbaszek/vigilant-giggle \
  --set dags.gitSync.subPath=dags \
  --set defaultAirflowTag=master-python3.7
Error: Deployment.apps "airflow-scheduler" is invalid: spec.template.spec.containers[0].volumeMounts[4].mountPath: Invalid value: "/opt/airflow/dags": must be unique

After:

➜ helm install airflow . --namespace airflow --set executor=CeleryExecutor --set airflow_dags_mount_path=/airflow/dags \
  --set dags.persistence.enabled=true \
  --set dags.gitSync.enabled=true \
  --set dags.gitSync.repo=https://github.com/turbaszek/vigilant-giggle \
  --set defaultAirflowTag=master-python3.7
NAME: airflow
LAST DEPLOYED: Mon Nov 30 12:24:30 2020
NAMESPACE: airflow
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Thank you for installing Airflow!

Your release is named airflow.
You can now access your dashboard(s) by executing the following command(s) and visiting the corresponding port at localhost in your browser:

Airflow dashboard:        kubectl port-forward svc/airflow-webserver 8080:8080 --namespace airflow
Flower dashboard:         kubectl port-forward svc/airflow-flower 5555:5555 --namespace airflow

^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@boring-cyborg boring-cyborg bot added the area:helm-chart Airflow Helm Chart label Nov 30, 2020
@turbaszek turbaszek requested review from ashb and dimberman November 30, 2020 11:36
@ashb
Copy link
Member

ashb commented Nov 30, 2020

Can you add tests please?

@turbaszek
Copy link
Member Author

Can you add tests please?

Will do, once I figure more change to make it work as there are other problems with PVC

@turbaszek turbaszek force-pushed the fix-readme-gitsync-helm branch from c3a346f to 411f74c Compare November 30, 2020 13:46
apiVersion: v1
metadata:
name: {{ .Release.Name }}-dags
name: {{ template "airflow_dags_volume_claim" . }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because:

{{- if .Values.dags.persistence.enabled }}
- name: dags
persistentVolumeClaim:
claimName: {{ template "airflow_dags_volume_claim" . }}
{{- else if .Values.dags.gitSync.enabled }}

Comment on lines +718 to +720
accessMode: ReadWriteOnce
## the name of an existing PVC to use
existingClaim: ~
existingClaim:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this way we can deploy just like that - no need to specify anything.

@dimberman dimberman merged commit e7a2e35 into apache:master Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduler in helm chart does not work with persistent + gitsync

3 participants