Struct ktmpl::Template [−][src]
pub struct Template { /* fields omitted */ }
Expand description
A Kubernetes manifest template and the values for each of its parameters.
Implementations
Creates a new template.
Parameters
- template_contents: The YAML template file’s contents.
- parameter_values: A map of the template’s parameters and the user-supplied values for each.
- secrets: A list of Kubernetes secrets whose data keys should be Base64 encoded after parameter interpolation.
Errors
Returns an error if:
- There was more than one YAML document present in the template contents.
- The YAML document did not contain an “objects” key or it was not an array value.
- The YAML document did not contain a “parameters” key or it was not an array value.
- One of the parameters doesn’t have a “name” key.
- One of the parameters specifies an invalid “parameterType”.
- One of the parameters requires a value which wasn’t supplied.
- Any of the provided secrets were not found in the template.
- There was an error in the structure of a secret that prevented its data from being Base64 encoded.