apache / airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
https://airflow.apache.org/
Apache License 2.0
36.31k stars 14.09k forks source link

gitSync: allow gitSync.env to take a env var from a secret reference #42024

Open connorlwilkes opened 1 week ago

connorlwilkes commented 1 week ago

Description

Currently the schema for gitSync.env does not allow you to define env from secrets like:

env:
        - name: GIT_SYNC_USERNAME
          valueFrom:
            secretKeyRef:
              name: gitsync-secret
              key: username
        - name: GITSYNC_USERNAME
          valueFrom:
            secretKeyRef:
              name: gitsync-secret
              key: username
        - name: GIT_SYNC_PASSWORD
          valueFrom:
            secretKeyRef:
              name: gitsync-secret
              key: pwd
        - name: GITSYNC_PASSWORD
          valueFrom:
            secretKeyRef:
              name: gitsync-secret
              key: pwd

This is because the schema is overly restrictive and doesn't just reference the upstream V1EnvVar. See: https://github.com/apache/airflow/blob/main/chart/values.schema.json#L8557-L8583

Use case/motivation

No response

Related issues

https://github.com/apache/airflow/pull/39031

Are you willing to submit a PR?

Code of Conduct

boring-cyborg[bot] commented 1 week ago

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.