Documentation
¶
Overview ¶
Package v1alpha1 contains the version v1alpha1 data definition for the ResourceGroup custom resources.
To regenerate clientset and deepcopy run:
make clientgen
DO NOT MOVE THESE OUT OF THE PACKAGE DOCSTRING, GENERATING CODE PROPERLY DEPENDS ON THEM BEING HERE. +genclient +kubebuilder:object:generate=true +k8s:deepcopy-gen=package +groupName=kpt.dev
Index ¶
- Constants
- Variables
- func SchemeGroupVersionKind() schema.GroupVersionKind
- type Actuation
- type Condition
- type ConditionStatus
- type ConditionType
- type Descriptor
- type GroupKind
- type GroupMetadata
- type GroupStatus
- type Link
- type ObjMetadata
- type Reconcile
- type ResourceGroup
- type ResourceGroupList
- type ResourceGroupSpec
- type ResourceGroupStatus
- type ResourceStatus
- type Status
- type Strategy
Constants ¶
const ( OwnershipUnmatch = "Overlap" OwnershipEmpty = "Unknown" )
Variables ¶
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 ¶
func SchemeGroupVersionKind ¶
func SchemeGroupVersionKind() schema.GroupVersionKind
SchemeGroupVersionKind is the GVK of the ResourceGroup custom resource
Types ¶
type Actuation ¶
type Actuation string
actuation indicates whether actuation has been performed yet and how it went.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
func (*GroupKind) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupKind.
func (*GroupKind) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GroupMetadata ¶
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 ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Link.
func (*Link) DeepCopyInto ¶
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.
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.
// +optional
// +kubebuilder:default:=0
ObservedGeneration int64 `json:"observedGeneration"`
// resourceStatuses lists the status for each resource in the group
// +optional
ResourceStatuses []ResourceStatus `json:"resourceStatuses,omitempty"`
// subgroupStatuses lists the status for each subgroup.
// +optional
SubgroupStatuses []GroupStatus `json:"subgroupStatuses,omitempty"`
// conditions lists the conditions of the current status for the group
// +optional
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.