Documentation ¶
Index ¶
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 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.
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.