Documentation ¶
Overview ¶
Package common contains types required for both v1alpha2 and v1beta1 +kubebuilder:object:generate=true
Index ¶
- type AppRolloutStatus
- type AppStatus
- type ApplicationComponentStatus
- type ApplicationPhase
- type ApplicationTraitStatus
- type CUE
- type ChildResourceKind
- type DefinitionReference
- type DefinitionType
- type Helm
- type Kube
- type KubeParameter
- type ParameterValueType
- type RawComponent
- type Revision
- type Schematic
- type Status
- type Terraform
- type WorkloadGVK
- type WorkloadTypeDescriptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppRolloutStatus ¶ added in v1.0.4
type AppRolloutStatus struct { v1alpha1.RolloutStatus `json:",inline"` // LastUpgradedTargetAppRevision contains the name of the app that we upgraded to // We will restart the rollout if this is not the same as the spec LastUpgradedTargetAppRevision string `json:"lastTargetAppRevision"` // LastSourceAppRevision contains the name of the app that we need to upgrade from. // We will restart the rollout if this is not the same as the spec LastSourceAppRevision string `json:"LastSourceAppRevision,omitempty"` }
AppRolloutStatus defines the observed state of AppRollout
func (*AppRolloutStatus) DeepCopy ¶ added in v1.0.4
func (in *AppRolloutStatus) DeepCopy() *AppRolloutStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRolloutStatus.
func (*AppRolloutStatus) DeepCopyInto ¶ added in v1.0.4
func (in *AppRolloutStatus) DeepCopyInto(out *AppRolloutStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AppStatus ¶
type AppStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file runtimev1alpha1.ConditionedStatus `json:",inline"` Rollout AppRolloutStatus `json:"rollout,omitempty"` Phase ApplicationPhase `json:"status,omitempty"` // Components record the related Components created by Application Controller Components []runtimev1alpha1.TypedReference `json:"components,omitempty"` // Services record the status of the application services Services []ApplicationComponentStatus `json:"services,omitempty"` // ResourceTracker record the status of the ResourceTracker ResourceTracker *runtimev1alpha1.TypedReference `json:"resourceTracker,omitempty"` // LatestRevision of the application configuration it generates // +optional LatestRevision *Revision `json:"latestRevision,omitempty"` }
AppStatus defines the observed state of Application
func (*AppStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus.
func (*AppStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationComponentStatus ¶
type ApplicationComponentStatus struct { Name string `json:"name"` // WorkloadDefinition is the definition of a WorkloadDefinition, such as deployments/apps.v1 WorkloadDefinition WorkloadGVK `json:"workloadDefinition,omitempty"` Healthy bool `json:"healthy"` Message string `json:"message,omitempty"` Traits []ApplicationTraitStatus `json:"traits,omitempty"` Scopes []runtimev1alpha1.TypedReference `json:"scopes,omitempty"` }
ApplicationComponentStatus record the health status of App component
func (*ApplicationComponentStatus) DeepCopy ¶
func (in *ApplicationComponentStatus) DeepCopy() *ApplicationComponentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationComponentStatus.
func (*ApplicationComponentStatus) DeepCopyInto ¶
func (in *ApplicationComponentStatus) DeepCopyInto(out *ApplicationComponentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplicationPhase ¶
type ApplicationPhase string
ApplicationPhase is a label for the condition of a application at the current time
const ( // ApplicationRollingOut means the app is in the middle of rolling out ApplicationRollingOut ApplicationPhase = "rollingOut" // ApplicationRendering means the app is rendering ApplicationRendering ApplicationPhase = "rendering" // ApplicationRunning means the app finished rendering and applied result to the cluster ApplicationRunning ApplicationPhase = "running" // ApplicationHealthChecking means the app finished rendering and applied result to the cluster, but still unhealthy ApplicationHealthChecking ApplicationPhase = "healthChecking" )
type ApplicationTraitStatus ¶
type ApplicationTraitStatus struct { Type string `json:"type"` Healthy bool `json:"healthy"` Message string `json:"message,omitempty"` }
ApplicationTraitStatus records the trait health status
func (*ApplicationTraitStatus) DeepCopy ¶
func (in *ApplicationTraitStatus) DeepCopy() *ApplicationTraitStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationTraitStatus.
func (*ApplicationTraitStatus) DeepCopyInto ¶
func (in *ApplicationTraitStatus) DeepCopyInto(out *ApplicationTraitStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CUE ¶
type CUE struct { // Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field. // Template is a required field if CUE is defined in Capability Definition. Template string `json:"template"` }
CUE defines the encapsulation in CUE format
func (*CUE) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CUE.
func (*CUE) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChildResourceKind ¶
type ChildResourceKind struct { // APIVersion of the child resource APIVersion string `json:"apiVersion"` // Kind of the child resource Kind string `json:"kind"` // Selector to select the child resources that the workload wants to expose to traits Selector map[string]string `json:"selector,omitempty"` }
A ChildResourceKind defines a child Kubernetes resource kind with a selector
func (*ChildResourceKind) DeepCopy ¶
func (in *ChildResourceKind) DeepCopy() *ChildResourceKind
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChildResourceKind.
func (*ChildResourceKind) DeepCopyInto ¶
func (in *ChildResourceKind) DeepCopyInto(out *ChildResourceKind)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DefinitionReference ¶
type DefinitionReference struct { // Name of the referenced CustomResourceDefinition. Name string `json:"name"` // Version indicate which version should be used if CRD has multiple versions // by default it will use the first one if not specified Version string `json:"version,omitempty"` }
A DefinitionReference refers to a CustomResourceDefinition by name.
func (*DefinitionReference) DeepCopy ¶
func (in *DefinitionReference) DeepCopy() *DefinitionReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefinitionReference.
func (*DefinitionReference) DeepCopyInto ¶
func (in *DefinitionReference) DeepCopyInto(out *DefinitionReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DefinitionType ¶ added in v1.0.4
type DefinitionType string
DefinitionType describes the type of DefinitionRevision. +kubebuilder:validation:Enum=Component;Trait
const ( // ComponentType represents DefinitionRevision refer to type ComponentDefinition ComponentType DefinitionType = "Component" // TraitType represents DefinitionRevision refer to type TraitDefinition TraitType DefinitionType = "Trait" )
type Helm ¶
type Helm struct { // Release records a Helm release used by a Helm module workload. // +kubebuilder:pruning:PreserveUnknownFields Release runtime.RawExtension `json:"release"` // HelmRelease records a Helm repository used by a Helm module workload. // +kubebuilder:pruning:PreserveUnknownFields Repository runtime.RawExtension `json:"repository"` }
A Helm represents resources used by a Helm module
func (*Helm) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Helm.
func (*Helm) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Kube ¶
type Kube struct { // Template defines the raw Kubernetes resource // +kubebuilder:pruning:PreserveUnknownFields Template runtime.RawExtension `json:"template"` // Parameters defines configurable parameters Parameters []KubeParameter `json:"parameters,omitempty"` }
Kube defines the encapsulation in raw Kubernetes resource format
func (*Kube) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kube.
func (*Kube) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubeParameter ¶
type KubeParameter struct { // Name of this parameter Name string `json:"name"` // +kubebuilder:validation:Enum:=string;number;boolean // ValueType indicates the type of the parameter value, and // only supports basic data types: string, number, boolean. ValueType ParameterValueType `json:"type"` // FieldPaths specifies an array of fields within this workload that will be // overwritten by the value of this parameter. All fields must be of the // same type. Fields are specified as JSON field paths without a leading // dot, for example 'spec.replicas'. FieldPaths []string `json:"fieldPaths"` // +kubebuilder:default:=false // Required specifies whether or not a value for this parameter must be // supplied when authoring an Application. Required *bool `json:"required,omitempty"` // Description of this parameter. Description *string `json:"description,omitempty"` }
A KubeParameter defines a configurable parameter of a component.
func (*KubeParameter) DeepCopy ¶
func (in *KubeParameter) DeepCopy() *KubeParameter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeParameter.
func (*KubeParameter) DeepCopyInto ¶
func (in *KubeParameter) DeepCopyInto(out *KubeParameter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParameterValueType ¶
type ParameterValueType string
ParameterValueType refers to a data type of parameter
const ( StringType ParameterValueType = "string" NumberType ParameterValueType = "number" BooleanType ParameterValueType = "boolean" )
data types of parameter value
type RawComponent ¶
type RawComponent struct { // +kubebuilder:validation:EmbeddedResource // +kubebuilder:pruning:PreserveUnknownFields Raw runtime.RawExtension `json:"raw"` }
RawComponent record raw component
func (*RawComponent) DeepCopy ¶
func (in *RawComponent) DeepCopy() *RawComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawComponent.
func (*RawComponent) DeepCopyInto ¶
func (in *RawComponent) DeepCopyInto(out *RawComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Revision ¶
type Revision struct { Name string `json:"name"` Revision int64 `json:"revision"` // RevisionHash record the hash value of the spec of ApplicationRevision object. RevisionHash string `json:"revisionHash,omitempty"` }
Revision has name and revision number
func (*Revision) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Revision.
func (*Revision) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Schematic ¶
type Schematic struct { KUBE *Kube `json:"kube,omitempty"` CUE *CUE `json:"cue,omitempty"` HELM *Helm `json:"helm,omitempty"` Terraform *Terraform `json:"terraform,omitempty"` }
Schematic defines the encapsulation of this capability(workload/trait/scope), the encapsulation can be defined in different ways, e.g. CUE/HCL(terraform)/KUBE(K8s Object)/HELM, etc...
func (*Schematic) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Schematic.
func (*Schematic) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Status ¶
type Status struct { // CustomStatus defines the custom status message that could display to user // +optional CustomStatus string `json:"customStatus,omitempty"` // HealthPolicy defines the health check policy for the abstraction // +optional HealthPolicy string `json:"healthPolicy,omitempty"` }
Status defines the loop back status of the abstraction by using CUE template
func (*Status) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.
func (*Status) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Terraform ¶ added in v1.0.4
type Terraform struct { // Configuration is Terraform Configuration Configuration string `json:"configuration"` // Type specifies which Terraform configuration it is, HCL or JSON syntax // +kubebuilder:default:=hcl // +kubebuilder:validation:Enum:=hcl;json Type string `json:"type,omitempty"` }
Terraform is the struct to describe cloud resources managed by Hashicorp Terraform
func (*Terraform) DeepCopy ¶ added in v1.0.4
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Terraform.
func (*Terraform) DeepCopyInto ¶ added in v1.0.4
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadGVK ¶
WorkloadGVK refer to a Workload Type
func (*WorkloadGVK) DeepCopy ¶
func (in *WorkloadGVK) DeepCopy() *WorkloadGVK
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadGVK.
func (*WorkloadGVK) DeepCopyInto ¶
func (in *WorkloadGVK) DeepCopyInto(out *WorkloadGVK)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadTypeDescriptor ¶
type WorkloadTypeDescriptor struct { // Type ref to a WorkloadDefinition via name Type string `json:"type,omitempty"` // Definition mutually exclusive to workload.type, a embedded WorkloadDefinition Definition WorkloadGVK `json:"definition,omitempty"` }
A WorkloadTypeDescriptor refer to a Workload Type
func (*WorkloadTypeDescriptor) DeepCopy ¶
func (in *WorkloadTypeDescriptor) DeepCopy() *WorkloadTypeDescriptor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadTypeDescriptor.
func (*WorkloadTypeDescriptor) DeepCopyInto ¶
func (in *WorkloadTypeDescriptor) DeepCopyInto(out *WorkloadTypeDescriptor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.