v1alpha1

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 8 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 {
	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

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.

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.

type Workflow added in v1.1.1

type Workflow struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   WorkflowSpec   `json:"spec,omitempty"`
	Status WorkflowStatus `json:"status,omitempty"`
}

Workflow is the Schema for the Workflow API +kubebuilder:object:root=true +kubebuilder:storageversion +kubebuilder:subresource:status +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=workflow +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"

func (*Workflow) DeepCopy added in v1.1.1

func (in *Workflow) DeepCopy() *Workflow

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

func (*Workflow) DeepCopyInto added in v1.1.1

func (in *Workflow) DeepCopyInto(out *Workflow)

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

func (*Workflow) DeepCopyObject added in v1.1.1

func (in *Workflow) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Workflow) GetCondition added in v1.1.1

func (w *Workflow) GetCondition(conditionType condition.ConditionType) condition.Condition

GetCondition gets condition from Workflow

func (*Workflow) SetConditions added in v1.1.1

func (w *Workflow) SetConditions(c ...condition.Condition)

SetConditions set condition for Workflow

type WorkflowList added in v1.1.1

type WorkflowList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Workflow `json:"items"`
}

WorkflowList contains a list of Workflow.

func (*WorkflowList) DeepCopy added in v1.1.1

func (in *WorkflowList) DeepCopy() *WorkflowList

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

func (*WorkflowList) DeepCopyInto added in v1.1.1

func (in *WorkflowList) DeepCopyInto(out *WorkflowList)

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

func (*WorkflowList) DeepCopyObject added in v1.1.1

func (in *WorkflowList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WorkflowSpec added in v1.1.1

type WorkflowSpec struct {
	Steps []WorkflowStep `json:"steps,omitempty"`
}

A WorkflowSpec defines the desired state of a Workflow.

func (*WorkflowSpec) DeepCopy added in v1.1.1

func (in *WorkflowSpec) DeepCopy() *WorkflowSpec

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

func (*WorkflowSpec) DeepCopyInto added in v1.1.1

func (in *WorkflowSpec) DeepCopyInto(out *WorkflowSpec)

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

type WorkflowStatus added in v1.1.1

type WorkflowStatus struct {
	// ConditionedStatus reflects the observed status of a resource
	condition.ConditionedStatus `json:",inline"`
	ObservedGeneration          int64                   `json:"observedGeneration,omitempty"`
	StepIndex                   int                     `json:"stepIndex,omitempty"`
	Suspend                     bool                    `json:"suspend"`
	Terminated                  bool                    `json:"terminated"`
	ContextBackend              *corev1.ObjectReference `json:"contextBackend"`
	Steps                       []WorkflowStepStatus    `json:"steps,omitempty"`
}

A WorkflowStatus is the status of Workflow

func (*WorkflowStatus) DeepCopy added in v1.1.1

func (in *WorkflowStatus) DeepCopy() *WorkflowStatus

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

func (*WorkflowStatus) DeepCopyInto added in v1.1.1

func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus)

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

type WorkflowStep added in v1.1.1

type WorkflowStep struct {
	// Name is the unique name of the workflow step.
	Name string `json:"name"`
	Type string `json:"type"`
	// +kubebuilder:pruning:PreserveUnknownFields
	Properties runtime.RawExtension `json:"properties,omitempty"`
	Inputs     common.StepInputs    `json:"inputs,omitempty"`
	Outputs    common.StepOutputs   `json:"outputs,omitempty"`
}

WorkflowStep defines how to execute a workflow step.

func (*WorkflowStep) DeepCopy added in v1.1.1

func (in *WorkflowStep) DeepCopy() *WorkflowStep

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

func (*WorkflowStep) DeepCopyInto added in v1.1.1

func (in *WorkflowStep) DeepCopyInto(out *WorkflowStep)

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

type WorkflowStepPhase added in v1.1.1

type WorkflowStepPhase string

WorkflowStepPhase describes the phase of a workflow step.

const (
	// WorkflowStepPhaseSucceeded will make the controller run the next step.
	WorkflowStepPhaseSucceeded WorkflowStepPhase = "succeeded"
	// WorkflowStepPhaseFailed will make the controller stop the workflow and report error in `message`.
	WorkflowStepPhaseFailed WorkflowStepPhase = "failed"
	// WorkflowStepPhaseTerminated will make the controller terminate the workflow.
	WorkflowStepPhaseTerminated WorkflowStepPhase = "terminated"
	// WorkflowStepPhaseSuspending will make the controller suspend the workflow.
	WorkflowStepPhaseSuspending WorkflowStepPhase = "suspending"
	// WorkflowStepPhaseRunning will make the controller continue the workflow.
	WorkflowStepPhaseRunning WorkflowStepPhase = "running"
)

type WorkflowStepStatus added in v1.1.1

type WorkflowStepStatus struct {
	Name  string            `json:"name,omitempty"`
	Type  string            `json:"type,omitempty"`
	Phase WorkflowStepPhase `json:"phase,omitempty"`
	// A human readable message indicating details about why the workflowStep is in this state.
	Message string `json:"message,omitempty"`
	// A brief CamelCase message indicating details about why the workflowStep is in this state.
	Reason      string                 `json:"reason,omitempty"`
	ResourceRef corev1.ObjectReference `json:"resourceRef,omitempty"`
}

WorkflowStepStatus record the status of a workflow step

func (*WorkflowStepStatus) DeepCopy added in v1.1.1

func (in *WorkflowStepStatus) DeepCopy() *WorkflowStepStatus

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

func (*WorkflowStepStatus) DeepCopyInto added in v1.1.1

func (in *WorkflowStepStatus) DeepCopyInto(out *WorkflowStepStatus)

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