resource

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInputRevisions added in v0.0.10

func NewInputRevisions(obj client.Object, refKey string) *apiv1.InputRevisions

func Slice

func Slice(comp *apiv1.Composition, previous []*apiv1.ResourceSlice, outputs []*unstructured.Unstructured, maxJsonBytes int) ([]*apiv1.ResourceSlice, error)

Slice builds a new set of resource slices by merging a new set of resources onto an old set of slices. - New and updated resources are partitioned across slices per maxJsonBytes - Removed resources are converted into "tombstones" i.e. manifests with Deleted == true

Types

type ManifestRef added in v0.0.7

type ManifestRef struct {
	Slice types.NamespacedName
	Index int // position of this manifest within the slice
}

ManifestRef references a particular resource manifest within a resource slice.

type Ref

type Ref struct {
	Name, Namespace, Group, Kind string
}

Ref refers to a specific synthesized resource.

type Resource

type Resource struct {
	Ref               Ref
	Manifest          *apiv1.Manifest
	ManifestRef       ManifestRef
	ReconcileInterval *metav1.Duration
	GVK               schema.GroupVersionKind
	SliceDeleted      bool
	ReadinessChecks   readiness.Checks
	Patch             jsonpatch.Patch
	DisableUpdates    bool
	ReadinessGroup    int

	// DefinedGroupKind is set on CRDs to represent the resource type they define.
	DefinedGroupKind *schema.GroupKind
	// contains filtered or unexported fields
}

Resource is the controller's internal representation of a single resource out of a ResourceSlice.

func NewResource

func NewResource(ctx context.Context, renv *readiness.Env, slice *apiv1.ResourceSlice, index int) (*Resource, error)

func (*Resource) Deleted

func (r *Resource) Deleted() bool

func (*Resource) FindStatus added in v0.0.7

func (r *Resource) FindStatus(slice *apiv1.ResourceSlice) *apiv1.ResourceState

func (*Resource) HasBeenSeen

func (l *Resource) HasBeenSeen() bool

func (*Resource) MatchesLastSeen

func (l *Resource) MatchesLastSeen(rv string) bool

func (*Resource) NeedsToBePatched added in v0.0.6

func (r *Resource) NeedsToBePatched(current *unstructured.Unstructured) bool

func (*Resource) ObserveReconciliation

func (l *Resource) ObserveReconciliation() time.Duration

func (*Resource) ObserveVersion

func (l *Resource) ObserveVersion(rv string)

func (*Resource) Parse

func (r *Resource) Parse() (*unstructured.Unstructured, error)

Jump to

Keyboard shortcuts

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