-
Notifications
You must be signed in to change notification settings - Fork 16.8k
[stable/spinnaker] Use "tpl" function to render the content of additional scripts #13045
Conversation
Hi @legal90. Thanks for your PR. I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @viglesiasce |
0f4d324
to
ea8fd74
Compare
/assign |
@maorfr Thanks! Do you know what needs to be done with e2e tests to make this PR passed? I see that the test error is not related to this PR changeset. |
/test pull-charts-e2e |
maybe there is something wrong with the tpl syntax? |
@maorfr Hm.. I don't think so. I verified this |
/test pull-charts-e2e |
1 similar comment
/test pull-charts-e2e |
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.
/lgtm
/lgtm cancel |
Removed LGTM while speaking to @legal90 related to some caveat using the
|
@legal90 can you add a note to the README.md to advising users that are using the older chart versions that this change might require some work with a workaround please? |
Yup, I will add a note about that. 👍 P.s. The actual example is: additionalConfigMaps:
create: true
data:
artifact-template-helm-chart.jinja: |-
[
{
"name": "{{ properties.chart_name }}",
"version": "{{ properties.chart_version }}",
"reference": "{{ properties.helm_account }}",
"type": "helm/chart"
}
] Since that is a Jinja template for Spinnaker, it should be dumped to a file as it is. After passing that through |
@dwardu89 I have changed this PR and left So, I believe using |
/lgtm |
…onal scripts and init scripts This allows to use variable interpolation in the body of these scripts. Signed-off-by: Mikhail Zholobov <legal90@gmail.com>
Signed-off-by: Mikhail Zholobov <legal90@gmail.com>
Signed-off-by: Mikhail Zholobov <legal90@gmail.com>
I've included the README.md changes from PR #13764, just to don't bump the version twice. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dwardu89, legal90 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…onal scripts (helm#13045) * [stable/spinnaker] Use "tpl" function to render the content of additional scripts and init scripts This allows to use variable interpolation in the body of these scripts. Signed-off-by: Mikhail Zholobov <legal90@gmail.com> * [stable/spinnaker] Bump chart version Signed-off-by: Mikhail Zholobov <legal90@gmail.com> * [stable/spinnaker] Update README.md Signed-off-by: Mikhail Zholobov <legal90@gmail.com>
…onal scripts (helm#13045) * [stable/spinnaker] Use "tpl" function to render the content of additional scripts and init scripts This allows to use variable interpolation in the body of these scripts. Signed-off-by: Mikhail Zholobov <legal90@gmail.com> * [stable/spinnaker] Bump chart version Signed-off-by: Mikhail Zholobov <legal90@gmail.com> * [stable/spinnaker] Update README.md Signed-off-by: Mikhail Zholobov <legal90@gmail.com>
What this PR does / why we need it:
This PR adds
tpl
fuction into templates foradditionalScripts
andadditionalInitScript
.This allows to use variable interpolation in the body of these scripts. For example:
Up until now we would have to hard-code the namespace and the account name in the custom script, which is not flexible.
Special notes for your reviewer:
These changes are backward compatible, because
tpl
works seamlessly with plain strings (which is the expected value there at this moment).However, since that is a new feature for this chart, I bumped the minor version number.
tpl
function is available in Helm >= v2.5.0.Checklist