Commit Graph

82 Commits

Author SHA1 Message Date
Valentin Flaux 3daaea0a1c feat(pkg/engine): expose subcharts scope in parent
Expose the scope (.Values, .Charts, .Releases etc.) of subcharts to the parent scope.

Signed-off-by: Valentin Flaux <vflaux@oui.sncf>
2021-07-20 12:24:27 +02:00
Marcus Speight 7a0739a863 Fail message is now the same as the required message.
Fixed #8973 Helm function 'fail' should not fail when doing 'helm lint'

Signed-off-by: Marcus Speight <marcus.speight@hotmail.co.uk>
2020-11-19 08:10:38 +00:00
Paul Brousseau 3192408415 Fixing typo in engine comments
Signed-off-by: Paul Brousseau <object88@gmail.com>
2020-09-13 21:31:38 -07:00
Matt Farina dbd001e532
Removing tiller language
Since Tiller is no longer part of Helm v3, internal documentation
language about Tiller can be removed

Signed-off-by: Matt Farina <matt@mattfarina.com>
2020-05-21 15:26:16 -04:00
Matt Butcher bb47286f09
fix linting error with lookup function (#7969)
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
2020-04-22 10:09:34 -06:00
Andre Sencioles d0726e07ab
Parse reference templates in predictable order (#7702)
* Parse reference templates in predictable order

Fix issue #7701

Signed-off-by: Andre Sencioles <asenci@gmail.com>

* Add test case for issue #7701 regression

Signed-off-by: Andre Sencioles <asenci@gmail.com>

* gofmt

Signed-off-by: Andre Sencioles <asenci@gmail.com>
2020-04-21 13:16:55 -06:00
Daniel Cheng 8528548441 fix recursion count in templates
Signed-off-by: Daniel Cheng <dcheng@us.ibm.com>
2020-02-07 18:35:21 -05:00
Matthew Fisher 9c680e604b
Merge pull request #7443 from zwwhdls/fix7439
allow limited recursion in templates
2020-01-27 09:51:29 -08:00
zwwhdls 16a85f7570 fix test-style
Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
2020-01-21 22:04:13 +08:00
zwwhdls 4eda4fa06d allow limited recursion in templates
Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
2020-01-21 21:46:34 +08:00
Matthew Fisher e84b61b2db
Merge pull request #6752 from raffaelespazzoli/lookup
Lookup template function
2020-01-14 11:01:45 -08:00
Josh Soref 02ad2b1187 Spelling (#7258)
* spelling: constraint

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: cryptographic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dependency

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: doesnot

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: don't

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unexpected

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dreadnought

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: default

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: envvars

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: evaluates

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: execute

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: extractor

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: frobnitz

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: generated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: implementation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: jabba

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: keywords

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: kubernetes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: override

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: package

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: parsable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: progress

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: recursively

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: release

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: cache

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: representing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: serializer

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: subchart

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: utilities

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2019-12-18 12:04:08 +00:00
raffaelespazzoli e98cd621f0 added rest client passed with action configuration
Signed-off-by: raffaelespazzoli <raffaele.spazzoli@gmail.com>
2019-12-17 08:31:47 -05:00
海的澜色 750b870aed fix stack overflow error (#7114)
* fixed #7111

Signed-off-by: zwwhdls <zwwhdls@hotmail.com>

* update error message

Signed-off-by: zwwhdls <zwwhdls@hotmail.com>

* add test case

Signed-off-by: zwwhdls <zwwhdls@hotmail.com>

* fix lint error

Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
2019-12-02 14:57:51 +00:00
Matt Farina 9bc7934f35
Updating the module for v3 as the major version
Signed-off-by: Matt Farina <matt@mattfarina.com>
2019-10-03 14:27:05 -04:00
Adam Reese 4fcc876786
ref(pkg/engine): cleanup of development `hack`
This was left in from some of the chart builder work.  I forgot to
remove it.

Signed-off-by: Adam Reese <adam@reese.io>
2019-09-03 15:31:58 -07:00
Martin Hickey 5906b9dfee Fix style conformance issue
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-07-30 16:00:18 +01:00
Ian Howell c92e3351f7 Switch to a more unique delimiter for template execution errors
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
2019-07-29 15:39:44 -05:00
Ian Howell 31b940a61d fix(engine): Fix eating too many colons during template execution
This fixes #6044, in which error parsing is greedily eating too many
colons, preventing users from using colons in their warning messages to
the `required` function

Signed-off-by: Ian Howell <ian.howell0@gmail.com>
2019-07-23 11:33:03 -05:00
Thomas O'Donnell 213f714604 Stop Lint from breaking when using required
Have updated the required filter so that it doesn't break when linting a
chart. This work is based off #4221 and #4748 which didn't make it into
the v3 branch.

Signed-off-by: Thomas O'Donnell <andy.tom@gmail.com>
2019-06-13 20:32:37 +02:00
Adam Reese b49db9e6e6
ref(pkg/chartutil): break up chartutil into logical files
Signed-off-by: Adam Reese <adam@reese.io>
2019-05-22 19:38:11 +02:00
Martin Hickey 0b809dd078 Validate library chart files after chart loaded
Validate the library chart files after the chart and
its depoendencies have been loaded. This is an update
following review comment:
- https://github.com/helm/helm/pull/5441#pullrequestreview-231339425

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
2019-05-01 14:56:32 +01:00
Ian Howell 278594fb0f fix(pkg/engine): Style changes on template errors
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
2019-04-09 12:34:13 -05:00
Ian Howell 92b86f6e74 fix(pkg/engine): Catch non-templating errors when rendering templates
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
2019-04-09 10:54:01 -05:00
Ian Howell 33b1ede570 fix(pkg/engine): Clean up template error messages
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
2019-04-08 16:48:21 -05:00
Adam Reese 295092cd7d
ref(pkg/action): refactoring dup code and linter fixes
Signed-off-by: Adam Reese <adam@reese.io>
2019-03-26 11:11:27 -07:00
Adam Reese 895e9192d4
feat(*): use vanity import helm.sh/helm
Signed-off-by: Adam Reese <adam@reese.io>
2019-03-13 13:43:47 -07:00
Adam Reese 849f27d11f
ref(pkg/engine): make template specific functions private
Make template specific functions private to ensure they not misused and
make unit tests simpler.  We may export the template helpers later if
needed.

This lays the foundation for the new chart pipeline.

Signed-off-by: Adam Reese <adam@reese.io>
2019-03-06 15:45:52 -08:00
Adam Reese d841a1b1d9
fix(engine): make template rendering thread safe
See https://github.com/helm/helm/pull/4828

Signed-off-by: Adam Reese <adam@reese.io>
2019-03-05 12:56:39 -08:00
Adam Reese 4f26b658d8
change copyright to "Copyright The Helm Authors" 2018-08-24 12:03:55 -07:00
Adam Reese f012940d9c
ref(*): refactor chart/chartutil
ref(chartutil): move chart loading out of chartutil into new package
    add chart loader interface to allow lazy loading
feat(chart): create chart accessors
ref(*): cleanup requirements
ref(tiller): remove optional template engines
ref(tiller): simplify sorting releases and hooks
ref(*): code simplification
ref(hapi): move chart package out of hapi
ref(chart): add requirements and lock to Chart struct
2018-08-24 11:28:29 -07:00
Adam Reese 726e3c41be
feat(*): print stacktrace on error with debug enabled 2018-05-10 09:34:41 -07:00
Adam Reese 6345f04190
ref(hapi): convert protobuf to go types 2018-04-18 14:53:38 -07:00
scriptonist 5311bf40a8 Now returning error and stopping installation 2018-03-13 16:33:10 +05:30
scriptonist 6cfaa4ebf2 Added code to recover from a tiller pod crash in an event of template render failure 2018-03-09 18:30:01 +05:30
Lukas Eichler 8bc7dede18
fix(helm): Apply PR comments for tpl template name fix
Modified existing unit test to verify the changed behavior.
Removed debug print.
2017-12-03 17:39:51 +01:00
Lukas Eichler 1cebc760a0
Fixed warning for missing formating parameter inside error message. 2017-12-03 17:39:51 +01:00
Lukas Eichler 2c338db1bd
fix(helm): Set template context inside tpl function to outer function.
docs(helm): Added documentation about tpl function
2017-12-03 17:39:51 +01:00
Lukas Eichler 39db9ec6e8 Merge branch 'master' into master 2017-06-08 18:40:34 +02:00
Lukas Eichler 439f1b31d1 Added unit test for include in tpl function 2017-05-28 10:55:15 +02:00
Lukas Eichler ce8e8d6778 Added storage of parsed templates in engine 2017-05-28 08:35:18 +02:00
Matt Butcher 8937c775a9
fix(2452): sort templates before parse
This sorts templates by depth before sending them to the template
parser. Deepest templates are parsed first, with umbrella templates
parsed last. Since template definition names are LIFO, that means that
the highest level templates will claim the namespace.

Or, to put it simply, you can predictably override a child's defined
template by re-defining it in a parent chart.

Closes #2452
2017-05-26 18:01:49 -06:00
Matt Butcher 5c227bffbb Merge pull request #2361 from databus23/dont_render_partials
Skip rendering partials
2017-05-05 16:44:30 -06:00
Lukas Eichler 2521c526d9 - Changed error behaviour to returning an error instead of writing the error in the template
- Added tests for using a function inside a template that is evaluated using the "tpl" function
2017-05-02 09:44:26 +02:00
Lukas Eichler d01f7978d2 Added implementation for a tpl function that evaluates a string as a template.
Implementation for #1978
2017-05-02 09:44:26 +02:00
Fabian Ruff b94eb82d12 Skip rendering partials
The output of a rendered partial is not used and rendering it might fail if it expects different values
2017-05-01 02:00:09 +02:00
Fabian Ruff 124235ffed Fail template execution if included template fails 2017-04-30 01:00:31 +02:00
Steve Wilkerson 79a3db0a63 feat(helm): add support for required properties
Adds the `required` function in enginge.go to support required
properties in values.yml. When a chart developer wishes to specify
intent in requiring a value, they can use this function to declare
an error message that gets returned when chart rendering fails
when a required value is not present in values.yml.

Closes #1580
2017-03-08 12:49:23 -06:00
Fabian Ruff 43a6bcff40 Add .Template.BasePath to template system 2017-03-06 23:19:49 +01:00
Jack Zampolin fc60d51be9 Add toToml function 2017-03-01 10:19:21 -08:00