v1alpha1

package
v1.12.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=remedy.karmada.io

Index

Constants

View Source
const (
	// ResourceKindRemedy is kind name of Remedy.
	ResourceKindRemedy = "Remedy"
	// ResourceSingularRemedy is singular name of Remedy.
	ResourceSingularRemedy = "remedy"
	// ResourcePluralRemedy is plural name of Remedy.
	ResourcePluralRemedy = "remedies"
	// ResourceNamespaceScopedRemedy indicates if Remedy is NamespaceScoped.
	ResourceNamespaceScopedRemedy = false
)
View Source
const GroupName = "remedy.karmada.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Deprecated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ClusterAffinity

type ClusterAffinity struct {
	// ClusterNames is the list of clusters to be selected.
	// +optional
	ClusterNames []string `json:"clusterNames,omitempty"`
}

ClusterAffinity represents the filter to select clusters.

func (*ClusterAffinity) DeepCopy

func (in *ClusterAffinity) DeepCopy() *ClusterAffinity

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

func (*ClusterAffinity) DeepCopyInto

func (in *ClusterAffinity) DeepCopyInto(out *ClusterAffinity)

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

type ClusterConditionOperator

type ClusterConditionOperator string

ClusterConditionOperator is the set of operators that can be used in the cluster condition requirement.

const (
	// ClusterConditionEqual means equal match.
	ClusterConditionEqual ClusterConditionOperator = "Equal"
	// ClusterConditionNotEqual means not equal match.
	ClusterConditionNotEqual ClusterConditionOperator = "NotEqual"
)

type ClusterConditionRequirement

type ClusterConditionRequirement struct {
	// ConditionType specifies the ClusterStatus condition type.
	// +required
	ConditionType ConditionType `json:"conditionType"`
	// Operator represents a conditionType's relationship to a conditionStatus.
	// Valid operators are Equal, NotEqual.
	//
	// +kubebuilder:validation:Enum=Equal;NotEqual
	// +required
	Operator ClusterConditionOperator `json:"operator"`
	// ConditionStatus specifies the ClusterStatue condition status.
	// +required
	ConditionStatus string `json:"conditionStatus"`
}

ClusterConditionRequirement describes the Cluster condition requirement details.

func (*ClusterConditionRequirement) DeepCopy

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

func (*ClusterConditionRequirement) DeepCopyInto

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

type ConditionType

type ConditionType string

ConditionType represents the detection ClusterStatus condition type.

const (
	// ServiceDomainNameResolutionReady expresses the detection of the domain name resolution
	// function of Service in the Kubernetes cluster.
	ServiceDomainNameResolutionReady ConditionType = "ServiceDomainNameResolutionReady"
)

type DecisionMatch

type DecisionMatch struct {
	// ClusterConditionMatch describes the cluster condition requirement.
	// +optional
	ClusterConditionMatch *ClusterConditionRequirement `json:"clusterConditionMatch,omitempty"`
}

DecisionMatch represents the decision match detail of activating the remedy system.

func (*DecisionMatch) DeepCopy

func (in *DecisionMatch) DeepCopy() *DecisionMatch

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

func (*DecisionMatch) DeepCopyInto

func (in *DecisionMatch) DeepCopyInto(out *DecisionMatch)

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

type Remedy

type Remedy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec represents the desired behavior of Remedy.
	// +required
	Spec RemedySpec `json:"spec"`
}

Remedy represents the cluster-level management strategies based on cluster conditions.

func (*Remedy) DeepCopy

func (in *Remedy) DeepCopy() *Remedy

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

func (*Remedy) DeepCopyInto

func (in *Remedy) DeepCopyInto(out *Remedy)

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

func (*Remedy) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RemedyAction

type RemedyAction string

RemedyAction represents the action type the remedy system needs to preform.

const (
	// TrafficControl indicates that the cluster requires traffic control.
	TrafficControl RemedyAction = "TrafficControl"
)

type RemedyList

type RemedyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Remedy `json:"items"`
}

RemedyList contains a list of Remedy.

func (*RemedyList) DeepCopy

func (in *RemedyList) DeepCopy() *RemedyList

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

func (*RemedyList) DeepCopyInto

func (in *RemedyList) DeepCopyInto(out *RemedyList)

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

func (*RemedyList) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RemedySpec

type RemedySpec struct {
	// ClusterAffinity specifies the clusters that Remedy needs to pay attention to.
	// For clusters that meet the DecisionConditions, Actions will be preformed.
	// If empty, all clusters will be selected.
	// +optional
	ClusterAffinity *ClusterAffinity `json:"clusterAffinity,omitempty"`

	// DecisionMatches indicates the decision matches of triggering the remedy
	// system to perform the actions. As long as any one DecisionMatch matches,
	// the Actions will be preformed.
	// If empty, the Actions will be performed immediately.
	// +optional
	DecisionMatches []DecisionMatch `json:"decisionMatches,omitempty"`

	// Actions specifies the actions that remedy system needs to perform.
	// If empty, no action will be performed.
	// +optional
	Actions []RemedyAction `json:"actions,omitempty"`
}

RemedySpec represents the desired behavior of Remedy.

func (*RemedySpec) DeepCopy

func (in *RemedySpec) DeepCopy() *RemedySpec

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

func (*RemedySpec) DeepCopyInto

func (in *RemedySpec) DeepCopyInto(out *RemedySpec)

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