Documentation ¶
Index ¶
- Variables
- func ClearField(node *kyaml.RNode, fieldPath []string) (*kyaml.RNode, error)
- func ClearFieldFor(node *kyaml.RNode, gvk schema.GroupVersionKind, fieldPath []string) (*kyaml.RNode, error)
- func CreateAddAnnotationsPlugin(annotations map[string]string) *builtins.AnnotationsTransformerPlugin
- func CreateAddLabelsPlugin(componentName string) *builtins.LabelTransformerPlugin
- func CreateNamespaceApplierPlugin(targetNamespace string) *builtins.NamespaceTransformerPlugin
- func CreateSetLabelsPlugin(labels map[string]string) *builtins.LabelTransformerPlugin
- type RemoverFilter
- type RemoverPlugin
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AllowListedFields = []RemoverPlugin{ { Gvk: gvk.Deployment, Path: []string{"spec", "template", "spec", "containers", "*", "resources"}, }, { Gvk: gvk.Deployment, Path: []string{"spec", "replicas"}, }, } )
Functions ¶
func ClearField ¶ added in v2.23.0
func ClearFieldFor ¶ added in v2.23.0
func CreateAddAnnotationsPlugin ¶ added in v2.23.0
func CreateAddAnnotationsPlugin(annotations map[string]string) *builtins.AnnotationsTransformerPlugin
func CreateAddLabelsPlugin ¶ added in v2.14.0
func CreateAddLabelsPlugin(componentName string) *builtins.LabelTransformerPlugin
CreateAddLabelsPlugin creates a label transformer plugin that ensures resources to which this plugin is applied will have the Open Data Hub common labels included.
It has a following characteristics:
- It adds labels to the "metadata/labels" path for all resource kinds.
- It adds labels to the "spec/template/metadata/labels" and "spec/selector/matchLabels" paths for resources of kind "Deployment".
func CreateNamespaceApplierPlugin ¶ added in v2.14.0
func CreateNamespaceApplierPlugin(targetNamespace string) *builtins.NamespaceTransformerPlugin
CreateNamespaceApplierPlugin creates a plugin to ensure resources have the specified target namespace.
func CreateSetLabelsPlugin ¶ added in v2.23.0
func CreateSetLabelsPlugin(labels map[string]string) *builtins.LabelTransformerPlugin
Types ¶
type RemoverFilter ¶ added in v2.16.0
type RemoverFilter struct { Gvk schema.GroupVersionKind Path []string }
type RemoverPlugin ¶ added in v2.16.0
type RemoverPlugin struct { Gvk schema.GroupVersionKind Path []string }
Removes the field from the resources of ResMap if they match GVK.
func (*RemoverPlugin) Transform ¶ added in v2.16.0
func (p *RemoverPlugin) Transform(m resmap.ResMap) error
Transform removes the field from ResMap if they match filter.
func (*RemoverPlugin) TransformResource ¶ added in v2.16.0
func (p *RemoverPlugin) TransformResource(r *resource.Resource) error
TransformResource works only on one resource, not on the whole ResMap.
Click to show internal directories.
Click to hide internal directories.