v1alpha1

package
v0.0.0-...-4efcaec Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the kpt.dev v1alpha1 API group +kubebuilder:object:generate=true +groupName=kpt.dev

Index

Constants

View Source
const (
	OwnershipUnmatch = "Overlap"
	OwnershipEmpty   = "Unknown"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "kpt.dev", Version: "v1alpha1"}

	// ResourceGroupKind is the kind for resourcegroup
	ResourceGroupKind = "ResourceGroup"

	// SubgroupGroupKind is group, kind used for sub groups.
	SubgroupGroupKind = GroupKind{Group: "kpt.dev", Kind: ResourceGroupKind}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Actuation

type Actuation string

actuation indicates whether actuation has been performed yet and how it went.

const (
	ActuationPending   Actuation = "Pending"
	ActuationSucceeded Actuation = "Succeeded"
	ActuationSkipped   Actuation = "Skipped"
	ActuationFailed    Actuation = "Failed"
)

type Condition

type Condition struct {
	// type of the condition
	Type ConditionType `json:"type"`

	// status of the condition
	Status ConditionStatus `json:"status"`

	// one-word CamelCase reason for the condition’s last transition
	// +optional
	Reason string `json:"reason,omitempty"`

	// human-readable message indicating details about last transition
	// +optional
	Message string `json:"message,omitempty"`

	// last time the condition transit from one status to another
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Condition) IsEmpty

func (cond Condition) IsEmpty() bool

IsEmpty checks whether cond is empty

type ConditionStatus

type ConditionStatus string
const (
	TrueConditionStatus    ConditionStatus = "True"
	FalseConditionStatus   ConditionStatus = "False"
	UnknownConditionStatus ConditionStatus = "Unknown"
)

type ConditionType

type ConditionType string
const (
	Reconciling ConditionType = "Reconciling"
	Stalled     ConditionType = "Stalled"
	// Ownership reflects if the current resource
	// reflects the status for the specification in the current inventory object.
	// Since two ResourceGroup CRs may contain the same resource in the inventory list.
	// The resource status listed in .status.resourceStatuses may only reflect
	// the object status in one group, which is identified by the inventory-id.
	// The ConditionStatus values doesn't make too much sense for OwnerShip type.
	// The actual meaning is captured in the condition message.
	Ownership ConditionType = "OwnershipOverlap"
)

type Descriptor

type Descriptor struct {
	// type can contain prefix, such as Application/WordPress or Service/Spanner
	// +optional
	Type string `json:"type,omitempty"`

	// revision is an optional revision for a group of resources
	// +optional
	Revision string `json:"revision,omitempty"`

	// description is a brief description of a group of resources
	// +optional
	Description string `json:"description,omitempty"`

	// links are a list of descriptive URLs intended to be used to surface
	// additional information
	// +optional
	Links []Link `json:"links,omitempty"`
}

func (*Descriptor) DeepCopy

func (in *Descriptor) DeepCopy() *Descriptor

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Descriptor.

func (*Descriptor) DeepCopyInto

func (in *Descriptor) DeepCopyInto(out *Descriptor)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GroupKind

type GroupKind struct {
	Group string `json:"group"`
	Kind  string `json:"kind"`
}

func (*GroupKind) DeepCopy

func (in *GroupKind) DeepCopy() *GroupKind

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupKind.

func (*GroupKind) DeepCopyInto

func (in *GroupKind) DeepCopyInto(out *GroupKind)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GroupMetadata

type GroupMetadata struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

Each item organizes and stores the identifying information for a ResourceGroup object. It includes name and namespace.

func (*GroupMetadata) DeepCopy

func (in *GroupMetadata) DeepCopy() *GroupMetadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupMetadata.

func (*GroupMetadata) DeepCopyInto

func (in *GroupMetadata) DeepCopyInto(out *GroupMetadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GroupStatus

type GroupStatus struct {
	GroupMetadata `json:",inline"`
	Status        Status      `json:"status"`
	Conditions    []Condition `json:"conditions,omitempty"`
}

Each item contains the status of a given group uniquely identified by its name and namespace.

func ToGroupStatuses

func ToGroupStatuses(statuses []ResourceStatus) []GroupStatus

func (*GroupStatus) DeepCopy

func (in *GroupStatus) DeepCopy() *GroupStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupStatus.

func (*GroupStatus) DeepCopyInto

func (in *GroupStatus) DeepCopyInto(out *GroupStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Link struct {
	// description explains the purpose of the link
	Description string `json:"description"`

	// url is the URL of the link
	URL string `json:"url"`
}

func (*Link) DeepCopy

func (in *Link) DeepCopy() *Link

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Link.

func (*Link) DeepCopyInto

func (in *Link) DeepCopyInto(out *Link)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ObjMetadata

type ObjMetadata struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
	GroupKind `json:",inline"`
}

each item organizes and stores the identifying information for an object. This struct (as a string) is stored in a grouping object to keep track of sets of applied objects.

func ToObjMetadata

func ToObjMetadata(groups []GroupMetadata) []ObjMetadata

func (*ObjMetadata) DeepCopy

func (in *ObjMetadata) DeepCopy() *ObjMetadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjMetadata.

func (*ObjMetadata) DeepCopyInto

func (in *ObjMetadata) DeepCopyInto(out *ObjMetadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ObjMetadata) GK

func (m ObjMetadata) GK() schema.GroupKind

GK returns a schema.GroupKind object for m

type Reconcile

type Reconcile string

reconcile indicates whether reconciliation has been performed yet and how it went.

const (
	ReconcilePending   Reconcile = "Pending"
	ReconcileSucceeded Reconcile = "Succeeded"
	ReconcileSkipped   Reconcile = "Skipped"
	ReconcileTimeout   Reconcile = "Timeout"
	ReconcileFailed    Reconcile = "Failed"
)

type ResourceGroup

type ResourceGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ResourceGroupSpec   `json:"spec,omitempty"`
	Status ResourceGroupStatus `json:"status,omitempty"`
}

