airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
15.87k stars 4.07k forks source link

Update helm template to load `env_vars` from global values #22389

Open Santhin opened 1 year ago

Santhin commented 1 year ago

Environment

Current Behavior

While trying to specify global env vars for deployment I need to create dummy env_vars in each application where I want to propagate these global env_vars Example values.yaml with dummy env var

global:
  env_vars:
    HTTP_PROXY: "10.136.0.000:0000"

webapp:
  env_vars:
    DUMMY: DUMMY

server:
  env_vars:
    DUMMY: DUMMY

Example output:

# Source: airbyte/charts/webapp/templates/deployment.yaml
        # Values from env
        - name: DUMMY
          value: "DUMMY"
        - name: HTTP_PROXY
          value: "10.136.0.000:0000"
# Source: airbyte/charts/server/templates/deployment.yaml
        # Values from env
        - name: DUMMY
          value: "DUMMY"
        - name: HTTP_PROXY
          value: "10.136.0.000:0000"

Example values.yaml without dummy env var

global:
  env_vars:
    HTTP_PROXY: "10.136.0.000:0000"

Example output:

# Source: airbyte/charts/webapp/templates/deployment.yaml
        # Values from env
# Source: airbyte/charts/server/templates/deployment.yaml
        # Values from env

Expected Behavior

# Source: airbyte/charts/webapp/templates/deployment.yaml
        # Values from env
        - name: HTTP_PROXY
          value: "10.136.0.000:0000"
# Source: airbyte/charts/server/templates/deployment.yaml
        # Values from env
        - name: HTTP_PROXY
          value: "10.136.0.000:0000"

Proposal:

Changing this:

{{- if .Values.env_vars }}

To this:

{{- if or .Values.env_vars .Values.global.env_vars }}

Files that needs update: https://github.com/airbytehq/airbyte/blob/master/charts/airbyte-bootloader/templates/pod.yaml#L91 https://github.com/airbytehq/airbyte/blob/master/charts/airbyte-cron/templates/deployment.yaml#L129 https://github.com/airbytehq/airbyte/blob/master/charts/airbyte-metrics/templates/deployment.yaml#L102 https://github.com/airbytehq/airbyte/blob/master/charts/airbyte-server/templates/deployment.yaml#L246 https://github.com/airbytehq/airbyte/blob/master/charts/airbyte-temporal/templates/deployment.yaml#L100 https://github.com/airbytehq/airbyte/blob/master/charts/airbyte-webapp/templates/deployment.yaml#L103 https://github.com/airbytehq/airbyte/blob/master/charts/airbyte-worker/templates/deployment.yaml#L347

octavia-squidington-iii commented 5 months ago

At Airbyte, we seek to be clear about the project priorities and roadmap. This issue has not had any activity for 180 days, suggesting that it's not as critical as others. It's possible it has already been fixed. It is being marked as stale and will be closed in 20 days if there is no activity. To keep it open, please comment to let us know why it is important to you and if it is still reproducible on recent versions of Airbyte.