v1alpha1

package
v1.1.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

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

View Source
const (
	Group   = "core.oam.dev"
	Version = "v1alpha1"
)

Package type metadata.

Variables

View Source
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}
)
View Source
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 {
	EnvName     string `json:"env_name"`
	ClusterName string `json:"cluster_name"`
}

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"
)

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"`
}

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:"cluster_decisions,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 common.ClusterPlacement `json:"placement"`
	Patch     EnvPatch                `json:"patch"`
}

EnvConfig is the configuration for different environments.

func (*EnvConfig) DeepCopy

func (in *EnvConfig) DeepCopy() *EnvConfig

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

func (*EnvConfig) DeepCopyInto

func (in *EnvConfig) DeepCopyInto(out *EnvConfig)

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

func (in *EnvPatch) DeepCopy() *EnvPatch

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

func (*EnvPatch) DeepCopyInto

func (in *EnvPatch) DeepCopyInto(out *EnvPatch)

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

Jump to

Keyboard shortcuts

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