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
- Variables
- type ApplyOnceAffectStrategy
- type ApplyOncePolicyRule
- type ApplyOncePolicySpec
- type ApplyOnceStrategy
- type ClusterConnection
- type EnvBindingSpec
- type EnvBindingStatus
- type EnvComponentPatch
- type EnvConfig
- type EnvPatch
- type EnvPlacement
- type EnvSelector
- type EnvStatus
- type EnvTraitPatch
- type GarbageCollectOrder
- type GarbageCollectPolicyRule
- type GarbageCollectPolicySpec
- func (in *GarbageCollectPolicySpec) DeepCopy() *GarbageCollectPolicySpec
- func (in *GarbageCollectPolicySpec) DeepCopyInto(out *GarbageCollectPolicySpec)
- func (in *GarbageCollectPolicySpec) FindDeleteOption(manifest *unstructured.Unstructured) []client.DeleteOption
- func (in *GarbageCollectPolicySpec) FindStrategy(manifest *unstructured.Unstructured) *GarbageCollectStrategy
- func (in *GarbageCollectPolicySpec) Type() string
- type GarbageCollectPropagation
- type GarbageCollectStrategy
- type LegacyObjectTypeIdentifier
- type NamespaceSelector
- type ObjectReferrer
- type ObjectSelector
- type ObjectTypeIdentifier
- type OverridePolicySpec
- type Placement
- type PlacementDecision
- type Policy
- type PolicyList
- type ReadOnlyPolicyRule
- type ReadOnlyPolicySpec
- type RefObjectsComponentSpec
- type ReplicationPolicySpec
- type ResourcePolicyRuleSelector
- type ResourceUpdateOp
- type ResourceUpdatePolicyRule
- type ResourceUpdatePolicySpec
- func (in *ResourceUpdatePolicySpec) DeepCopy() *ResourceUpdatePolicySpec
- func (in *ResourceUpdatePolicySpec) DeepCopyInto(out *ResourceUpdatePolicySpec)
- func (in *ResourceUpdatePolicySpec) FindStrategy(manifest *unstructured.Unstructured) *ResourceUpdateStrategy
- func (in *ResourceUpdatePolicySpec) Type() string
- type ResourceUpdateStrategy
- type SharedResourcePolicyRule
- type SharedResourcePolicySpec
- type TakeOverPolicyRule
- type TakeOverPolicySpec
- type TopologyPolicySpec
Constants ¶
const ( // GarbageCollectPropagationOrphan orphan child resources while deleting target resources GarbageCollectPropagationOrphan = "orphan" // GarbageCollectPropagationCascading delete child resources in background while deleting target resources GarbageCollectPropagationCascading = "cascading" )
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" // ReplicationPolicyType refers to the type of replication policy ReplicationPolicyType = "replication" )
const ( Group = common.Group Version = "v1alpha1" )
Package type metadata.
const (
// EnvBindingPolicyType refers to the type of EnvBinding
EnvBindingPolicyType = "env-binding"
)
const (
// GarbageCollectPolicyType refers to the type of garbage-collect
GarbageCollectPolicyType = "garbage-collect"
)
const (
// ReadOnlyPolicyType refers to the type of read-only policy
ReadOnlyPolicyType = "read-only"
)
const (
// RefObjectsComponentType refers to the type of ref-objects
RefObjectsComponentType = "ref-objects"
)
const (
// ResourceUpdatePolicyType refers to the type of resource-update policy
ResourceUpdatePolicyType = "resource-update"
)
const (
SharedResourcePolicyType = "shared-resource"
)const (
// TakeOverPolicyType refers to the type of take-over policy
TakeOverPolicyType = "take-over"
)
Variables ¶
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 )
var ( PolicyKind = "Policy" PolicyGroupVersionKind = SchemeGroupVersion.WithKind(PolicyKind) )
Policy meta
var ( WorkflowKind = "Workflow" WorkflowGroupVersionKind = SchemeGroupVersion.WithKind(WorkflowKind) )
Workflow meta
Functions ¶
This section is empty.
Types ¶
type ApplyOnceAffectStrategy ¶
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 ¶
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 ¶
func (in *ApplyOncePolicyRule) DeepCopy() *ApplyOncePolicyRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyOncePolicyRule.
func (*ApplyOncePolicyRule) DeepCopyInto ¶
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 ¶
type ApplyOncePolicySpec struct { Enable bool `json:"enable"` // +optional Rules []ApplyOncePolicyRule `json:"rules,omitempty"` }
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.
func (*ApplyOncePolicySpec) FindStrategy ¶
func (in *ApplyOncePolicySpec) FindStrategy(manifest *unstructured.Unstructured) *ApplyOnceStrategy
FindStrategy find apply-once strategy for target resource
func (*ApplyOncePolicySpec) Type ¶
func (in *ApplyOncePolicySpec) Type() string
Type the type name of the policy
type ApplyOnceStrategy ¶
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 ¶
func (in *ApplyOnceStrategy) DeepCopy() *ApplyOnceStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyOnceStrategy.
func (*ApplyOnceStrategy) DeepCopyInto ¶
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 ¶
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 ¶
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 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 ¶
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. Deprecated
func (*EnvConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvConfig.
func (*EnvConfig) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvPatch.
func (*EnvPatch) DeepCopyInto ¶
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 Deprecated
func (*EnvStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvStatus.
func (*EnvStatus) DeepCopyInto ¶
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 GarbageCollectOrder ¶
type GarbageCollectOrder string
GarbageCollectOrder is the order of garbage collect
const ( // OrderDependency is the order of dependency OrderDependency GarbageCollectOrder = "dependency" )
type GarbageCollectPolicyRule ¶
type GarbageCollectPolicyRule struct { Selector ResourcePolicyRuleSelector `json:"selector"` Strategy GarbageCollectStrategy `json:"strategy"` Propagation *GarbageCollectPropagation `json:"propagation"` }
GarbageCollectPolicyRule defines a single garbage-collect policy rule
func (*GarbageCollectPolicyRule) DeepCopy ¶
func (in *GarbageCollectPolicyRule) DeepCopy() *GarbageCollectPolicyRule
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 GarbageCollectPolicySpec ¶
type GarbageCollectPolicySpec struct { // ApplicationRevisionLimit if set, this application will use this number for application revision instead of // the global configuration ApplicationRevisionLimit *int `json:"applicationRevisionLimit,omitempty"` // 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"` // ContinueOnFailure if is set, continue to execute gc when the workflow fails, by default gc will be executed only after the workflow succeeds ContinueOnFailure bool `json:"continueOnFailure,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 ¶
func (in *GarbageCollectPolicySpec) DeepCopy() *GarbageCollectPolicySpec
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) FindDeleteOption ¶
func (in *GarbageCollectPolicySpec) FindDeleteOption(manifest *unstructured.Unstructured) []client.DeleteOption
FindDeleteOption find delete option for target resource
func (*GarbageCollectPolicySpec) FindStrategy ¶
func (in *GarbageCollectPolicySpec) FindStrategy(manifest *unstructured.Unstructured) *GarbageCollectStrategy
FindStrategy find gc strategy for target resource
func (*GarbageCollectPolicySpec) Type ¶
func (in *GarbageCollectPolicySpec) Type() string
Type the type name of the policy
type GarbageCollectPropagation ¶
type GarbageCollectPropagation string
GarbageCollectPropagation the deletion propagation setting similar to metav1.DeletionPropagation
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 LegacyObjectTypeIdentifier ¶
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 ¶
func (in *LegacyObjectTypeIdentifier) DeepCopy() *LegacyObjectTypeIdentifier
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LegacyObjectTypeIdentifier.
func (*LegacyObjectTypeIdentifier) DeepCopyInto ¶
func (in *LegacyObjectTypeIdentifier) DeepCopyInto(out *LegacyObjectTypeIdentifier)
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 ¶
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 ¶
func (in *ObjectReferrer) DeepCopy() *ObjectReferrer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReferrer.
func (*ObjectReferrer) DeepCopyInto ¶
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 ¶
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 ¶
func (in *ObjectSelector) DeepCopy() *ObjectSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectSelector.
func (*ObjectSelector) DeepCopyInto ¶
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 ¶
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 ¶
func (in *ObjectTypeIdentifier) DeepCopy() *ObjectTypeIdentifier
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectTypeIdentifier.
func (*ObjectTypeIdentifier) DeepCopyInto ¶
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 ¶
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 Placement ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.
func (*Placement) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
func (*Policy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Policy) DeepCopyObject ¶
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 ReadOnlyPolicyRule ¶
type ReadOnlyPolicyRule struct {
Selector ResourcePolicyRuleSelector `json:"selector"`
}
ReadOnlyPolicyRule defines the rule for read-only resources
func (*ReadOnlyPolicyRule) DeepCopy ¶
func (in *ReadOnlyPolicyRule) DeepCopy() *ReadOnlyPolicyRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadOnlyPolicyRule.
func (*ReadOnlyPolicyRule) DeepCopyInto ¶
func (in *ReadOnlyPolicyRule) DeepCopyInto(out *ReadOnlyPolicyRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReadOnlyPolicySpec ¶
type ReadOnlyPolicySpec struct {
Rules []ReadOnlyPolicyRule `json:"rules"`
}
ReadOnlyPolicySpec defines the spec of read-only policy
func (*ReadOnlyPolicySpec) DeepCopy ¶
func (in *ReadOnlyPolicySpec) DeepCopy() *ReadOnlyPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadOnlyPolicySpec.
func (*ReadOnlyPolicySpec) DeepCopyInto ¶
func (in *ReadOnlyPolicySpec) DeepCopyInto(out *ReadOnlyPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReadOnlyPolicySpec) FindStrategy ¶
func (in *ReadOnlyPolicySpec) FindStrategy(manifest *unstructured.Unstructured) bool
FindStrategy return if the target resource is read-only
func (*ReadOnlyPolicySpec) Type ¶
func (in *ReadOnlyPolicySpec) Type() string
Type the type name of the policy
type RefObjectsComponentSpec ¶
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 ¶
func (in *RefObjectsComponentSpec) DeepCopy() *RefObjectsComponentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RefObjectsComponentSpec.
func (*RefObjectsComponentSpec) DeepCopyInto ¶
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 ¶
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 ¶
func (in *ReplicationPolicySpec) DeepCopy() *ReplicationPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationPolicySpec.
func (*ReplicationPolicySpec) DeepCopyInto ¶
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 ¶
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 ¶
func (in *ResourcePolicyRuleSelector) DeepCopy() *ResourcePolicyRuleSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePolicyRuleSelector.
func (*ResourcePolicyRuleSelector) DeepCopyInto ¶
func (in *ResourcePolicyRuleSelector) DeepCopyInto(out *ResourcePolicyRuleSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourcePolicyRuleSelector) Match ¶
func (in *ResourcePolicyRuleSelector) Match(manifest *unstructured.Unstructured) bool
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 ResourceUpdateOp ¶
type ResourceUpdateOp string
ResourceUpdateOp update op for resource
const ( // ResourceUpdateStrategyPatch patch the target resource (three-way patch) ResourceUpdateStrategyPatch ResourceUpdateOp = "patch" // ResourceUpdateStrategyReplace update the target resource ResourceUpdateStrategyReplace ResourceUpdateOp = "replace" )
type ResourceUpdatePolicyRule ¶
type ResourceUpdatePolicyRule struct { // Selector picks which resources should be affected Selector ResourcePolicyRuleSelector `json:"selector"` // Strategy the strategy for updating resources Strategy ResourceUpdateStrategy `json:"strategy,omitempty"` }
ResourceUpdatePolicyRule defines the rule for resource-update resources
func (*ResourceUpdatePolicyRule) DeepCopy ¶
func (in *ResourceUpdatePolicyRule) DeepCopy() *ResourceUpdatePolicyRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceUpdatePolicyRule.
func (*ResourceUpdatePolicyRule) DeepCopyInto ¶
func (in *ResourceUpdatePolicyRule) DeepCopyInto(out *ResourceUpdatePolicyRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceUpdatePolicySpec ¶
type ResourceUpdatePolicySpec struct {
Rules []ResourceUpdatePolicyRule `json:"rules"`
}
ResourceUpdatePolicySpec defines the spec of resource-update policy
func (*ResourceUpdatePolicySpec) DeepCopy ¶
func (in *ResourceUpdatePolicySpec) DeepCopy() *ResourceUpdatePolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceUpdatePolicySpec.
func (*ResourceUpdatePolicySpec) DeepCopyInto ¶
func (in *ResourceUpdatePolicySpec) DeepCopyInto(out *ResourceUpdatePolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceUpdatePolicySpec) FindStrategy ¶
func (in *ResourceUpdatePolicySpec) FindStrategy(manifest *unstructured.Unstructured) *ResourceUpdateStrategy
FindStrategy return if the target resource is read-only
func (*ResourceUpdatePolicySpec) Type ¶
func (in *ResourceUpdatePolicySpec) Type() string
Type the type name of the policy
type ResourceUpdateStrategy ¶
type ResourceUpdateStrategy struct { // Op the update op for selected resources Op ResourceUpdateOp `json:"op,omitempty"` // RecreateFields the field path which will trigger recreate if changed RecreateFields []string `json:"recreateFields,omitempty"` }
ResourceUpdateStrategy the update strategy for resource
func (*ResourceUpdateStrategy) DeepCopy ¶
func (in *ResourceUpdateStrategy) DeepCopy() *ResourceUpdateStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceUpdateStrategy.
func (*ResourceUpdateStrategy) DeepCopyInto ¶
func (in *ResourceUpdateStrategy) DeepCopyInto(out *ResourceUpdateStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SharedResourcePolicyRule ¶
type SharedResourcePolicyRule struct {
}SharedResourcePolicyRule defines the rule for sharing resources
func (*SharedResourcePolicyRule) DeepCopy ¶
func (in *SharedResourcePolicyRule) DeepCopy() *SharedResourcePolicyRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedResourcePolicyRule.
func (*SharedResourcePolicyRule) DeepCopyInto ¶
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 ¶
type SharedResourcePolicySpec struct {
}SharedResourcePolicySpec defines the spec of shared-resource policy
func (*SharedResourcePolicySpec) DeepCopy ¶
func (in *SharedResourcePolicySpec) DeepCopy() *SharedResourcePolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedResourcePolicySpec.
func (*SharedResourcePolicySpec) DeepCopyInto ¶
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 ¶
func (in *SharedResourcePolicySpec) FindStrategy(manifest *unstructured.Unstructured) bool
FindStrategy return if the target resource should be shared
func (*SharedResourcePolicySpec) Type ¶
func (in *SharedResourcePolicySpec) Type() string
Type the type name of the policy
type TakeOverPolicyRule ¶
type TakeOverPolicyRule struct {
Selector ResourcePolicyRuleSelector `json:"selector"`
}
TakeOverPolicyRule defines the rule for taking over resources
func (*TakeOverPolicyRule) DeepCopy ¶
func (in *TakeOverPolicyRule) DeepCopy() *TakeOverPolicyRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TakeOverPolicyRule.
func (*TakeOverPolicyRule) DeepCopyInto ¶
func (in *TakeOverPolicyRule) DeepCopyInto(out *TakeOverPolicyRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TakeOverPolicySpec ¶
type TakeOverPolicySpec struct {
Rules []TakeOverPolicyRule `json:"rules"`
}
TakeOverPolicySpec defines the spec of take-over policy
func (*TakeOverPolicySpec) DeepCopy ¶
func (in *TakeOverPolicySpec) DeepCopy() *TakeOverPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TakeOverPolicySpec.
func (*TakeOverPolicySpec) DeepCopyInto ¶
func (in *TakeOverPolicySpec) DeepCopyInto(out *TakeOverPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TakeOverPolicySpec) FindStrategy ¶
func (in *TakeOverPolicySpec) FindStrategy(manifest *unstructured.Unstructured) bool
FindStrategy return if the target resource should be taken over
func (*TakeOverPolicySpec) Type ¶
func (in *TakeOverPolicySpec) Type() string
Type the type name of the policy
type TopologyPolicySpec ¶
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 ¶
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.
Source Files ¶
- applyonce_policy_types.go
- component_types.go
- doc.go
- envbinding_types.go
- external_types.go
- garbagecollect_policy_types.go
- policy_types.go
- readonly_policy_types.go
- register.go
- resource_policy_types.go
- resource_update_policy_types.go
- sharedresource_policy_types.go
- takeover_policy_types.go
- zz_generated.deepcopy.go