Matthew Fisher
1b1d6bba9c
fix(lookup_func): do not return error when object is not found
...
Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
5 years ago
Matthew Fisher
9c680e604b
Merge pull request #7443 from zwwhdls/fix7439
...
allow limited recursion in templates
5 years ago
zwwhdls
16a85f7570
fix test-style
...
Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
5 years ago
zwwhdls
4eda4fa06d
allow limited recursion in templates
...
Signed-off-by: zwwhdls <zwwhdls@hotmail.com>
5 years ago
Matthew Fisher
e84b61b2db
Merge pull request #6752 from raffaelespazzoli/lookup
...
Lookup template function
5 years ago
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>
5 years ago
raffaelespazzoli
fa643cfa31
fixed golint
...
Signed-off-by: raffaelespazzoli <raffaele.spazzoli@gmail.com>
5 years ago
raffaelespazzoli
a62ba04962
additional fixes based on @thomastaylor312 comment
...
Signed-off-by: raffaelespazzoli <raffaele.spazzoli@gmail.com>
5 years ago
raffaelespazzoli
0bb4eaace7
addressing some feedback from @thomastaylor312
...
Signed-off-by: raffaelespazzoli <raffaele.spazzoli@gmail.com>
5 years ago
raffaelespazzoli
e98cd621f0
added rest client passed with action configuration
...
Signed-off-by: raffaelespazzoli <raffaele.spazzoli@gmail.com>
5 years ago
raffaelespazzoli
b3495c7353
added license header
...
Signed-off-by: raffaelespazzoli <raffaele.spazzoli@gmail.com>
5 years ago
raffaelespazzoli
02ce01b241
fixed circle ci issues
...
Signed-off-by: raffaelespazzoli <raffaele.spazzoli@gmail.com>
5 years ago
raffaelespazzoli
30d245a0e3
added check on namespaced resource
...
Signed-off-by: raffaelespazzoli <raffaele.spazzoli@gmail.com>
5 years ago
raffaelespazzoli
d564d4bf2d
first lookup template function implementation
...
Signed-off-by: raffaelespazzoli <raffaele.spazzoli@gmail.com>
5 years ago
海的澜色
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>
5 years ago
KUOKA Yusuke
4c351c7248
fix(v3): fix type error while merging map loaded with `fromYaml` template func ( #6630 )
...
Fixes #6626
Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
5 years ago
Matt Farina
9bc7934f35
Updating the module for v3 as the major version
...
Signed-off-by: Matt Farina <matt@mattfarina.com>
5 years ago
Matt Farina
967f4fed42
Update dependencies
...
* Kubernetes updated to 1.16.1
* SemVer and Sprig updated to latest releases that leverage go
modules
* Tests and checks updated. These already landed in v2 via PR 6457
Signed-off-by: Matt Farina <matt@mattfarina.com>
5 years ago
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>
5 years ago
Martin Hickey
5906b9dfee
Fix style conformance issue
...
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
5 years ago
Ian Howell
c92e3351f7
Switch to a more unique delimiter for template execution errors
...
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
5 years ago
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>
5 years ago
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>
6 years ago
Adam Reese
b49db9e6e6
ref(pkg/chartutil): break up chartutil into logical files
...
Signed-off-by: Adam Reese <adam@reese.io>
6 years ago
Matthew Fisher
757eb88d6c
Merge pull request #5441 from hickeyma/update-lib-charts
...
feat(*): Add capability for application charts to be used as library charts
6 years ago
Josh Dolitsky
a12a396aab
Helm 3: registry login/logout ( #5597 )
...
* login/logout placeholders
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
* use latest oras
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
* use docker auth system
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
* working login+push
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
* working on tests
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
* fix typo in htpasswd
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
* rename credsfile to config.json
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
* add flags for username/password
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
* disable logout test broken on linux
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
* upgrade to oras 0.4.0
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
* re-enable logout test
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
* panic for uncaught errors
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
* move login/logout to new registry subcommand
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
6 years ago
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>
6 years ago
Ian Howell
278594fb0f
fix(pkg/engine): Style changes on template errors
...
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
6 years ago
Ian Howell
92b86f6e74
fix(pkg/engine): Catch non-templating errors when rendering templates
...
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
6 years ago
Ian Howell
33b1ede570
fix(pkg/engine): Clean up template error messages
...
Signed-off-by: Ian Howell <ian.howell0@gmail.com>
6 years ago
Adam Reese
295092cd7d
ref(pkg/action): refactoring dup code and linter fixes
...
Signed-off-by: Adam Reese <adam@reese.io>
6 years ago
Adam Reese
895e9192d4
feat(*): use vanity import helm.sh/helm
...
Signed-off-by: Adam Reese <adam@reese.io>
6 years ago
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>
6 years ago
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>
6 years ago
Adam Reese
2b81eea1e2
ref(*): replace byte array with map for Release config
...
Signed-off-by: Adam Reese <adam@reese.io>
6 years ago
Adam Reese
516c53dae6
ref(chart): use map for chart.Values
...
Signed-off-by: Adam Reese <adam@reese.io>
6 years ago
Adam Reese
4f26b658d8
change copyright to "Copyright The Helm Authors"
6 years ago
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
6 years ago
Adam Reese
726e3c41be
feat(*): print stacktrace on error with debug enabled
7 years ago
Adam Reese
4c95185164
ref(*): replace chart.config with []byte
7 years ago
Adam Reese
36536d77ba
ref(*): remove protobuf any type
7 years ago
Adam Reese
6345f04190
ref(hapi): convert protobuf to go types
7 years ago
scriptonist
5311bf40a8
Now returning error and stopping installation
7 years ago
scriptonist
6cfaa4ebf2
Added code to recover from a tiller pod crash in an event of template render failure
7 years ago
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.
7 years ago
Lukas Eichler
1cebc760a0
Fixed warning for missing formating parameter inside error message.
7 years ago
Lukas Eichler
2c338db1bd
fix(helm): Set template context inside tpl function to outer function.
...
docs(helm): Added documentation about tpl function
7 years ago
Lukas Eichler
39db9ec6e8
Merge branch 'master' into master
8 years ago
Lukas Eichler
9cd9fc47df
removed debug file
8 years ago
Lukas Eichler
439f1b31d1
Added unit test for include in tpl function
8 years ago
Lukas Eichler
ce8e8d6778
Added storage of parsed templates in engine
8 years ago
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
8 years ago
Matt Butcher
5c227bffbb
Merge pull request #2361 from databus23/dont_render_partials
...
Skip rendering partials
8 years ago
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
8 years ago
Lukas Eichler
d01f7978d2
Added implementation for a tpl function that evaluates a string as a template.
...
Implementation for #1978
8 years ago
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
8 years ago
Fabian Ruff
124235ffed
Fail template execution if included template fails
8 years ago
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
8 years ago
Fabian Ruff
43a6bcff40
Add .Template.BasePath to template system
8 years ago
Jack Zampolin
fc60d51be9
Add toToml function
8 years ago
YuviPanda
5c52fe6ad6
Add ToJson and FromJson template functions
8 years ago
Matt Butcher
cb0a6c7e07
feat(tiller): add {{.Capabilities}} object
...
This adds the {{.Capabilities}} object to the template variables so that
chart authors can write charts that are aware of teh Kubernetes
capabilities of the current cluster.
Closes #1608
8 years ago
Matt Butcher
d8540d78f1
feat(tiller): add fromYaml to template functions
...
This adds a fromYaml template function.
Closes #1604
8 years ago
Andrew Stuart
6760aa1588
Add Lines method, remove path utils (Sprig pr)
8 years ago
Andrew Stuart
5d58b7792c
Fix erroneous import
8 years ago
Andrew Stuart
9771973888
Add AsSecrets, AsConfig methods for Files object. Move ToYaml to chartutil
8 years ago
Adnan Abdulhussein
f97dbe33da
fix(tests): prefix template names with "templates/"
8 years ago
Matt Butcher
36f7eb0b2a
fix(linter): add engine.FuncMap so linter can use real function list
...
This adds a function engine.FuncMap that returns a function mapping that
better represents the functions passed to a template. The linting logic
is reconfigured to use this function instead of the sprig.FuncMap
function.
Closes #1366
8 years ago
Matt Butcher
431cc46cad
feat(tiller): add toYaml template function
...
This adds the function toYaml to the Engine template functions.
Closes #1225
8 years ago
joe2far
72e7b22999
minor engine unit test fix
8 years ago
vaikas-google
492dbb3791
Add support for NOTES.txt file
8 years ago
Matt Butcher
84761a559a
fix(helm): remove extra linter output
...
Closes #1076
8 years ago
Matt Butcher
b7945d05c4
ref(templates): change GetString to Get
...
This changes "pkg/chartutil".Files.Get to return a string, removes
"pkg/chartutil".Files.GetString, and adds
"pkg/chartutil".Files.GetBytes.
Closes #1020
8 years ago
Matt Butcher
9718c9e7c8
feat(engine): add 'partial' function
...
This adds a context-aware template function called 'partial' that will
allow rendering other templates in a chart into a string value, which
can then be piped to other functions. Usage is something like
'{{partial 'path/to/template.yaml' | indent 2}}'
This might be a bad idea.
Closes #1005
8 years ago
Matt Butcher
033dbfe75e
feat(tiller): add Files map to templates
...
Templates can now access the non-template files in a chart by using
the '{{.Files}}' map inside of a template.
Relates to #950
8 years ago
Matt Butcher
95eeba3805
fix(tiller): merge -f values correctly
...
This fixes a bug in which passed-in values files were not correctly
merged into the chart's default values YAML data. I believe it also
fixes some other prioritization bugs in values merging.
The existing unit test was wrong (see TestCoalesceValues). It is
fixed now. Also added more tests to simulate issue #971 .
In the course of writing this, I removed some vestigial code as
mentioned in #920 .
Closes #971
Closes #920
8 years ago
Adam Reese
a14e76a65c
chore(*): add canonical import path annotation
...
https://golang.org/doc/go1.4#canonicalimports
8 years ago
Matt Butcher
73a2890277
fix(engine): change template naming
...
Template paths were relative to the chart that contained them, which
meant that all templates were named 'template/SOMETHING'. This made it
trivially easy to hit namespace collisions as in #933 .
Template path names are essentially opaque strings so this patch simply
changes them to be qualified by parent chart.
8 years ago
Matt Butcher
532f03ec78
feat(tiller): add .Template object in templates
...
This allows templates to access information about the template file.
Right now, the template can only access the .Template.Name, which is the
chart-relative path to the current template.
Closes #894
9 years ago
Matt Butcher
ab4e20c278
Merge pull request #888 from technosophos/fix/887-no-value-fix
...
fix(tiller): stop printing <no value> when var is missing
9 years ago
Matt Butcher
96ac6ebc6c
fix(tiller): stop printing <no value> when var is missing
...
Instead of printing "no value", this prints an empty string by
default, but adds a Strict flag on the engine, which (if true)
will cause a template render to error out if a value is not supplied.
Strict is set to false so that developers can instead use `default` to
set default values.
9 years ago
Miguel Martinez
2eff17cb6d
Removing debugging line
9 years ago
Matt Butcher
225d3a8adc
test(engine): add test case for deep release passing
9 years ago
Matt Butcher
e00f774a5d
fix(engine): remove debugging output
9 years ago
Matt Butcher
22ac61469f
feat(*): add Values namespace to templates
...
This adds the .Values namespace qualifier to all values
9 years ago
Matt Butcher
e757b24aed
fix(*): add license header
9 years ago
Matt Butcher
60f5341b91
feat(chartutil): support global variables
...
This provides support for "global" variables. It does this by
declaring "global" to be a special namespace. It then copies this
namespace into every subchart, coalescing it into any "global"
namespace found there.
The net result is that if "global.foo" is set in the YAML file, it
will be available to every chart/subchart as ".global.foo" regardless of
where that chart is in the subchart tree.
9 years ago
Matt Butcher
490cef784c
fix(tiller): refactor template render to use chartutil.
9 years ago
Matt Butcher
e8109048a9
fix(chartutil): move values coalescing into chartutil
9 years ago
Adam Reese
d95a144563
fix(chartutil): fix nil error on values
...
Fixes: https://github.com/kubernetes/helm/issues/803
9 years ago
Matt Butcher
9ca8c27e16
fix(*): change TOML to YAML
9 years ago
Adam Reese
818c878700
chore(*): use k8s.io as the import path
9 years ago
Matt Butcher
6db7c39b84
feat(helm, tiller): implement k8s portion of install
...
This commit finally ties `helm install` together with the Kubernetes
client library to make an end-to-end trip.
There were several small fixes to go on both client and server side,
along with some changes to proto to support better error reporting.
The alpine chart has been updated to exhibit how the new Helm works.
9 years ago
Matt Butcher
f098cb6fb6
fix(*): rewrite import paths
9 years ago
Matt Butcher
ba22a18fad
fix(engine): coalesce values in templates
9 years ago
Matt Butcher
07312c68e9
fix(engine): support chart template recursion
9 years ago
Matt Butcher
6077968341
feat(engine): add recursive template resolution
9 years ago
Matt Butcher
50f4349512
feat(tiller): add template and release to install
9 years ago
Matt Butcher
fa6a33c349
feat(storage): add basic implementation of storage
...
This is an in-memory storage layer for storing releases. This will be
superseded by the Kubernetes ConfigMap implementtion.
9 years ago
Matt Butcher
b04a1cc7d4
fix(tiller): set up Tiller environment correctly
...
And structure the tests better.
9 years ago