Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the x v1alpha1 API group +kubebuilder:object:generate=true +groupName=kro.run
Index ¶
- Constants
- Variables
- func HasCondition(conditions []Condition, t ConditionType) bool
- type Condition
- type ConditionType
- type Dependency
- type Resource
- type ResourceGroup
- type ResourceGroupList
- type ResourceGroupSpec
- type ResourceGroupState
- type ResourceGroupStatus
- type ResourceInformation
- type Schema
- type Validation
Constants ¶
const ( // DefaultServiceAccountKey is the key to use for the default service account // in the serviceAccounts map. DefaultServiceAccountKey = "*" )
const (
KroDomainName = "kro.run"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: KroDomainName, Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func HasCondition ¶
func HasCondition(conditions []Condition, t ConditionType) bool
Types ¶
type Condition ¶
type Condition struct { // Type is the type of the Condition Type ConditionType `json:"type"` // Status of the condition, one of True, False, Unknown. Status metav1.ConditionStatus `json:"status"` // Last time the condition transitioned from one status to another. // +optional LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` // The reason for the condition's last transition. // +optional Reason *string `json:"reason,omitempty"` // A human readable message indicating details about the transition. // +optional Message *string `json:"message,omitempty"` // observedGeneration represents the .metadata.generation that the condition was set based upon. // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date // with respect to the current state of the instance. // +optional // +kubebuilder:validation:Minimum=0 ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
Condition is the common struct used by all CRDs managed by ACK service controllers to indicate terminal states of the CR and its backend AWS service API resource
func GetCondition ¶
func GetCondition(conditions []Condition, t ConditionType) *Condition
func NewCondition ¶
func NewCondition(t ConditionType, status metav1.ConditionStatus, reason, message string) Condition
NewCondition returns a new Condition instance.
func SetCondition ¶
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 ConditionType ¶
type ConditionType string
ConditionType is a type of condition for a resource.
const ( // ResourceGroupConditionTypeGraphSynced indicates the state of the directed // acyclic graph (DAG) that kro uses to manage the resources in a // ResourceGroup. ResourceGroupConditionTypeGraphVerified ConditionType = "GraphVerified" // ResourceGroupConditionTypeCustomResourceDefinitionSynced indicates the state of the // CustomResourceDefinition (CRD) that kro uses to manage the resources in a // ResourceGroup. ResourceGroupConditionTypeCustomResourceDefinitionSynced ConditionType = "CustomResourceDefinitionSynced" // ResourceGroupConditionTypeReconcilerReady indicates the state of the reconciler. // Whenever an ResourceGroup resource is created, kro will spin up a // reconciler for that resource. This condition indicates the state of the // reconciler. ResourceGroupConditionTypeReconcilerReady ConditionType = "ReconcilerReady" )
const ( InstanceConditionTypeReady ConditionType = "Ready" // Creating Deleting Migrating InstanceConditionTypeProgressing ConditionType = "Progressing" // Unexpected situation, behaviour, need human intervention InstanceConditionTypeDegraded ConditionType = "Degraded" // Something is wrong but i'm gonna try again InstanceConditionTypeError ConditionType = "Error" )
type Dependency ¶
type Dependency struct { // ID represents the id of the dependency resource ID string `json:"id,omitempty"` }
Dependency defines the dependency a resource has observed from the resources it points to based on expressions
func (*Dependency) DeepCopy ¶
func (in *Dependency) DeepCopy() *Dependency
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dependency.
func (*Dependency) DeepCopyInto ¶
func (in *Dependency) DeepCopyInto(out *Dependency)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Resource ¶
type Resource struct { // +kubebuilder:validation:Required ID string `json:"id,omitempty"` // +kubebuilder:validation:Required Template runtime.RawExtension `json:"template,omitempty"` // +kubebuilder:validation:Optional ReadyWhen []string `json:"readyWhen,omitempty"` // +kubebuilder:validation:Optional IncludeWhen []string `json:"includeWhen,omitempty"` }
func (*Resource) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.
func (*Resource) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 { // The schema of the resourcegroup, which includes the // apiVersion, kind, spec, status, types, and some validation // rules. // // +kubebuilder:validation:Required Schema *Schema `json:"schema,omitempty"` // The resources that are part of the resourcegroup. // // +kubebuilder:validation:Optional Resources []*Resource `json:"resources,omitempty"` // ServiceAccount configuration for controller impersonation. // Key is the namespace, value is the service account name to use. // Special key "*" defines the default service account for any // namespace not explicitly mapped. // // +kubebuilder:validation:Optional DefaultServiceAccounts map[string]string `json:"defaultServiceAccounts,omitempty"` }
ResourceGroupSpec 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 ResourceGroupState ¶
type ResourceGroupState string
ResourceGroupState defines the state of the resource group.
const ( // ResourceGroupStateActive represents the active state of the resource group. ResourceGroupStateActive ResourceGroupState = "Active" // ResourceGroupStateInactive represents the inactive state of the resource group ResourceGroupStateInactive ResourceGroupState = "Inactive" )
type ResourceGroupStatus ¶
type ResourceGroupStatus struct { // State is the state of the resourcegroup State ResourceGroupState `json:"state,omitempty"` // TopologicalOrder is the topological order of the resourcegroup graph TopologicalOrder []string `json:"topologicalOrder,omitempty"` // Conditions represent the latest available observations of an object's state Conditions []Condition `json:"conditions,omitempty"` // Resources represents the resources, and their information (dependencies for now) Resources []ResourceInformation `json:"resources,omitempty"` }
ResourceGroupStatus 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 ResourceInformation ¶
type ResourceInformation struct { // ID represents the id of the resources we're providing information for ID string `json:"id,omitempty"` // Dependencies represents the resource dependencies of a resource group Dependencies []Dependency `json:"dependencies,omitempty"` }
ResourceInformation defines the information about a resource in the resourcegroup
func (*ResourceInformation) DeepCopy ¶
func (in *ResourceInformation) DeepCopy() *ResourceInformation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInformation.
func (*ResourceInformation) DeepCopyInto ¶
func (in *ResourceInformation) DeepCopyInto(out *ResourceInformation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Schema ¶
type Schema struct { // The kind of the resourcegroup. This is used to generate // and create the CRD for the resourcegroup. // // +kubebuilder:validation:Required // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="kind is immutable" Kind string `json:"kind,omitempty"` // The APIVersion of the resourcegroup. This is used to generate // and create the CRD for the resourcegroup. // // +kubebuilder:validation:Required // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="apiVersion is immutable" APIVersion string `json:"apiVersion,omitempty"` // The spec of the resourcegroup. Typically, this is the spec of // the CRD that the resourcegroup is managing. This is adhering // to the SimpleSchema spec Spec runtime.RawExtension `json:"spec,omitempty"` // The status of the resourcegroup. This is the status of the CRD // that the resourcegroup is managing. This is adhering to the // SimpleSchema spec. Status runtime.RawExtension `json:"status,omitempty"` // Validation is a list of validation rules that are applied to the // resourcegroup. // Not implemented yet. Validation []string `json:"validation,omitempty"` }
Schema represents the attributes that define an instance of a resourcegroup.
func (*Schema) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Schema.
func (*Schema) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Validation ¶
type Validation struct { Expression string `json:"expression,omitempty"` Message string `json:"message,omitempty"` }
func (*Validation) DeepCopy ¶
func (in *Validation) DeepCopy() *Validation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Validation.
func (*Validation) DeepCopyInto ¶
func (in *Validation) DeepCopyInto(out *Validation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.