v1alpha1

package
v1.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 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 (
	// TopologyPolicyType refers to the type of topology policy
	TopologyPolicyType = "topology"
	// OverridePolicyType refers to the type of override policy
	OverridePolicyType = "override"
)
View Source
const (
	Group   = "core.oam.dev"
	Version = "v1alpha1"
)

Package type metadata.

View Source
const (
	// ApplyOncePolicyType refers to the type of configuration drift policy
	ApplyOncePolicyType = "apply-once"
)
View Source
const (
	// EnvBindingPolicyType refers to the type of EnvBinding
	EnvBindingPolicyType = "env-binding"
)
View Source
const (
	// GarbageCollectPolicyType refers to the type of garbage-collect
	GarbageCollectPolicyType = "garbage-collect"
)

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}

	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ApplyOncePolicySpec added in v1.2.0

type ApplyOncePolicySpec struct {
	Enable bool `json:"enable"`
}

ApplyOncePolicySpec defines the spec of preventing configuration drift

func (*ApplyOncePolicySpec) DeepCopy added in v1.2.0

func (in *ApplyOncePolicySpec) DeepCopy() *ApplyOncePolicySpec

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

func (*ApplyOncePolicySpec) DeepCopyInto added in v1.2.0

func (in *ApplyOncePolicySpec) DeepCopyInto(out *ApplyOncePolicySpec)

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

type ClusterConnection added in v1.2.0

type ClusterConnection struct {
	ClusterName        string `json:"clusterName"`
	LastActiveRevision string `json:"lastActiveRevision"`
}

ClusterConnection records the connection with clusters and the last active app revision when they are active (still be used)

func (*ClusterConnection) DeepCopy added in v1.2.0

func (in *ClusterConnection) DeepCopy() *ClusterConnection

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

func (*ClusterConnection) DeepCopyInto added in v1.2.0

func (in *ClusterConnection) DeepCopyInto(out *ClusterConnection)

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

type EnvBindingSpec

type EnvBindingSpec struct {
	Envs []EnvConfig `json:"envs"`
}

EnvBindingSpec defines a list of envs

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 {
	Envs               []EnvStatus         `json:"envs"`
	ClusterConnections []ClusterConnection `json:"clusterConnections"`
}

EnvBindingStatus records the status of all env

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 EnvComponentPatch added in v1.2.0

type EnvComponentPatch struct {
	Name             string                `json:"name"`
	Type             string                `json:"type"`
	Properties       *runtime.RawExtension `json:"properties,omitempty"`
	Traits           []EnvTraitPatch       `json:"traits,omitempty"`
	ExternalRevision string                `json:"externalRevision,omitempty"`
}

EnvComponentPatch is the patch to component

func (*EnvComponentPatch) DeepCopy added in v1.2.0

func (in *EnvComponentPatch) DeepCopy() *EnvComponentPatch

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

func (*EnvComponentPatch) DeepCopyInto added in v1.2.0

func (in *EnvComponentPatch) DeepCopyInto(out *EnvComponentPatch)

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

func (*EnvComponentPatch) ToApplicationComponent added in v1.2.0

func (in *EnvComponentPatch) ToApplicationComponent() *common.ApplicationComponent

ToApplicationComponent convert EnvComponentPatch into ApplicationComponent

type EnvConfig

type EnvConfig struct {
	Name      string       `json:"name"`
	Placement EnvPlacement `json:"placement,omitempty"`
	Selector  *EnvSelector `json:"selector,omitempty"`
	Patch     EnvPatch     `json:"patch,omitempty"`
}

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 []EnvComponentPatch `json:"components,omitempty"`
}

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 EnvStatus added in v1.2.0

type EnvStatus struct {
	Env        string              `json:"env"`
	Placements []PlacementDecision `json:"placements"`
}

EnvStatus records the status of one env

func (*EnvStatus) DeepCopy added in v1.2.0

func (in *EnvStatus) DeepCopy() *EnvStatus

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

func (*EnvStatus) DeepCopyInto added in v1.2.0

func (in *EnvStatus) DeepCopyInto(out *EnvStatus)

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

type EnvTraitPatch added in v1.2.0

type EnvTraitPatch struct {
	Type       string                `json:"type"`
	Properties *runtime.RawExtension `json:"properties,omitempty"`
	Disable    bool                  `json:"disable,omitempty"`
}

EnvTraitPatch is the patch to trait

func (*EnvTraitPatch) DeepCopy added in v1.2.0

func (in *EnvTraitPatch) DeepCopy() *EnvTraitPatch

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

func (*EnvTraitPatch) DeepCopyInto added in v1.2.0

func (in *EnvTraitPatch) DeepCopyInto(out *EnvTraitPatch)

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

func (*EnvTraitPatch) ToApplicationTrait added in v1.2.0

func (in *EnvTraitPatch) ToApplicationTrait() *common.ApplicationTrait

ToApplicationTrait convert EnvTraitPatch into ApplicationTrait

type GarbageCollectPolicyRule added in v1.2.0

type GarbageCollectPolicyRule struct {
	Selector GarbageCollectPolicyRuleSelector `json:"selector"`
	Strategy GarbageCollectStrategy           `json:"strategy"`
}

GarbageCollectPolicyRule defines a single garbage-collect policy rule

func (*GarbageCollectPolicyRule) DeepCopy added in v1.2.0

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

func (*GarbageCollectPolicyRule) DeepCopyInto added in v1.2.0

func (in *GarbageCollectPolicyRule) DeepCopyInto(out *GarbageCollectPolicyRule)

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

