v1alpha1

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 10 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"
	// DebugPolicyType refers to the type of debug policy
	DebugPolicyType = "debug"
	// SharedResourcePolicyType refers to the type of shared resource policy
	SharedResourcePolicyType = "shared-resource"
	// ReplicationPolicyType refers to the type of replication policy
	ReplicationPolicyType = "replication"
)
View Source
const (
	Group   = common.Group
	Version = "v1alpha1"
)

Package type metadata.

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"
)
View Source
const (
	// RefObjectsComponentType refers to the type of ref-objects
	RefObjectsComponentType = "ref-objects"
)

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
)
View Source
var (
	PolicyKind             = "Policy"
	PolicyGroupVersionKind = SchemeGroupVersion.WithKind(PolicyKind)
)

Policy meta

View Source
var (
	WorkflowKind             = "Workflow"
	WorkflowGroupVersionKind = SchemeGroupVersion.WithKind(WorkflowKind)
)

Workflow meta

Functions

This section is empty.

Types

type ApplyOnceAffectStrategy added in v1.6.0

type ApplyOnceAffectStrategy string

ApplyOnceAffectStrategy is a string that mark the policy effective stage

const (
	// ApplyOncePolicyType refers to the type of configuration drift policy
	ApplyOncePolicyType = "apply-once"
	// ApplyOnceStrategyOnAppUpdate policy takes effect on application updating
	ApplyOnceStrategyOnAppUpdate ApplyOnceAffectStrategy = "onUpdate"
	// ApplyOnceStrategyOnAppStateKeep policy takes effect on application state keep
	ApplyOnceStrategyOnAppStateKeep ApplyOnceAffectStrategy = "onStateKeep"
	// ApplyOnceStrategyAlways policy takes effect always
	ApplyOnceStrategyAlways ApplyOnceAffectStrategy = "always"
)

type ApplyOncePolicyRule added in v1.4.0

type ApplyOncePolicyRule struct {
	// +optional
	Selector ResourcePolicyRuleSelector `json:"selector,omitempty"`
	// +optional
	Strategy *ApplyOnceStrategy `json:"strategy,omitempty"`
}

ApplyOncePolicyRule defines a single apply-once policy rule

func (*ApplyOncePolicyRule) DeepCopy added in v1.4.0

func (in *ApplyOncePolicyRule) DeepCopy() *ApplyOncePolicyRule

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

func (*ApplyOncePolicyRule) DeepCopyInto added in v1.4.0

func (in *ApplyOncePolicyRule) DeepCopyInto(out *ApplyOncePolicyRule)

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

type ApplyOncePolicySpec added in v1.2.0

type ApplyOncePolicySpec struct {
	Enable bool `json:"enable"`
	// +optional
	Rules []ApplyOncePolicyRule `json:"rules,omitempty"`
}

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.

func (ApplyOncePolicySpec) FindStrategy added in v1.4.0

func (in ApplyOncePolicySpec) FindStrategy(manifest *unstructured.Unstructured) *ApplyOnceStrategy

FindStrategy find apply-once strategy for target resource

type ApplyOnceStrategy added in v1.4.0

type ApplyOnceStrategy struct {
	// Path the specified path that allow configuration drift
	// like 'spec.template.spec.containers[0].resources' and '*' means the whole target allow configuration drift
	Path []string `json:"path"`
	// ApplyOnceAffectStrategy Decide when the strategy will take effect
	// like affect:onUpdate/onStateKeep/always
	ApplyOnceAffectStrategy ApplyOnceAffectStrategy `json:"affect"`
}

ApplyOnceStrategy the strategy for resource path to allow configuration drift

func (*ApplyOnceStrategy) DeepCopy added in v1.4.0

func (in *ApplyOnceStrategy) DeepCopy() *ApplyOnceStrategy

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

func (*ApplyOnceStrategy) DeepCopyInto added in v1.4.0

func (in *ApplyOnceStrategy) DeepCopyInto(out *ApplyOnceStrategy)

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

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 Deprecated This spec is deprecated and replaced by Topology/Override Policy

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 Deprecated

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. Deprecated

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 Deprecated

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 GarbageCollectOrder added in v1.4.0

type GarbageCollectOrder string

