Helm | - 0 views
-
Templates generate manifest files, which are YAML-formatted resource descriptions that Kubernetes can understand.
- ...88 more annotations...
-
The helm get manifest command takes a release name (full-coral) and prints out all of the Kubernetes resources that were uploaded to the server. Each file begins with --- to indicate the start of a YAML document
-
The values that are passed into a template can be thought of as namespaced objects, where a dot (.) separates each namespaced element.
-
When you want to test the template rendering, but not actually install anything, you can use helm install ./mychart --debug --dry-run
-
Using --dry-run will make it easier to test your code, but it won’t ensure that Kubernetes itself will accept the templates you generate.
-
Values: Values passed into the template from the values.yaml file and from user-supplied files. By default, Values is empty.
-
Files.GetBytes is a function for getting the contents of a file as an array of bytes instead of as a string. This is useful for things like images.
-
values.yaml is the default, which can be overridden by a parent chart’s values.yaml, which can in turn be overridden by a user-supplied values file, which can in turn be overridden by --set parameters.
-
While structuring data this way is possible, the recommendation is that you keep your values trees shallow, favoring flatness.
-
If you need to delete a key from the default values, you may override the value of the key to be null, in which case Helm will remove the key from the overridden values merge.
-
While we talk about the “Helm template language” as if it is Helm-specific, it is actually a combination of the Go template language, some extra functions, and a variety of wrappers to expose certain objects to the templates.
-
Drawing on a concept from UNIX, pipelines are a tool for chaining together a series of template commands to compactly express a series of transformations.
-
default DEFAULT_VALUE GIVEN_VALUE. This function allows you to specify a default value inside of the template, in case the value is omitted.
-
all static default values should live in the values.yaml, and should not be repeated using the default command
-
To use eq, ne, lt, gt, and, or, not etcetera place the operator at the front of the statement followed by its parameters just as you would a function.
-
A pipeline is evaluated as false if the value is: a boolean false a numeric zero an empty string a nil (empty or null) an empty collection (map, slice, tuple, dict, array)
-
When the template engine runs, it removes the contents inside of {{ and }}, but it leaves the remaining whitespace exactly as is.
-
{{- (with the dash and space added) indicates that whitespace should be chomped left, while -}} means whitespace to the right should be consumed.
-
Inside of the restricted scope, you will not be able to access the other objects from the parent scope.
-
the data in ConfigMaps data is composed of key/value pairs, where both the key and the value are simple strings.
-
A named template (sometimes called a partial or a subtemplate) is simply a template defined inside of a file, and given a name.
-
naming convention is to prefix each defined template with the name of the chart: {{ define "mychart.labels" }}