-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'additionalEnvVars' to the chart #303
Conversation
Signed-off-by: Steven <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cloudnative-pg.extraEnv
doesn't looks like right to me. Does it work with multiple values at all?
Yes it does work with multiple values. If you further review my description you can see where I use two values and then pass them in and then highlight the results in the configmap which shows both values passed in. |
Signed-off-by: Steven <[email protected]>
I think the check whether the value is string only makes sense when you wrap your macro in a range - i.e.: {{- range $e := .Values.additionalEnv }}
{{- include "cloudnative-pg.extraEnv" (dict "value" $e "context" $ ) | nindent 8 }}
{{- end }} Otherwise .value will always be an array |
And then why don't you always do |
Ranging over means I need to add my own "-" before name for list conversion. Here is teh results of the template above and the override.yaml below. You can see how range changed the items from a list to individial line outputs. |
Signed-off-by: Steven <[email protected]>
Signed-off-by: Steven <[email protected]>
I simplified it and used the test cases of [] and the list above. It appears good and not sure I can simplify any further. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks @Stevenpc3 and @itay-grudev!
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [cloudnative-pg](https://cloudnative-pg.io) ([source](https://togithub.com/cloudnative-pg/charts)) | patch | `0.21.2` -> `0.21.3` | --- ### Release Notes <details> <summary>cloudnative-pg/charts (cloudnative-pg)</summary> ### [`v0.21.3`](https://togithub.com/cloudnative-pg/charts/releases/tag/cloudnative-pg-v0.21.3) [Compare Source](https://togithub.com/cloudnative-pg/charts/compare/cloudnative-pg-v0.21.2...cloudnative-pg-v0.21.3) CloudNativePG Operator Helm Chart #### What's Changed - Add 'additionalEnvVars' to the chart by [@​Stevenpc3](https://togithub.com/Stevenpc3) in [https://github.com/cloudnative-pg/charts/pull/303](https://togithub.com/cloudnative-pg/charts/pull/303) #### New Contributors - [@​Stevenpc3](https://togithub.com/Stevenpc3) made their first contribution in [https://github.com/cloudnative-pg/charts/pull/303](https://togithub.com/cloudnative-pg/charts/pull/303) **Full Changelog**: cloudnative-pg/charts@cloudnative-pg-v0.21.2...cloudnative-pg-v0.21.3 </details> <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zODIuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM4Mi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9oZWxtIiwidHlwZS9wYXRjaCJdfQ==--> Co-authored-by: repo-jeeves[bot] <106431701+repo-jeeves[bot]@users.noreply.github.com>
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [cloudnative-pg](https://cloudnative-pg.io) ([source](https://togithub.com/cloudnative-pg/charts)) | patch | `0.21.2` -> `0.21.3` | --- ### Release Notes <details> <summary>cloudnative-pg/charts (cloudnative-pg)</summary> ### [`v0.21.3`](https://togithub.com/cloudnative-pg/charts/releases/tag/cloudnative-pg-v0.21.3) [Compare Source](https://togithub.com/cloudnative-pg/charts/compare/cloudnative-pg-v0.21.2...cloudnative-pg-v0.21.3) CloudNativePG Operator Helm Chart #### What's Changed - Add 'additionalEnvVars' to the chart by [@​Stevenpc3](https://togithub.com/Stevenpc3) in [https://github.com/cloudnative-pg/charts/pull/303](https://togithub.com/cloudnative-pg/charts/pull/303) #### New Contributors - [@​Stevenpc3](https://togithub.com/Stevenpc3) made their first contribution in [https://github.com/cloudnative-pg/charts/pull/303](https://togithub.com/cloudnative-pg/charts/pull/303) **Full Changelog**: cloudnative-pg/charts@cloudnative-pg-v0.21.2...cloudnative-pg-v0.21.3 </details> <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zODIuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM4Mi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9oZWxtIiwidHlwZS9wYXRjaCJdfQ==--> Co-authored-by: repo-jeeves[bot] <106431701+repo-jeeves[bot]@users.noreply.github.com>
there was a typo left in this PR. I have made a fix here #305 |
This PR contains the following updates: | Package | Update | Change | |---|---|---| | | lockFileMaintenance | All locks refreshed | | csi-driver-smb | minor | `v1.14.0` -> `v1.15.0` | | [cloudnative-pg](https://cloudnative-pg.io) ([source](https://togithub.com/cloudnative-pg/charts)) | minor | `0.20.2` -> `0.21.3` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. 🔧 This Pull Request updates lock files to use the latest dependency versions. --- ### Release Notes <details> <summary>cloudnative-pg/charts (cloudnative-pg)</summary> ### [`v0.21.3`](https://togithub.com/cloudnative-pg/charts/releases/tag/cloudnative-pg-v0.21.3) [Compare Source](https://togithub.com/cloudnative-pg/charts/compare/cloudnative-pg-v0.21.2...cloudnative-pg-v0.21.3) CloudNativePG Operator Helm Chart #### What's Changed - Add 'additionalEnvVars' to the chart by [@​Stevenpc3](https://togithub.com/Stevenpc3) in [https://github.com/cloudnative-pg/charts/pull/303](https://togithub.com/cloudnative-pg/charts/pull/303) #### New Contributors - [@​Stevenpc3](https://togithub.com/Stevenpc3) made their first contribution in [https://github.com/cloudnative-pg/charts/pull/303](https://togithub.com/cloudnative-pg/charts/pull/303) **Full Changelog**: cloudnative-pg/charts@cloudnative-pg-v0.21.2...cloudnative-pg-v0.21.3 ### [`v0.21.2`](https://togithub.com/cloudnative-pg/charts/releases/tag/cloudnative-pg-v0.21.2) [Compare Source](https://togithub.com/cloudnative-pg/charts/compare/cloudnative-pg-v0.21.1...cloudnative-pg-v0.21.2) CloudNativePG Operator Helm Chart #### What's Changed - Release cloudnative-pg-v0.21.2 by [@​leonardoce](https://togithub.com/leonardoce) in [https://github.com/cloudnative-pg/charts/pull/274](https://togithub.com/cloudnative-pg/charts/pull/274) #### New Contributors - [@​leonardoce](https://togithub.com/leonardoce) made their first contribution in [https://github.com/cloudnative-pg/charts/pull/274](https://togithub.com/cloudnative-pg/charts/pull/274) **Full Changelog**: cloudnative-pg/charts@cloudnative-pg-v0.21.1...cloudnative-pg-v0.21.2 ### [`v0.21.1`](https://togithub.com/cloudnative-pg/charts/releases/tag/cloudnative-pg-v0.21.1) [Compare Source](https://togithub.com/cloudnative-pg/charts/compare/cloudnative-pg-v0.21.0...cloudnative-pg-v0.21.1) CloudNativePG Operator Helm Chart #### What's Changed - fix: Bump chart dependency grafana-dashboards to version 0.0.2 by [@​dexter136](https://togithub.com/dexter136) in [https://github.com/cloudnative-pg/charts/pull/270](https://togithub.com/cloudnative-pg/charts/pull/270) #### New Contributors - [@​dexter136](https://togithub.com/dexter136) made their first contribution in [https://github.com/cloudnative-pg/charts/pull/270](https://togithub.com/cloudnative-pg/charts/pull/270) **Full Changelog**: cloudnative-pg/charts@cloudnative-pg-v0.21.0...cloudnative-pg-v0.21.1 ### [`v0.21.0`](https://togithub.com/cloudnative-pg/charts/releases/tag/cloudnative-pg-v0.21.0) [Compare Source](https://togithub.com/cloudnative-pg/charts/compare/cloudnative-pg-v0.20.2...cloudnative-pg-v0.21.0) CloudNativePG Operator Helm Chart #### What's Changed - chore(deps): update actions/checkout action to v4.1.3 by [@​renovate](https://togithub.com/renovate) in [https://github.com/cloudnative-pg/charts/pull/260](https://togithub.com/cloudnative-pg/charts/pull/260) - chore(deps): update helm/kind-action action to v1.10.0 by [@​renovate](https://togithub.com/renovate) in [https://github.com/cloudnative-pg/charts/pull/261](https://togithub.com/cloudnative-pg/charts/pull/261) - Release cloudnative-pg-v0.21.0 by [@​github-actions](https://togithub.com/github-actions) in [https://github.com/cloudnative-pg/charts/pull/266](https://togithub.com/cloudnative-pg/charts/pull/266) #### New Contributors **Full Changelog**: cloudnative-pg/charts@cloudnative-pg-v0.20.2...cloudnative-pg-v0.21.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on monday" in timezone Europe/Amsterdam, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDIuMSIsInVwZGF0ZWRJblZlciI6IjM3LjM4Mi4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbInVwZGF0ZS9oZWxtL3N5c3RlbSJdfQ==-->
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [cloudnative-pg](https://cloudnative-pg.io) ([source](https://github.com/cloudnative-pg/charts)) | patch | `0.21.2` -> `0.21.3` | --- ### Release Notes <details> <summary>cloudnative-pg/charts (cloudnative-pg)</summary> ### [`v0.21.3`](https://github.com/cloudnative-pg/charts/releases/tag/cloudnative-pg-v0.21.3) [Compare Source](cloudnative-pg/charts@cloudnative-pg-v0.21.2...cloudnative-pg-v0.21.3) CloudNativePG Operator Helm Chart #### What's Changed - Add 'additionalEnvVars' to the chart by [@​Stevenpc3](https://github.com/Stevenpc3) in cloudnative-pg/charts#303 #### New Contributors - [@​Stevenpc3](https://github.com/Stevenpc3) made their first contribution in cloudnative-pg/charts#303 **Full Changelog**: cloudnative-pg/charts@cloudnative-pg-v0.21.2...cloudnative-pg-v0.21.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zODEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM4MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: https://git.internal/nrdufour/home-ops/pulls/468 Co-authored-by: Renovate <[email protected]> Co-committed-by: Renovate <[email protected]>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [cloudnative-pg](https://cloudnative-pg.io) ([source](https://togithub.com/cloudnative-pg/charts)) | patch | `0.21.2` -> `0.21.5` | --- ### Release Notes <details> <summary>cloudnative-pg/charts (cloudnative-pg)</summary> ### [`v0.21.5`](https://togithub.com/cloudnative-pg/charts/releases/tag/cloudnative-pg-v0.21.5) [Compare Source](https://togithub.com/cloudnative-pg/charts/compare/cloudnative-pg-v0.21.4...cloudnative-pg-v0.21.5) CloudNativePG Operator Helm Chart #### What's Changed - chore(deps): update actions/checkout action to v4.1.7 by [@​renovate](https://togithub.com/renovate) in [https://github.com/cloudnative-pg/charts/pull/318](https://togithub.com/cloudnative-pg/charts/pull/318) - Release cloudnative-pg-v0.21.5 by [@​github-actions](https://togithub.com/github-actions) in [https://github.com/cloudnative-pg/charts/pull/315](https://togithub.com/cloudnative-pg/charts/pull/315) **Full Changelog**: cloudnative-pg/charts@cloudnative-pg-v0.21.4...cloudnative-pg-v0.21.5 ### [`v0.21.4`](https://togithub.com/cloudnative-pg/charts/releases/tag/cloudnative-pg-v0.21.4) [Compare Source](https://togithub.com/cloudnative-pg/charts/compare/cloudnative-pg-v0.21.3...cloudnative-pg-v0.21.4) CloudNativePG Operator Helm Chart #### What's Changed - fix additionalEnv typo in deployment.yaml by [@​Stevenpc3](https://togithub.com/Stevenpc3) in [https://github.com/cloudnative-pg/charts/pull/305](https://togithub.com/cloudnative-pg/charts/pull/305) **Full Changelog**: cloudnative-pg/charts@cloudnative-pg-v0.21.3...cloudnative-pg-v0.21.4 ### [`v0.21.3`](https://togithub.com/cloudnative-pg/charts/releases/tag/cloudnative-pg-v0.21.3) [Compare Source](https://togithub.com/cloudnative-pg/charts/compare/cloudnative-pg-v0.21.2...cloudnative-pg-v0.21.3) CloudNativePG Operator Helm Chart #### What's Changed - Add 'additionalEnvVars' to the chart by [@​Stevenpc3](https://togithub.com/Stevenpc3) in [https://github.com/cloudnative-pg/charts/pull/303](https://togithub.com/cloudnative-pg/charts/pull/303) #### New Contributors - [@​Stevenpc3](https://togithub.com/Stevenpc3) made their first contribution in [https://github.com/cloudnative-pg/charts/pull/303](https://togithub.com/cloudnative-pg/charts/pull/303) **Full Changelog**: cloudnative-pg/charts@cloudnative-pg-v0.21.2...cloudnative-pg-v0.21.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on saturday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/sp3nx0r/homelab). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9oZWxtIiwidHlwZS9wYXRjaCJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Add ability to set additional ENV vars via
additionalEnv
value.Array containing extra environment variables which can be templated. You can add this to an additional override file or example putting this in override.yaml
Then deploy with
helm upgrade -i cnpg -n namespace-a charts/cnpg/ -f override.yaml
will generate (partial template below)
With these logs