GarbageCollectOrder is the order of garbage collect

const (
	// OrderDependency is the order of dependency
	OrderDependency GarbageCollectOrder = "dependency"
)

type GarbageCollectPolicyRule added in v1.2.0

type GarbageCollectPolicyRule struct {
	Selector ResourcePolicyRuleSelector `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 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"`

	// Order defines the order of garbage collect
	Order GarbageCollectOrder `json:"order,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 LegacyObjectTypeIdentifier added in v1.3.0

type LegacyObjectTypeIdentifier struct {
	// APIVersion is the APIVersion of the Kubernetes object.
	APIVersion string `json:"apiVersion"`
	// APIVersion is the Kind of the Kubernetes object.
	Kind string `json:"kind"`
}

LegacyObjectTypeIdentifier legacy object type identifier

func (*LegacyObjectTypeIdentifier) DeepCopy added in v1.3.0

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

func (*LegacyObjectTypeIdentifier) DeepCopyInto added in v1.3.0

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

type ObjectReferrer struct {
	// ObjectTypeIdentifier identifies the type of referred objects
	ObjectTypeIdentifier `json:",inline"`
	// ObjectSelector select object by name or labelSelector
	ObjectSelector `json:",inline"`
}

ObjectReferrer selects Kubernetes objects

func (*ObjectReferrer) DeepCopy added in v1.3.0

func (in *ObjectReferrer) DeepCopy() *ObjectReferrer

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

func (*ObjectReferrer) DeepCopyInto added in v1.3.0

func (in *ObjectReferrer) DeepCopyInto(out *ObjectReferrer)

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

type ObjectSelector added in v1.3.0

type ObjectSelector struct {
	// Name is the name of the Kubernetes object.
	// If empty, it will inherit the application component's name.
	Name string `json:"name,omitempty"`
	// Namespace is the namespace for selecting Kubernetes objects.
	// If empty, it will inherit the application's namespace.
	Namespace string `json:"namespace,omitempty"`
	// Cluster is the cluster for selecting Kubernetes objects.
	// If empty, it will use the local cluster
	Cluster string `json:"cluster,omitempty"`
	// LabelSelector selects Kubernetes objects by labels
	// Exclusive to "name"
	LabelSelector map[string]string `json:"labelSelector,omitempty"`
	// DeprecatedLabelSelector a deprecated alias to LabelSelector
	// Deprecated: use labelSelector instead.
	DeprecatedLabelSelector map[string]string `json:"selector,omitempty"`
}

ObjectSelector selector for Kubernetes object

func (*ObjectSelector) DeepCopy added in v1.3.0

func (in *ObjectSelector) DeepCopy() *ObjectSelector

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

func (*ObjectSelector) DeepCopyInto added in v1.3.0

func (in *ObjectSelector) DeepCopyInto(out *ObjectSelector)

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

type ObjectTypeIdentifier added in v1.3.0

type ObjectTypeIdentifier struct {
	// Resource is the resource name of the Kubernetes object.
	Resource string `json:"resource"`
	// Group is the API Group of the Kubernetes object.
	Group string `json:"group"`
	// LegacyObjectTypeIdentifier is the legacy identifier
	// Deprecated: use resource/group instead
	LegacyObjectTypeIdentifier `json:",inline"`
}

ObjectTypeIdentifier identifies the scheme of Kubernetes object

func (*ObjectTypeIdentifier) DeepCopy added in v1.3.0

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

func (*ObjectTypeIdentifier) DeepCopyInto added in v1.3.0

func (in *ObjectTypeIdentifier) DeepCopyInto(out *ObjectTypeIdentifier)

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

type Placement struct {
	// Clusters is the names of the clusters to select.
	Clusters []string `json:"clusters,omitempty"`

	// ClusterLabelSelector is the label selector for clusters.
	// Exclusive to "clusters"
	ClusterLabelSelector map[string]string `json:"clusterLabelSelector,omitempty"`

	// AllowEmpty ignore empty cluster error when no cluster returned for label
	// selector
	AllowEmpty bool `json:"allowEmpty,omitempty"`

	// DeprecatedClusterSelector is a depreciated alias for ClusterLabelSelector.
	// Deprecated: Use clusterLabelSelector instead.
	DeprecatedClusterSelector map[string]string `json:"clusterSelector,omitempty"`
}

Placement describes which clusters to be selected in this topology

func (*Placement) DeepCopy added in v1.3.0

func (in *Placement) DeepCopy() *Placement

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

func (*Placement) DeepCopyInto added in v1.3.0

func (in *Placement) DeepCopyInto(out *Placement)

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

type RefObjectsComponentSpec struct {
	// Objects the referrers to the Kubernetes objects
	Objects []ObjectReferrer `json:"objects,omitempty"`
	// URLs are the links that stores the referred objects
	URLs []string `json:"urls,omitempty"`
}

RefObjectsComponentSpec defines the spec of ref-objects component

func (*RefObjectsComponentSpec) DeepCopy added in v1.3.0

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

func (*RefObjectsComponentSpec) DeepCopyInto added in v1.3.0

func (in *RefObjectsComponentSpec) DeepCopyInto(out *RefObjectsComponentSpec)

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

type ReplicationPolicySpec added in v1.6.0

type ReplicationPolicySpec struct {
	Keys []string `json:"keys,omitempty"`
	// Selector is the subset of selected components which will be replicated.
	Selector []string `json:"selector,omitempty"`
}

ReplicationPolicySpec defines the spec of replication policy Override policy should be used together with replication policy to select the deployment target components

func (*ReplicationPolicySpec) DeepCopy added in v1.6.0

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

func (*ReplicationPolicySpec) DeepCopyInto added in v1.6.0

func (in *ReplicationPolicySpec) DeepCopyInto(out *ReplicationPolicySpec)

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

type ResourcePolicyRuleSelector added in v1.4.0

type ResourcePolicyRuleSelector struct {
	CompNames        []string `json:"componentNames,omitempty"`
	CompTypes        []string `json:"componentTypes,omitempty"`
	OAMResourceTypes []string `json:"oamTypes,omitempty"`
	TraitTypes       []string `json:"traitTypes,omitempty"`
	ResourceTypes    []string `json:"resourceTypes,omitempty"`
	ResourceNames    []string `json:"resourceNames,omitempty"`
}

ResourcePolicyRuleSelector select the targets of the rule if multiple conditions are specified, combination logic is AND

func (*ResourcePolicyRuleSelector) DeepCopy added in v1.4.0

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

func (*ResourcePolicyRuleSelector) DeepCopyInto added in v1.4.0

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

func (*ResourcePolicyRuleSelector) Match added in v1.5.0

Match check if current rule selector match the target resource If at least one condition is matched and no other condition failed (could be empty), return true Otherwise, return false

type SharedResourcePolicyRule added in v1.5.0

type SharedResourcePolicyRule struct {
	Selector ResourcePolicyRuleSelector `json:"selector"`
}

SharedResourcePolicyRule defines the rule for sharing resources

func (*SharedResourcePolicyRule) DeepCopy added in v1.5.0

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

func (*SharedResourcePolicyRule) DeepCopyInto added in v1.5.0

func (in *SharedResourcePolicyRule) DeepCopyInto(out *SharedResourcePolicyRule)

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

type SharedResourcePolicySpec added in v1.5.0

type SharedResourcePolicySpec struct {
	Rules []SharedResourcePolicyRule `json:"rules"`
}

SharedResourcePolicySpec defines the spec of shared-resource policy

func (*SharedResourcePolicySpec) DeepCopy added in v1.5.0

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

func (*SharedResourcePolicySpec) DeepCopyInto added in v1.5.0

func (in *SharedResourcePolicySpec) DeepCopyInto(out *SharedResourcePolicySpec)

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

func (SharedResourcePolicySpec) FindStrategy added in v1.5.0

func (in SharedResourcePolicySpec) FindStrategy(manifest *unstructured.Unstructured) bool

FindStrategy return if the target resource should be shared

type TopologyPolicySpec added in v1.3.0

type TopologyPolicySpec struct {
	// Placement embeds the selectors for choosing cluster
	Placement `json:",inline"`
	// Namespace is the target namespace to deploy in the selected clusters.
	// +optional
	Namespace string `json:"namespace,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.

Jump to

Keyboard shortcuts

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