Files
k3s/pkg/agent/templates/templates_linux.go
Brad Davidson ad668b3897 Update containerd config schema to version 3
Ref: https://github.com/containerd/containerd/blob/release/2.0/docs/cri/config.md

Since this is a breaking change, add support for a new v3 template file. If no v3 template is present, fall back to checking for the legacy v2 template and render the old structure.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit bc45972398)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:22 -08:00

20 lines
321 B
Go

//go:build linux
package templates
import (
"encoding/json"
"text/template"
)
// Linux config templates do not need fixups
var templateFuncs = template.FuncMap{
"deschemify": func(s string) string {
return s
},
"toJson": func(v interface{}) string {
output, _ := json.Marshal(v)
return string(output)
},
}