type GarbageCollectPolicyRuleSelector added in v1.2.0

type GarbageCollectPolicyRuleSelector struct {
	TraitTypes []string `json:"traitTypes"`
	CompTypes  []string `json:"componentTypes"`
}

GarbageCollectPolicyRuleSelector select the targets of the rule if both traitTypes and componentTypes are specified, combination logic is OR if one resources are specified with conflict strategy, strategy as component go first.

func (*GarbageCollectPolicyRuleSelector) DeepCopy added in v1.2.0

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

func (*GarbageCollectPolicyRuleSelector) DeepCopyInto added in v1.2.0

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

type GarbageCollectPolicySpec added in v1.2.0

type GarbageCollectPolicySpec struct {
	// KeepLegacyResource if is set, outdated versioned resourcetracker will not be recycled automatically
	// outdated resources will be kept until resourcetracker be deleted manually
	KeepLegacyResource bool `json:"keepLegacyResource,omitempty"`

	// Rules defines list of rules to control gc strategy at resource level
	// if one resource is controlled by multiple rules, first rule will be used
	Rules []GarbageCollectPolicyRule `json:"rules,omitempty"`
}

GarbageCollectPolicySpec defines the spec of configuration drift

func (*GarbageCollectPolicySpec) DeepCopy added in v1.2.0

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

func (*GarbageCollectPolicySpec) DeepCopyInto added in v1.2.0

func (in *GarbageCollectPolicySpec) DeepCopyInto(out *GarbageCollectPolicySpec)

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

func (GarbageCollectPolicySpec) FindStrategy added in v1.2.0

FindStrategy find gc strategy for target resource

type GarbageCollectStrategy added in v1.2.0

type GarbageCollectStrategy string

GarbageCollectStrategy the strategy for target resource to recycle

const (
	// GarbageCollectStrategyNever do not recycle target resource, leave it
	GarbageCollectStrategyNever GarbageCollectStrategy = "never"
	// GarbageCollectStrategyOnAppDelete do not recycle target resource until application is deleted
	// this means the resource will be kept even it is not used in the latest version
	GarbageCollectStrategyOnAppDelete GarbageCollectStrategy = "onAppDelete"
	// GarbageCollectStrategyOnAppUpdate recycle target resource when it is not inUse
	GarbageCollectStrategyOnAppUpdate GarbageCollectStrategy = "onAppUpdate"
)

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 OverridePolicySpec added in v1.3.0

type OverridePolicySpec struct {
	Components []EnvComponentPatch `json:"components,omitempty"`
	Selector   []string            `json:"selector,omitempty"`
}

OverridePolicySpec defines the spec of override policy

func (*OverridePolicySpec) DeepCopy added in v1.3.0

func (in *OverridePolicySpec) DeepCopy() *OverridePolicySpec

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

func (*OverridePolicySpec) DeepCopyInto added in v1.3.0

func (in *OverridePolicySpec) DeepCopyInto(out *OverridePolicySpec)

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

type PlacementDecision added in v1.2.0

type PlacementDecision struct {
	Cluster   string `json:"cluster"`
	Namespace string `json:"namespace"`
}

PlacementDecision describes the placement of one application instance

func (*PlacementDecision) DeepCopy added in v1.2.0

func (in *PlacementDecision) DeepCopy() *PlacementDecision

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

func (*PlacementDecision) DeepCopyInto added in v1.2.0

func (in *PlacementDecision) DeepCopyInto(out *PlacementDecision)

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

func (PlacementDecision) String added in v1.3.0

func (in PlacementDecision) String() string

String encode placement decision

type Policy added in v1.3.0

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

	Type string `json:"type"`
	// +kubebuilder:pruning:PreserveUnknownFields
	Properties *runtime.RawExtension `json:"properties,omitempty"`
}

Policy is the Schema for the policy API +kubebuilder:storageversion +kubebuilder:resource:categories={oam} +kubebuilder:printcolumn:name="TYPE",type=string,JSONPath=`.type` +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*Policy) DeepCopy added in v1.3.0

func (in *Policy) DeepCopy() *Policy

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

func (*Policy) DeepCopyInto added in v1.3.0

func (in *Policy) DeepCopyInto(out *Policy)

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

func (*Policy) DeepCopyObject added in v1.3.0

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

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

type PolicyList added in v1.3.0

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

PolicyList contains a list of Policy +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*PolicyList) DeepCopy added in v1.3.0

func (in *PolicyList) DeepCopy() *PolicyList

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

func (*PolicyList) DeepCopyInto added in v1.3.0

func (in *PolicyList) DeepCopyInto(out *PolicyList)

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

func (*PolicyList) DeepCopyObject added in v1.3.0

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

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

type TopologyPolicySpec added in v1.3.0

type TopologyPolicySpec struct {
	Clusters        []string          `json:"clusters,omitempty"`
	ClusterSelector map[string]string `json:"clusterSelector,omitempty"`
}

TopologyPolicySpec defines the spec of topology policy

func (*TopologyPolicySpec) DeepCopy added in v1.3.0

func (in *TopologyPolicySpec) DeepCopy() *TopologyPolicySpec

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

func (*TopologyPolicySpec) DeepCopyInto added in v1.3.0

func (in *TopologyPolicySpec) DeepCopyInto(out *TopologyPolicySpec)

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

	Steps []v1beta1.WorkflowStep `json:"steps,omitempty"`
}

Workflow is the Schema for the policy API +kubebuilder:storageversion +kubebuilder:resource:categories={oam} +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

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.

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 +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

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.

Jump to

Keyboard shortcuts

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