Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=core.hybridapp.io
Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=core.hybridapp.io
Index ¶
- Constants
- Variables
- type Advisor
- type AdvisorType
- type Deployer
- type DeployerList
- type DeployerSet
- type DeployerSetList
- type DeployerSetSpec
- type DeployerSetStatus
- type DeployerSpec
- type DeployerSpecDescriptor
- type DeployerStatus
- type DeployerStatusDescriptor
- type PlacementRule
- type PlacementRuleList
- type PlacementRuleSpec
- type PlacementRuleStatus
- type Recommendation
- type ScoredObjectReference
Constants ¶
const ( // HybridDiscoveryEnabled indicates whether the discovery is enabled for a resource managed by this deployable HybridDiscoveryEnabled = "enabled" // HybridDiscoveryCompleted indicates whether the discovery has been completed for resource controlled by this deployable HybridDiscoveryCompleted = "completed" )
const ( DefaultAdvisorWeight = 100 DefaultDecisionWeight = 100 DefaultScore = 100 )
const (
//IsDefaultDeployer defines annotation used to indicate if a deployer is considered default for a cluster
IsDefaultDeployer = "app.cp4mcm.ibm.com/is-default-deployer"
)
Variables ¶
var ( // AnnotationHybridDiscovery indicates whether a resource has been created as a result of a discovery process AnnotationHybridDiscovery = SchemeGroupVersion.Group + "/hybrid-discovery" //AnnotationClusterScope indicates whether discovery should look for resources cluster wide rather then in a specific namespace AnnotationClusterScope = SchemeGroupVersion.Group + "/hybrid-discovery-clusterscoped" SourceObject = SchemeGroupVersion.Group + "/source-object" DeployerType = SchemeGroupVersion.Group + "/deployer-type" HostingDeployer = SchemeGroupVersion.Group + "/hosting-deployer" DeployerInCluster = SchemeGroupVersion.Group + "/deployer-in-cluster" DefaultDeployerType = "kubernetes" )
var ( DefaultKubernetesPlacementTarget = &metav1.GroupVersionResource{ Group: "cluster.open-cluster-management.io", Version: "v1", Resource: "managedclusters", } DefaultKubernetesPlacementTargetGVK = &metav1.GroupVersionKind{ Group: "cluster.open-cluster-management.io", Version: "v1", Kind: "ManagedCluster", } DeployerPlacementTarget = &metav1.GroupVersionResource{ Group: "core.hybridapp.io", Version: "v1alpha1", Resource: "deployers", } )
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "core.hybridapp.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
var ( // IgnoredTargets represents an array of ignored targets IgnoredTargets = []corev1.ObjectReference{ { Name: LocalClusterName, Namespace: LocalClusterName, Kind: DefaultKubernetesPlacementTargetGVK.Kind, APIVersion: DefaultKubernetesPlacementTarget.Group + "/" + DefaultKubernetesPlacementTarget.Version, }, } )
Functions ¶
This section is empty.
Types ¶
type Advisor ¶
type Advisor struct { Name string `json:"name"` Type *AdvisorType `json:"type,omitempty"` Weight *int16 `json:"weight,omitempty"` Rules *runtime.RawExtension `json:"rules,omitempty"` }
func (*Advisor) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Advisor.
func (*Advisor) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AdvisorType ¶
type AdvisorType string
const ( AdvisorTypeUnknown AdvisorType = "" AdvisorTypePredicate AdvisorType = "predicate" AdvisorTypePriority AdvisorType = "priority" // LocalClusterName is the name of the local cluster representation on hub LocalClusterName = "local-cluster" )
type Deployer ¶
type Deployer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DeployerSpec `json:"spec,omitempty"` Status DeployerStatus `json:"status,omitempty"` }
Deployer is the Schema for the deployers API +kubebuilder:subresource:status +kubebuilder:resource:path=deployers,scope=Namespaced
func (*Deployer) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Deployer.
func (*Deployer) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Deployer) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeployerList ¶
type DeployerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Deployer `json:"items"` }
DeployerList contains a list of Deployer
func (*DeployerList) DeepCopy ¶
func (in *DeployerList) DeepCopy() *DeployerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployerList.
func (*DeployerList) DeepCopyInto ¶
func (in *DeployerList) DeepCopyInto(out *DeployerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeployerList) DeepCopyObject ¶
func (in *DeployerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeployerSet ¶
type DeployerSet struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DeployerSetSpec `json:"spec,omitempty"` Status DeployerSetStatus `json:"status,omitempty"` }
DeployerSet is the Schema for the deployersets API +kubebuilder:subresource:status +kubebuilder:resource:path=deployersets,scope=Namespaced
func (*DeployerSet) DeepCopy ¶
func (in *DeployerSet) DeepCopy() *DeployerSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployerSet.
func (*DeployerSet) DeepCopyInto ¶
func (in *DeployerSet) DeepCopyInto(out *DeployerSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeployerSet) DeepCopyObject ¶
func (in *DeployerSet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeployerSetList ¶
type DeployerSetList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DeployerSet `json:"items"` }
DeployerSetList contains a list of DeployerSet
func (*DeployerSetList) DeepCopy ¶
func (in *DeployerSetList) DeepCopy() *DeployerSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployerSetList.
func (*DeployerSetList) DeepCopyInto ¶
func (in *DeployerSetList) DeepCopyInto(out *DeployerSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeployerSetList) DeepCopyObject ¶
func (in *DeployerSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DeployerSetSpec ¶
type DeployerSetSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html DefaultDeployer string `json:"defaultDeployer,omitempty"` Deployers []DeployerSpecDescriptor `json:"deployers,omitempty"` }
DeployerSetSpec defines the desired state of DeployerSet
func (*DeployerSetSpec) DeepCopy ¶
func (in *DeployerSetSpec) DeepCopy() *DeployerSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployerSetSpec.
func (*DeployerSetSpec) DeepCopyInto ¶
func (in *DeployerSetSpec) DeepCopyInto(out *DeployerSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeployerSetStatus ¶
type DeployerSetStatus struct {
Deployers []DeployerStatusDescriptor `json:"deployers,omitempty"`
}
DeployerSetStatus defines the observed state of DeployerSet
func (*DeployerSetStatus) DeepCopy ¶
func (in *DeployerSetStatus) DeepCopy() *DeployerSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployerSetStatus.
func (*DeployerSetStatus) DeepCopyInto ¶
func (in *DeployerSetStatus) DeepCopyInto(out *DeployerSetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeployerSpec ¶
type DeployerSpec struct { // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html Type string `json:"type"` PlacementTarget *metav1.GroupVersionResource `json:"placementTarget,omitempty"` OperatorRef *corev1.ObjectReference `json:"operatorRef,omitempty"` Capabilities []rbacv1.PolicyRule `json:"capabilities,omitempty"` Scope apiextensions.ResourceScope `json:"scope,omitempty"` }
DeployerSpec defines the desired state of Deployer
func (*DeployerSpec) DeepCopy ¶
func (in *DeployerSpec) DeepCopy() *DeployerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployerSpec.
func (*DeployerSpec) DeepCopyInto ¶
func (in *DeployerSpec) DeepCopyInto(out *DeployerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeployerSpecDescriptor ¶
type DeployerSpecDescriptor struct { // NamespacedName of deployer for key Key string `json:"key"` Spec DeployerSpec `json:"spec"` }
DeployerSpecDescriptor defines the deployer structure
func (*DeployerSpecDescriptor) DeepCopy ¶
func (in *DeployerSpecDescriptor) DeepCopy() *DeployerSpecDescriptor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployerSpecDescriptor.
func (*DeployerSpecDescriptor) DeepCopyInto ¶
func (in *DeployerSpecDescriptor) DeepCopyInto(out *DeployerSpecDescriptor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeployerStatus ¶
type DeployerStatus struct { }
DeployerStatus defines the observed state of Deployer
func (*DeployerStatus) DeepCopy ¶
func (in *DeployerStatus) DeepCopy() *DeployerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployerStatus.
func (*DeployerStatus) DeepCopyInto ¶
func (in *DeployerStatus) DeepCopyInto(out *DeployerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeployerStatusDescriptor ¶
type DeployerStatusDescriptor struct { // NamespacedName of deployer for key Key string `json:"key"` Status DeployerStatus `json:"status"` }
DeployerStatusDescriptor defines the deployer status
func (*DeployerStatusDescriptor) DeepCopy ¶
func (in *DeployerStatusDescriptor) DeepCopy() *DeployerStatusDescriptor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployerStatusDescriptor.
func (*DeployerStatusDescriptor) DeepCopyInto ¶
func (in *DeployerStatusDescriptor) DeepCopyInto(out *DeployerStatusDescriptor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PlacementRule ¶
type PlacementRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PlacementRuleSpec `json:"spec,omitempty"` Status PlacementRuleStatus `json:"status,omitempty"` }
PlacementRule is the Schema for the placementrules API +kubebuilder:subresource:status +kubebuilder:resource:path=placementrules,scope=Namespaced +kubebuilder:resource:path=placementrules,shortName=hpr
func (*PlacementRule) DeepCopy ¶
func (in *PlacementRule) DeepCopy() *PlacementRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementRule.
func (*PlacementRule) DeepCopyInto ¶
func (in *PlacementRule) DeepCopyInto(out *PlacementRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PlacementRule) DeepCopyObject ¶
func (in *PlacementRule) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PlacementRuleList ¶
type PlacementRuleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PlacementRule `json:"items"` }
PlacementRuleList contains a list of PlacementRule
func (*PlacementRuleList) DeepCopy ¶
func (in *PlacementRuleList) DeepCopy() *PlacementRuleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementRuleList.
func (*PlacementRuleList) DeepCopyInto ¶
func (in *PlacementRuleList) DeepCopyInto(out *PlacementRuleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PlacementRuleList) DeepCopyObject ¶
func (in *PlacementRuleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PlacementRuleSpec ¶
type PlacementRuleSpec struct { DeployerType *string `json:"deployerType,omitempty"` // default: kubernetes Targets []corev1.ObjectReference `json:"targets,omitempty"` // nil: all TargetLabels *metav1.LabelSelector `json:"targetLabels,omitempty"` // nil: all DecisionWeight *int16 `json:"decisionWeight,omitempty"` // nil: 100 Replicas *int16 `json:"replicas,omitempty"` // nil: all Advisors []Advisor `json:"advisors,omitempty"` }
PlacementRuleSpec defines the desired state of PlacementRule For different deployer type, the target might be different. Default kuberentes target: managedclusters.cluster.open-cluster-management.io"
func (*PlacementRuleSpec) DeepCopy ¶
func (in *PlacementRuleSpec) DeepCopy() *PlacementRuleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementRuleSpec.
func (*PlacementRuleSpec) DeepCopyInto ¶
func (in *PlacementRuleSpec) DeepCopyInto(out *PlacementRuleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PlacementRuleStatus ¶
type PlacementRuleStatus struct { ObservedGeneration int64 `json:"observedGeneration,omitempty"` LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` Candidates []corev1.ObjectReference `json:"candidates,omitempty"` Eliminators []corev1.ObjectReference `json:"eliminators,omitempty"` Recommendations map[string]Recommendation `json:"recommendations,omitempty"` // key: advisor name Decisions []corev1.ObjectReference `json:"decisions,omitempty"` }
PlacementRuleStatus defines the observed state of PlacementRule
func (*PlacementRuleStatus) DeepCopy ¶
func (in *PlacementRuleStatus) DeepCopy() *PlacementRuleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementRuleStatus.
func (*PlacementRuleStatus) DeepCopyInto ¶
func (in *PlacementRuleStatus) DeepCopyInto(out *PlacementRuleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Recommendation ¶
type Recommendation []ScoredObjectReference
func (Recommendation) DeepCopy ¶
func (in Recommendation) DeepCopy() Recommendation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Recommendation.
func (Recommendation) DeepCopyInto ¶
func (in Recommendation) DeepCopyInto(out *Recommendation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScoredObjectReference ¶
type ScoredObjectReference struct { corev1.ObjectReference `json:",inline"` // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=100 Score *int16 `json:"score,omitempty"` // default is 100 }
func (*ScoredObjectReference) DeepCopy ¶
func (in *ScoredObjectReference) DeepCopy() *ScoredObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScoredObjectReference.
func (*ScoredObjectReference) DeepCopyInto ¶
func (in *ScoredObjectReference) DeepCopyInto(out *ScoredObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.