Documentation ¶
Overview ¶
Package v1alpha1 contains resources relating to the Open Application Model. See https://github.com/oam-dev/spec for more details. +kubebuilder:object:generate=true +groupName=core.oam.dev +versionName=v1alpha1
Index ¶
- Constants
- Variables
- type AppTemplate
- type ClusterDecision
- type ClusterManagementEngine
- type ConfigMapReference
- type EnvBinding
- func (in *EnvBinding) DeepCopy() *EnvBinding
- func (in *EnvBinding) DeepCopyInto(out *EnvBinding)
- func (in *EnvBinding) DeepCopyObject() runtime.Object
- func (e *EnvBinding) GetCondition(conditionType condition.ConditionType) condition.Condition
- func (e *EnvBinding) SetConditions(c ...condition.Condition)
- type EnvBindingList
- type EnvBindingPhase
- type EnvBindingSpec
- type EnvBindingStatus
- type EnvConfig
- type EnvPatch
- type EnvPlacement
- type EnvSelector
- type NamespaceSelector
Constants ¶
const ( Group = "core.oam.dev" Version = "v1alpha1" )
Package type metadata.
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
var ( EnvBindingKind = reflect.TypeOf(EnvBinding{}).Name() EnvBindingGroupKind = schema.GroupKind{Group: Group, Kind: EnvBindingKind}.String() EnvBindingKindAPIVersion = EnvBindingKind + "." + SchemeGroupVersion.String() EnvBindingKindVersionKind = SchemeGroupVersion.WithKind(EnvBindingKind) )
EnvBinding type metadata.
Functions ¶
This section is empty.
Types ¶
type AppTemplate ¶
type AppTemplate struct { // +kubebuilder:validation:EmbeddedResource // +kubebuilder:pruning:PreserveUnknownFields runtime.RawExtension `json:",inline"` }
AppTemplate represents a application to be configured.
func (*AppTemplate) DeepCopy ¶
func (in *AppTemplate) DeepCopy() *AppTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppTemplate.
func (*AppTemplate) DeepCopyInto ¶
func (in *AppTemplate) DeepCopyInto(out *AppTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterDecision ¶
type ClusterDecision struct { Env string `json:"env"` Cluster string `json:"cluster,omitempty"` Namespace string `json:"namespace,omitempty"` }
ClusterDecision recorded the mapping of environment and cluster
func (*ClusterDecision) DeepCopy ¶
func (in *ClusterDecision) DeepCopy() *ClusterDecision
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDecision.
func (*ClusterDecision) DeepCopyInto ¶
func (in *ClusterDecision) DeepCopyInto(out *ClusterDecision)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterManagementEngine ¶
type ClusterManagementEngine string
ClusterManagementEngine represents a multi-cluster management solution
const ( // OCMEngine represents Open-Cluster-Management multi-cluster management solution OCMEngine ClusterManagementEngine = "ocm" // SingleClusterEngine represents single cluster ClusterManagerEngine SingleClusterEngine ClusterManagementEngine = "single-cluster" // ClusterGatewayEngine represents multi-cluster management solution with cluster-gateway ClusterGatewayEngine ClusterManagementEngine = "cluster-gateway" )
type ConfigMapReference ¶
type ConfigMapReference struct { // Name of the secret. Name string `json:"name"` // Namespace of the secret. Namespace string `json:"namespace,omitempty"` }
A ConfigMapReference is a reference to a configMap in an arbitrary namespace.
func (*ConfigMapReference) DeepCopy ¶
func (in *ConfigMapReference) DeepCopy() *ConfigMapReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapReference.
func (*ConfigMapReference) DeepCopyInto ¶
func (in *ConfigMapReference) DeepCopyInto(out *ConfigMapReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvBinding ¶
type EnvBinding struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec EnvBindingSpec `json:"spec,omitempty"` Status EnvBindingStatus `json:"status,omitempty"` }
EnvBinding is the Schema for the EnvBinding API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=envbind +kubebuilder:printcolumn:name="ENGINE",type=string,JSONPath=`.spec.engine` +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
func (*EnvBinding) DeepCopy ¶
func (in *EnvBinding) DeepCopy() *EnvBinding
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvBinding.
func (*EnvBinding) DeepCopyInto ¶
func (in *EnvBinding) DeepCopyInto(out *EnvBinding)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnvBinding) DeepCopyObject ¶
func (in *EnvBinding) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*EnvBinding) GetCondition ¶
func (e *EnvBinding) GetCondition(conditionType condition.ConditionType) condition.Condition
GetCondition gets condition from EnvBinding
func (*EnvBinding) SetConditions ¶
func (e *EnvBinding) SetConditions(c ...condition.Condition)
SetConditions set condition for EnvBinding
type EnvBindingList ¶
type EnvBindingList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []EnvBinding `json:"items"` }
EnvBindingList contains a list of EnvBinding.
func (*EnvBindingList) DeepCopy ¶
func (in *EnvBindingList) DeepCopy() *EnvBindingList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvBindingList.
func (*EnvBindingList) DeepCopyInto ¶
func (in *EnvBindingList) DeepCopyInto(out *EnvBindingList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EnvBindingList) DeepCopyObject ¶
func (in *EnvBindingList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EnvBindingPhase ¶
type EnvBindingPhase string
EnvBindingPhase is a label for the condition of a EnvBinding at the current time
const ( // EnvBindingPrepare means EnvBinding is preparing the pre-work for cluster scheduling EnvBindingPrepare EnvBindingPhase = "preparing" // EnvBindingRendering means EnvBinding is rendering the apps in different envs EnvBindingRendering EnvBindingPhase = "rendering" // EnvBindingScheduling means EnvBinding is deciding which cluster the apps is scheduled to. EnvBindingScheduling EnvBindingPhase = "scheduling" // EnvBindingFinished means EnvBinding finished env binding EnvBindingFinished EnvBindingPhase = "finished" )
type EnvBindingSpec ¶
type EnvBindingSpec struct { Engine ClusterManagementEngine `json:"engine,omitempty"` // AppTemplate indicates the application template. AppTemplate AppTemplate `json:"appTemplate"` Envs []EnvConfig `json:"envs"` // OutputResourcesTo specifies the namespace and name of a ConfigMap // which store the resources rendered after differentiated configuration // +optional OutputResourcesTo *ConfigMapReference `json:"outputResourcesTo,omitempty"` }
A EnvBindingSpec defines the desired state of a EnvBinding.
func (*EnvBindingSpec) DeepCopy ¶
func (in *EnvBindingSpec) DeepCopy() *EnvBindingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvBindingSpec.
func (*EnvBindingSpec) DeepCopyInto ¶
func (in *EnvBindingSpec) DeepCopyInto(out *EnvBindingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvBindingStatus ¶
type EnvBindingStatus struct { // ConditionedStatus reflects the observed status of a resource condition.ConditionedStatus `json:",inline"` Phase EnvBindingPhase `json:"phase,omitempty"` ClusterDecisions []ClusterDecision `json:"clusterDecisions,omitempty"` // ResourceTracker record the status of the ResourceTracker ResourceTracker *corev1.ObjectReference `json:"resourceTracker,omitempty"` }
A EnvBindingStatus is the status of EnvBinding
func (*EnvBindingStatus) DeepCopy ¶
func (in *EnvBindingStatus) DeepCopy() *EnvBindingStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvBindingStatus.
func (*EnvBindingStatus) DeepCopyInto ¶
func (in *EnvBindingStatus) DeepCopyInto(out *EnvBindingStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvConfig ¶
type EnvConfig struct { Name string `json:"name"` Placement EnvPlacement `json:"placement,omitempty"` Selector *EnvSelector `json:"selector,omitempty"` Patch EnvPatch `json:"patch"` }
EnvConfig is the configuration for different environments.
func (*EnvConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvConfig.
func (*EnvConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvPatch ¶
type EnvPatch struct {
Components []common.ApplicationComponent `json:"components"`
}
EnvPatch specify the parameter configuration for different environments
func (*EnvPatch) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvPatch.
func (*EnvPatch) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvPlacement ¶
type EnvPlacement struct { ClusterSelector *common.ClusterSelector `json:"clusterSelector,omitempty"` NamespaceSelector *NamespaceSelector `json:"namespaceSelector,omitempty"` }
EnvPlacement defines the placement rules for an app.
func (*EnvPlacement) DeepCopy ¶
func (in *EnvPlacement) DeepCopy() *EnvPlacement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvPlacement.
func (*EnvPlacement) DeepCopyInto ¶
func (in *EnvPlacement) DeepCopyInto(out *EnvPlacement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvSelector ¶ added in v1.1.1
type EnvSelector struct {
Components []string `json:"components,omitempty"`
}
EnvSelector defines which components should this env contains
func (*EnvSelector) DeepCopy ¶ added in v1.1.1
func (in *EnvSelector) DeepCopy() *EnvSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvSelector.
func (*EnvSelector) DeepCopyInto ¶ added in v1.1.1
func (in *EnvSelector) DeepCopyInto(out *EnvSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamespaceSelector ¶
type NamespaceSelector struct { // Name is the name of the namespace. Name string `json:"name,omitempty"` // Labels defines the label selector to select the namespace. Labels map[string]string `json:"labels,omitempty"` }
NamespaceSelector defines the rules to select a Namespace resource. Either name or labels is needed.
func (*NamespaceSelector) DeepCopy ¶
func (in *NamespaceSelector) DeepCopy() *NamespaceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSelector.
func (*NamespaceSelector) DeepCopyInto ¶
func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.