ResourceGroup is the Schema for the resourcegroups API

func (*ResourceGroup) DeepCopy

func (in *ResourceGroup) DeepCopy() *ResourceGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceGroup.

func (*ResourceGroup) DeepCopyInto

func (in *ResourceGroup) DeepCopyInto(out *ResourceGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceGroup) DeepCopyObject

func (in *ResourceGroup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ResourceGroupList

type ResourceGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ResourceGroup `json:"items"`
}

ResourceGroupList contains a list of ResourceGroup

func (*ResourceGroupList) DeepCopy

func (in *ResourceGroupList) DeepCopy() *ResourceGroupList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceGroupList.

func (*ResourceGroupList) DeepCopyInto

func (in *ResourceGroupList) DeepCopyInto(out *ResourceGroupList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceGroupList) DeepCopyObject

func (in *ResourceGroupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ResourceGroupSpec

type ResourceGroupSpec struct {

	// resources contains a list of resources that form the resource group
	// +optional
	Resources []ObjMetadata `json:"resources,omitempty"`

	// subgroups contains a list of sub groups that the current group includes.
	// +optional
	Subgroups []GroupMetadata `json:"subgroups,omitempty"`

	// descriptor regroups the information and metadata about a resource group
	// +optional
	Descriptor Descriptor `json:"descriptor,omitempty"`
}

spec defines the desired state of ResourceGroup

func (*ResourceGroupSpec) DeepCopy

func (in *ResourceGroupSpec) DeepCopy() *ResourceGroupSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceGroupSpec.

func (*ResourceGroupSpec) DeepCopyInto

func (in *ResourceGroupSpec) DeepCopyInto(out *ResourceGroupSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceGroupStatus

type ResourceGroupStatus struct {

	// observedGeneration is the most recent generation observed.
	// It corresponds to the Object's generation, which is updated on
	// mutation by the API Server.
	// Everytime the controller does a successful reconcile, it sets
	// observedGeneration to match ResourceGroup.metadata.generation.
	ObservedGeneration int64 `json:"observedGeneration"`

	// resourceStatuses lists the status for each resource in the group
	ResourceStatuses []ResourceStatus `json:"resourceStatuses,omitempty"`

	// subgroupStatuses lists the status for each subgroup.
	SubgroupStatuses []GroupStatus `json:"subgroupStatuses,omitempty"`

	// conditions lists the conditions of the current status for the group
	Conditions []Condition `json:"conditions,omitempty"`
}

status defines the observed state of ResourceGroup

func (*ResourceGroupStatus) DeepCopy

func (in *ResourceGroupStatus) DeepCopy() *ResourceGroupStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceGroupStatus.

func (*ResourceGroupStatus) DeepCopyInto

func (in *ResourceGroupStatus) DeepCopyInto(out *ResourceGroupStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceStatus

type ResourceStatus struct {
	ObjMetadata `json:",inline"`
	Status      Status      `json:"status"`
	SourceHash  string      `json:"sourceHash,omitempty"`
	Conditions  []Condition `json:"conditions,omitempty"`
	Strategy    Strategy    `json:"strategy,omitempty"`
	Actuation   Actuation   `json:"actuation,omitempty"`
	Reconcile   Reconcile   `json:"reconcile,omitempty"`
}

each item contains the status of a given resource uniquely identified by its group, kind, name and namespace.

func (*ResourceStatus) DeepCopy

func (in *ResourceStatus) DeepCopy() *ResourceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceStatus.

func (*ResourceStatus) DeepCopyInto

func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Status

type Status string

status describes the status of a resource.

const (
	InProgress  Status = "InProgress"
	Failed      Status = "Failed"
	Current     Status = "Current"
	Terminating Status = "Terminating"
	NotFound    Status = "NotFound"
	Unknown     Status = "Unknown"
)

type Strategy

type Strategy string

strategy indicates the method of actuation (apply or delete) used or planned to be used.

const (
	Apply  Strategy = "Apply"
	Delete Strategy = "Delete"
)

Jump to

Keyboard shortcuts

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