mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Add FieldSetter filter
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
|||||||
"sigs.k8s.io/kustomize/kyaml/kio"
|
"sigs.k8s.io/kustomize/kyaml/kio"
|
||||||
"sigs.k8s.io/kustomize/kyaml/openapi"
|
"sigs.k8s.io/kustomize/kyaml/openapi"
|
||||||
"sigs.k8s.io/kustomize/kyaml/setters2"
|
"sigs.k8s.io/kustomize/kyaml/setters2"
|
||||||
|
"sigs.k8s.io/kustomize/kyaml/yaml"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FieldSetter sets the value for a field setter.
|
// FieldSetter sets the value for a field setter.
|
||||||
@@ -23,6 +24,17 @@ type FieldSetter struct {
|
|||||||
Description string
|
Description string
|
||||||
|
|
||||||
SetBy string
|
SetBy string
|
||||||
|
|
||||||
|
Count int
|
||||||
|
|
||||||
|
OpenAPIPath string
|
||||||
|
|
||||||
|
ResourcesPath string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fs *FieldSetter) Filter(input []*yaml.RNode) ([]*yaml.RNode, error) {
|
||||||
|
fs.Count, _ = fs.Set(fs.OpenAPIPath, fs.ResourcesPath)
|
||||||
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set updates the OpenAPI definitions and resources with the new setter value
|
// Set updates the OpenAPI definitions and resources with the new setter value
|
||||||
|
|||||||
Reference in New Issue
Block a user