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 ApplyOncePolicySpec
- type ClusterConnection
- type EnvBindingSpec
- type EnvBindingStatus
- type EnvComponentPatch
- type EnvConfig
- type EnvPatch
- type EnvPlacement
- type EnvSelector
- type EnvStatus
- type EnvTraitPatch
- type GarbageCollectPolicyRule
- type GarbageCollectPolicyRuleSelector
- type GarbageCollectPolicySpec
- type GarbageCollectStrategy
- type NamespaceSelector
- type PlacementDecision
Constants ¶
const ( Group = "core.oam.dev" Version = "v1alpha1" )
Package type metadata.
const (
// ApplyOncePolicyType refers to the type of configuration drift policy
ApplyOncePolicyType = "apply-once"
)
const (
// EnvBindingPolicyType refers to the type of EnvBinding
EnvBindingPolicyType = "env-binding"
)
const (
// GarbageCollectPolicyType refers to the type of garbage-collect
GarbageCollectPolicyType = "garbage-collect"
)
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} )
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 ¶
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 ¶ 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
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvStatus.
func (*EnvStatus) DeepCopyInto ¶ added in v1.2.0
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
func (in *GarbageCollectPolicyRule) DeepCopy() *GarbageCollectPolicyRule
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"`
}
GarbageCollectPolicyRuleSelector select the targets of the rule
func (*GarbageCollectPolicyRuleSelector) DeepCopy ¶ added in v1.2.0
func (in *GarbageCollectPolicyRuleSelector) DeepCopy() *GarbageCollectPolicyRuleSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GarbageCollectPolicyRuleSelector.
func (*GarbageCollectPolicyRuleSelector) DeepCopyInto ¶ added in v1.2.0
func (in *GarbageCollectPolicyRuleSelector) DeepCopyInto(out *GarbageCollectPolicyRuleSelector)
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
func (in *GarbageCollectPolicySpec) DeepCopy() *GarbageCollectPolicySpec
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
func (in GarbageCollectPolicySpec) FindStrategy(manifest *unstructured.Unstructured) *GarbageCollectStrategy
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 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.