TemplateProcessor can add custom resource schemas to openapi

This commit is contained in:
Katrina Verey
2021-05-12 14:48:03 -07:00
parent 9557888b32
commit 0fdf0f825f
9 changed files with 270 additions and 19 deletions

View File

@@ -9,6 +9,7 @@ import (
"log"
"path/filepath"
"github.com/markbates/pkger"
"sigs.k8s.io/kustomize/kyaml/errors"
"sigs.k8s.io/kustomize/kyaml/fn/framework"
"sigs.k8s.io/kustomize/kyaml/fn/framework/command"
@@ -221,7 +222,7 @@ func ExampleTemplateProcessor_generate_files() {
// Templates
ResourceTemplates: []framework.ResourceTemplate{{
Templates: framework.TemplatesFromFile(
filepath.Join("testdata", "example", "templatefiles", "deployment.template"),
pkger.Include("/fn/framework/testdata/example/templatefiles/deployment.template"),
),
}},
}