manifest

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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.

const (
	CRDScopeCluster    CRDScope = "Cluster"
	CRDScopeNamespaced CRDScope = "Namespaced"
)

type CRDScopeEntry added in v0.2.1

type CRDScopeEntry struct {
	Scope    CRDScope
	Versions []string
}

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

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

func DecodeDocumentRoots(path string, reader io.Reader) ([]Document, error)

func DecodeDocuments

func DecodeDocuments(path string, reader io.Reader) ([]Document, error)

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

func (Identity) String

func (i Identity) String() string

type ResourceFilter

type ResourceFilter struct {
	SkipKinds   []string
	SkipCRDs    bool
	SkipSecrets bool
}

ResourceFilter describes rendered Kubernetes resources that should be dropped.

func (ResourceFilter) Drop

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
}

func (SettingsResourceFilter) Drop

func (f SettingsResourceFilter) Drop(id Identity, cluster string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL