v1alpha1

package
v0.0.0-...-2c539bb Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

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

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

ApplyOncePolicySpec defines the spec of preventing configuration drift

func (*ApplyOncePolicySpec) DeepCopy

func (in *ApplyOncePolicySpec) DeepCopy() *ApplyOncePolicySpec

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

func (*ApplyOncePolicySpec) DeepCopyInto

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

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

func (in *ClusterConnection) DeepCopy() *ClusterConnection

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

func (*ClusterConnection) DeepCopyInto

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

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

func (in *EnvComponentPatch) DeepCopy() *EnvComponentPatch

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

func (*EnvComponentPatch) DeepCopyInto

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

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

type EnvSelector struct {
	Components []string `json:"components,omitempty"`
}

EnvSelector defines which components should this env contains

func (*EnvSelector) DeepCopy

func (in *EnvSelector) DeepCopy() *EnvSelector

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

func (*EnvSelector) DeepCopyInto

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

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

EnvStatus records the status of one env

func (*EnvStatus) DeepCopy

func (in *EnvStatus) DeepCopy() *EnvStatus

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

func (*EnvStatus) DeepCopyInto

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

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

func (in *EnvTraitPatch) DeepCopy() *EnvTraitPatch

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

func (*EnvTraitPatch) DeepCopyInto

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

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

ToApplicationTrait convert EnvTraitPatch into ApplicationTrait

type GarbageCollectPolicyRule

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

GarbageCollectPolicyRule defines a single garbage-collect policy rule

func (*GarbageCollectPolicyRule) DeepCopy

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

func (*GarbageCollectPolicyRule) DeepCopyInto

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

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

GarbageCollectPolicyRuleSelector select the targets of the rule

func (*GarbageCollectPolicyRuleSelector) DeepCopy

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

func (*GarbageCollectPolicyRuleSelector) DeepCopyInto

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

type GarbageCollectPolicySpec

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

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

func (*GarbageCollectPolicySpec) DeepCopyInto

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

FindStrategy find gc strategy for target resource

type GarbageCollectStrategy

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

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

OverridePolicySpec defines the spec of override policy

func (*OverridePolicySpec) DeepCopy

func (in *OverridePolicySpec) DeepCopy() *OverridePolicySpec

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

func (*OverridePolicySpec) DeepCopyInto

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

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

PlacementDecision describes the placement of one application instance

func (*PlacementDecision) DeepCopy

func (in *PlacementDecision) DeepCopy() *PlacementDecision

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

func (*PlacementDecision) DeepCopyInto

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

func (in PlacementDecision) String() string

String encode placement decision

type Policy

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

func (in *Policy) DeepCopy() *Policy

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

func (*Policy) DeepCopyInto

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

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

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

type PolicyList

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

func (in *PolicyList) DeepCopy() *PolicyList

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

func (*PolicyList) DeepCopyInto

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

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

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

type TopologyPolicySpec

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

func (in *TopologyPolicySpec) DeepCopy() *TopologyPolicySpec

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

func (*TopologyPolicySpec) DeepCopyInto

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

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

func (in *Workflow) DeepCopy() *Workflow

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

func (*Workflow) DeepCopyInto

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

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

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

type WorkflowList

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

func (in *WorkflowList) DeepCopy() *WorkflowList

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

func (*WorkflowList) DeepCopyInto

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

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