Skip to content

Commit

Permalink
Add extra env to helm template (#96)
Browse files Browse the repository at this point in the history
* Add extra env to helm template

(cherry picked from commit fad9320)

* Update chart/templates/replicated-deployment.yaml

Co-authored-by: Craig O'Donnell <[email protected]>
(cherry picked from commit a45380d)

* create-release v1.5.2

* test extraEnv

---------

Co-authored-by: Utwo <[email protected]>
  • Loading branch information
Craig O'Donnell and Utwo authored Oct 5, 2023
1 parent 09745c3 commit 41f67ae
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,19 @@ jobs:
exit 1
fi
cat << EOF >> test-values.yaml
extraEnv:
- name: TEST_EXTRA_ENV
value: test-extra-env
EOF
output=$(helm template oci://ttl.sh/automated-${{ github.run_id }}/replicated --version 0.0.0 --values test-values.yaml)
if ! echo $output | grep -q 'TEST_EXTRA_ENV'; then
printf "user-set extraEnv should exist:\n\n%s\n\n" "$output"
exit 1
fi
create-test-release:
runs-on: ubuntu-22.04
needs: [ build-and-push-e2e ]
Expand Down
3 changes: 3 additions & 0 deletions chart/templates/replicated-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ spec:
readOnly: true
subPath: config.yaml
env:
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 8 }}
{{- end }}
- name: REPLICATED_NAMESPACE
valueFrom:
fieldRef:
Expand Down
2 changes: 2 additions & 0 deletions chart/values.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ service:
type: ClusterIP
port: 3000

extraEnv: []

# "integration" mode related values.
integration:
licenseID: ""
Expand Down

0 comments on commit 41f67ae

Please sign in to comment.