Skip to content

Support full spec of env specification #102

@xrl

Description

@xrl

Right now the .Values.metastore.extraEnv is expected as only literal K/V pairs and does not allow for the pulling in an environment variable from a secret. For me it is important to have the power to remap keys from a secret, I can't just use envFrom because the keys don't match what is expected by quickwit.

I don't think the helm chart should take such a strong opinion on the environment variables, allow the user to write YAML which gets substituted in. Something like:

possible values spec:

        metastore:
          extraEnv:
           -  name: QW_METASTORE_URI
              valueFrom:
                secretRef:
                  name: quickwittracing-postgres-direct-secret
                  key: POSTGRES_URL
          - name: SOMETHING_ELSE
            value: "asdf"

and then in the metastore-deployment.yaml:

# SNIP
spec:
   # snip
  template:
    # snip
    spec:
      # snip
      containers:
        - name: {{ .Chart.Name }}
          # snip
          env:
            {{- include "quickwit.environment" . | nindent 12 }}
            {{- .Values.metastore.extraEnv | nindent 12}}

and now the helm chart can support mapping/remapping ENV vars from literal, configmaps, and secrets. This would be a breaking change -- perhaps we want to add a new config variable while continuing to support the K/V style?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions