v1alpha1

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InventoryLabelKey is the label stored on the ConfigMap
	// inventory object. The value of the label is a unique
	// identifier (by default a UUID), representing the set of
	// objects applied at the same time as the inventory object.
	// This inventory object is used for pruning and deletion.
	InventoryLabelKey = "inv.kform.dev/inventory-id"

	// InventoryOwnerKey is the annotation key indicating the inventory owning an object.
	InventoryOwnerKey = "inv.kform.dev/inventory-owner"
)

Variables

This section is empty.

Functions

func MarshalPackages

func MarshalPackages(ctx context.Context, pkgs store.Storer[store.Storer[data.BlockData]]) ([]byte, error)

func MarshalProviders

func MarshalProviders(providers map[string]string) ([]byte, error)

Types

type ActuationStatus

type ActuationStatus int
const (
	ActuationPending   ActuationStatus = iota // Pending
	ActuationSucceeded                        // Succeeded
	ActuationSkipped                          // Skipped
	ActuationFailed                           // Failed
)

func (ActuationStatus) String

func (i ActuationStatus) String() string

type ActuationStrategy

type ActuationStrategy int
const (
	ActuationStrategyApply  ActuationStrategy = iota // Apply
	ActuationStrategyDelete                          // Delete
)

func (ActuationStrategy) String

func (i ActuationStrategy) String() string

type Inventory

type Inventory struct {
	Providers map[string]string            `json:"providers,omitempty" yaml:"providers,omitempty"`
	Packages  map[string]*PackageInventory `json:"packages,omitempty" yaml:"packages,omitempty"`
}

type Object

type Object struct {
	ObjectRef ObjectReference `json:"objectRef,omitempty" yaml:"objectRef,omitempty"`
	// Strategy indicates the method of actuation (apply or delete) used or planned to be used.
	Strategy ActuationStrategy `json:"strategy,omitempty" yaml:"strategy,omitempty"`
	// Actuation indicates whether actuation has been performed yet and how it went.
	Actuation ActuationStatus `json:"actuation,omitempty" yaml:"actuation,omitempty"`
	// Reconcile indicates whether reconciliation has been performed yet and how it went.
	Reconcile ReconcileStatus `json:"reconcile,omitempty" yaml:"reconcile,omitempty"`
}

func (Object) GetRnNode

func (r Object) GetRnNode(blockType, resourceType, resourceID string) *yaml.RNode

type ObjectReference

type ObjectReference struct {
	// Group identifies an API namespace for REST resources.
	// If group is omitted, it is treated as the "core" group.
	// More info: https://kubernetes.io/docs/reference/using-api/#api-groups
	// +optional
	Group string `json:"group,omitempty" yaml:"group,omitempty"`

	// Version identifies an API Version for REST resources.
	Version string `json:"version,omitempty" version:"group,omitempty"`

	// Kind identifies a REST resource within a Group.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
	Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`

	// Name identifies an object instance of a REST resource.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
	Name string `json:"name,omitempty" yaml:"name,omitempty"`

	// Namespace identifies a group of objects across REST resources.
	// If namespace is specified, the resource must be namespace-scoped.
	// If namespace is omitted, the resource must be cluster-scoped.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
	// +optional
	Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
}

ObjectReference is a reference to a KRM resource by name and kind.

Kubernetes only stores one API Version for each Kind at any given time, so version is not used when referencing objects.

type PackageInventory

type PackageInventory struct {
	PackageResources map[string][]Object `json:",inline" yaml:",inline"`
}

type ReconcileStatus

type ReconcileStatus int
const (
	ReconcilePending   ReconcileStatus = iota // Pending
	ReconcileSucceeded                        // Succeeded
	ReconcileSkipped                          // Skipped
	ReconcileFailed                           // Failed
	ReconcileTimeout                          // Timeout
)

func (ReconcileStatus) String

func (i ReconcileStatus) String() string

Jump to

Keyboard shortcuts

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