mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Add support for {{ template "base" . }}
in etc/containerd/config.toml.tmpl (#7991)
Signed-off-by: Simon Kirsten <simonkirsten24@gmail.com>
This commit is contained in:
parent
6d360e6473
commit
546dc247a0
@ -131,6 +131,7 @@ enable_keychain = true
|
||||
func ParseTemplateFromConfig(templateBuffer string, config interface{}) (string, error) {
|
||||
out := new(bytes.Buffer)
|
||||
t := template.Must(template.New("compiled_template").Parse(templateBuffer))
|
||||
template.Must(t.New("base").Parse(ContainerdConfigTemplate))
|
||||
if err := t.Execute(out, config); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
@ -179,6 +179,7 @@ func ParseTemplateFromConfig(templateBuffer string, config interface{}) (string,
|
||||
},
|
||||
}
|
||||
t := template.Must(template.New("compiled_template").Funcs(funcs).Parse(templateBuffer))
|
||||
template.Must(t.New("base").Parse(ContainerdConfigTemplate))
|
||||
if err := t.Execute(out, config); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user