Skip to content

Allow arbitrary env vars to be added to the Kellnr pod #61

@nyurik

Description

@nyurik

The AWS config sometimes requires additional environment variables to be defined in the pod, e.g. AWS_ACCESS_KEY_ID, AWS_ACCOUNT_ID, etc. There is no point to explicitly pass them one-by-one via Helm configuration because AWS could add more at any point, plus dealing with them is too tedious, error prone, and simply unnecessary. Instead, it would make sense to have a generic list of values that gets injected into the pod's environment:

values.yaml

# Extra environment variables to pass to the pod
# Users can override this to set arbitrary env vars
# Example:
# extraEnv:
#   - name: MY_CUSTOM_VAR
#     value: "my-value"
#   - name: MY_SECRET_VAR
#     valueFrom:
#       secretKeyRef:
#         name: my-secret
#         key: my-key
extraEnv: []

deployment.yaml

spec:
  template:
    spec:
      containers:
          env:
          {{- with .Values.extraEnv }}
          {{- toYaml . | nindent 10 }}
          {{- end }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions