v1alpha1

package
v0.0.0-...-4e26876 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

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

View Source
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"
)
View Source
const (
	DefaultAdvisorWeight  = 100
	DefaultDecisionWeight = 100
	DefaultScore          = 100
)
View Source
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

View Source
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"
)
View Source
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",
	}
)
View Source
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}
)
View Source
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

func (in *Advisor) DeepCopy() *Advisor

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

func (*Advisor) DeepCopyInto

func (in *Advisor) DeepCopyInto(out *Advisor)

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

func (in *Deployer) DeepCopy() *Deployer

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

func (*Deployer) DeepCopyInto

func (in *Deployer) DeepCopyInto(out *Deployer)

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

func (*Deployer) DeepCopyObject

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

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

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

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

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.

Jump to

Keyboard shortcuts

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