Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBuiltInClusterScoped ¶ added in v0.1.18
func IsBuiltInClusterScoped(gvk schema.GroupVersionKind) bool
func IsKnownNamespacedBuiltIn ¶ added in v0.1.18
func IsKnownNamespacedBuiltIn(gvk schema.GroupVersionKind) bool
Types ¶
type CRDScope ¶ added in v0.2.1
type CRDScope string
CRDScope is a CustomResourceDefinition spec.scope value.
type CRDScopeEntry ¶ added in v0.2.1
CRDScopeEntry is the scope (and cheaply-captured versions) for one CRD's group/kind. Versions are retained for a later api-version inference plan.
type CRDScopeRegistry ¶ added in v0.2.1
type CRDScopeRegistry map[groupKind]CRDScopeEntry
CRDScopeRegistry maps a custom resource's {group, kind} to its declared scope.
func BuildCRDScopeRegistry ¶ added in v0.2.1
func BuildCRDScopeRegistry(objects []*unstructured.Unstructured) CRDScopeRegistry
BuildCRDScopeRegistry scans rendered objects for CustomResourceDefinition manifests and records each declared {group, kind} -> scope. Objects that are not v1 CRDs or that omit spec.group/spec.names.kind/spec.scope are ignored.
func (CRDScopeRegistry) IsClusterScoped ¶ added in v0.2.1
func (r CRDScopeRegistry) IsClusterScoped(gvk schema.GroupVersionKind) bool
IsClusterScoped consults the registry first, then the built-in cluster-scoped list.
func (CRDScopeRegistry) Scope ¶ added in v0.2.1
func (r CRDScopeRegistry) Scope(gvk schema.GroupVersionKind) (CRDScope, bool)
Scope returns the declared scope for a custom resource's group/kind.
type Document ¶
type Document struct {
Path string
Index int
Object *unstructured.Unstructured
RootObject *unstructured.Unstructured
}
func DecodeDocumentRoots ¶
type Identity ¶
type Identity struct {
Group string `json:"group" yaml:"group"`
Kind string `json:"kind" yaml:"kind"`
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
Name string `json:"name" yaml:"name"`
}
func IdentityOf ¶
func IdentityOf(obj *unstructured.Unstructured) Identity
type ResourceFilter ¶
ResourceFilter describes rendered Kubernetes resources that should be dropped.
func (ResourceFilter) Drop ¶
func (f ResourceFilter) Drop(obj *unstructured.Unstructured) bool
Drop reports whether obj should be excluded by the filter.
func (ResourceFilter) Empty ¶
func (f ResourceFilter) Empty() bool
Empty reports whether the filter has no effective drop rules.
type SettingsResourceFilter ¶
type SettingsResourceFilter struct {
Exclusions []config.ResourceFilterRule
Inclusions []config.ResourceFilterRule
}