v1

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 58

Documentation

Overview

+kubebuilder:validation:Optional +groupName=operator.open-cluster-management.io

Index

Constants

View Source
const (
	// ClusterAnnotationsKeyPrefix is the prefix of annotations set on ManagedCluster when creating only.
	ClusterAnnotationsKeyPrefix = "agent.open-cluster-management.io"
)

Variables

View Source
var (
	GroupName    = "operator.open-cluster-management.io"
	GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}

	// Install is a function which adds this version to a scheme
	Install = schemeBuilder.AddToScheme

	// SchemeGroupVersion generated code relies on this name
	// Deprecated
	SchemeGroupVersion = GroupVersion
	// AddToScheme exists solely to keep the old generators creating valid code
	// DEPRECATED
	AddToScheme = schemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource generated code relies on this being here, but it logically belongs to the group DEPRECATED

Types

type AddOnManagerConfiguration added in v0.11.0

type AddOnManagerConfiguration struct {
	// FeatureGates represents the list of feature gates for addon manager
	// If it is set empty, default feature gates will be used.
	// If it is set, featuregate/Foo is an example of one item in FeatureGates:
	//   1. If featuregate/Foo does not exist, registration-operator will discard it
	//   2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]
	//   3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,
	//  	he can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.
	// +optional
	FeatureGates []FeatureGate `json:"featureGates,omitempty"`
}

func (*AddOnManagerConfiguration) DeepCopy added in v0.11.0

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

func (*AddOnManagerConfiguration) DeepCopyInto added in v0.11.0

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

func (AddOnManagerConfiguration) SwaggerDoc added in v0.11.0

func (AddOnManagerConfiguration) SwaggerDoc() map[string]string

type ClusterManager

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

	// Spec represents a desired deployment configuration of controllers that govern registration and work distribution for attached Klusterlets.
	// +kubebuilder:default={deployOption: {mode: Default}}
	Spec ClusterManagerSpec `json:"spec"`

	// Status represents the current status of controllers that govern the lifecycle of managed clusters.
	// +optional
	Status ClusterManagerStatus `json:"status,omitempty"`
}

ClusterManager configures the controllers on the hub that govern registration and work distribution for attached Klusterlets. In Default mode, ClusterManager will only be deployed in open-cluster-management-hub namespace. In Hosted mode, ClusterManager will be deployed in the namespace with the same name as cluster manager.

func (*ClusterManager) DeepCopy

func (in *ClusterManager) DeepCopy() *ClusterManager

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

func (*ClusterManager) DeepCopyInto

func (in *ClusterManager) DeepCopyInto(out *ClusterManager)

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

func (*ClusterManager) DeepCopyObject

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

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

func (*ClusterManager) GetResourceRequirement added in v0.13.0

func (cm *ClusterManager) GetResourceRequirement() *ResourceRequirement

func (ClusterManager) SwaggerDoc

func (ClusterManager) SwaggerDoc() map[string]string

type ClusterManagerDeployOption added in v0.7.0

type ClusterManagerDeployOption struct {
	// Mode can be Default or Hosted.
	// In Default mode, the Hub is installed as a whole and all parts of Hub are deployed in the same cluster.
	// In Hosted mode, only crd and configurations are installed on one cluster(defined as hub-cluster). Controllers run in another
	// cluster (defined as management-cluster) and connect to the hub with the kubeconfig in secret of "external-hub-kubeconfig"(a kubeconfig
	// of hub-cluster with cluster-admin permission).
	// Note: Do not modify the Mode field once it's applied.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:default=Default
	// +kubebuilder:validation:Enum=Default;Hosted
	Mode InstallMode `json:"mode,omitempty"`

	// Hosted includes configurations we need for clustermanager in the Hosted mode.
	// +optional
	Hosted *HostedClusterManagerConfiguration `json:"hosted,omitempty"`
}

ClusterManagerDeployOption describes the deployment options for cluster-manager

func (*ClusterManagerDeployOption) DeepCopy added in v0.7.0

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

func (*ClusterManagerDeployOption) DeepCopyInto added in v0.7.0

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

func (ClusterManagerDeployOption) SwaggerDoc added in v0.7.0

func (ClusterManagerDeployOption) SwaggerDoc() map[string]string

type ClusterManagerList

type ClusterManagerList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of deployment configurations for registration and work distribution controllers.
	Items []ClusterManager `json:"items"`
}

ClusterManagerList is a collection of deployment configurations for registration and work distribution controllers.

func (*ClusterManagerList) DeepCopy

func (in *ClusterManagerList) DeepCopy() *ClusterManagerList

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

func (*ClusterManagerList) DeepCopyInto

func (in *ClusterManagerList) DeepCopyInto(out *ClusterManagerList)

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

func (*ClusterManagerList) DeepCopyObject

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

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

func (ClusterManagerList) SwaggerDoc

func (ClusterManagerList) SwaggerDoc() map[string]string

type ClusterManagerSpec

type ClusterManagerSpec struct {
	// RegistrationImagePullSpec represents the desired image of registration controller/webhook installed on hub.
	// +optional
	// +kubebuilder:default=quay.io/open-cluster-management/registration
	RegistrationImagePullSpec string `json:"registrationImagePullSpec,omitempty"`

	// WorkImagePullSpec represents the desired image configuration of work controller/webhook installed on hub.
	// +optional
	// +kubebuilder:default=quay.io/open-cluster-management/work
	WorkImagePullSpec string `json:"workImagePullSpec,omitempty"`

	// PlacementImagePullSpec represents the desired image configuration of placement controller/webhook installed on hub.
	// +optional
	// +kubebuilder:default=quay.io/open-cluster-management/placement
	PlacementImagePullSpec string `json:"placementImagePullSpec,omitempty"`

	// AddOnManagerImagePullSpec represents the desired image configuration of addon manager controller/webhook installed on hub.
	// +optional
	// +kubebuilder:default=quay.io/open-cluster-management/addon-manager
	AddOnManagerImagePullSpec string `json:"addOnManagerImagePullSpec,omitempty"`

	// NodePlacement enables explicit control over the scheduling of the deployed pods.
	// +optional
	NodePlacement NodePlacement `json:"nodePlacement,omitempty"`

	// DeployOption contains the options of deploying a cluster-manager
	// Default mode is used if DeployOption is not set.
	// +optional
	// +kubebuilder:default={mode: Default}
	DeployOption ClusterManagerDeployOption `json:"deployOption,omitempty"`

	// RegistrationConfiguration contains the configuration of registration
	// +optional
	RegistrationConfiguration *RegistrationHubConfiguration `json:"registrationConfiguration,omitempty"`

	// WorkConfiguration contains the configuration of work
	// +optional
	WorkConfiguration *WorkConfiguration `json:"workConfiguration,omitempty"`

	// AddOnManagerConfiguration contains the configuration of addon manager
	// +optional
	AddOnManagerConfiguration *AddOnManagerConfiguration `json:"addOnManagerConfiguration,omitempty"`

	// ResourceRequirement specify QoS classes of deployments managed by clustermanager.
	// It applies to all the containers in the deployments.
	// +optional
	ResourceRequirement *ResourceRequirement `json:"resourceRequirement,omitempty"`
}

ClusterManagerSpec represents a desired deployment configuration of controllers that govern registration and work distribution for attached Klusterlets.

func (*ClusterManagerSpec) DeepCopy

func (in *ClusterManagerSpec) DeepCopy() *ClusterManagerSpec

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

func (*ClusterManagerSpec) DeepCopyInto

func (in *ClusterManagerSpec) DeepCopyInto(out *ClusterManagerSpec)

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

func (ClusterManagerSpec) SwaggerDoc

func (ClusterManagerSpec) SwaggerDoc() map[string]string

type ClusterManagerStatus

type ClusterManagerStatus struct {
	// ObservedGeneration is the last generation change you've dealt with
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Conditions contain the different condition statuses for this ClusterManager.
	// Valid condition types are:
	// Applied: Components in hub are applied.
	// Available: Components in hub are available and ready to serve.
	// Progressing: Components in hub are in a transitioning state.
	// Degraded: Components in hub do not match the desired configuration and only provide
	// degraded service.
	Conditions []metav1.Condition `json:"conditions"`

	// Generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
	// +optional
	Generations []GenerationStatus `json:"generations,omitempty"`

	// RelatedResources are used to track the resources that are related to this ClusterManager.
	// +optional
	RelatedResources []RelatedResourceMeta `json:"relatedResources,omitempty"`
}

ClusterManagerStatus represents the current status of the registration and work distribution controllers running on the hub.

func (*ClusterManagerStatus) DeepCopy

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

func (*ClusterManagerStatus) DeepCopyInto

func (in *ClusterManagerStatus) DeepCopyInto(out *ClusterManagerStatus)

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

func (ClusterManagerStatus) SwaggerDoc

func (ClusterManagerStatus) SwaggerDoc() map[string]string

type FeatureGate added in v0.8.0

type FeatureGate struct {
	// Feature is the key of feature gate. e.g. featuregate/Foo.
	// +kubebuilder:validation:Required
	// +required
	Feature string `json:"feature"`

	// Mode is either Enable, Disable, "" where "" is Disable by default.
	// In Enable mode, a valid feature gate `featuregate/Foo` will be set to "--featuregate/Foo=true".
	// In Disable mode, a valid feature gate `featuregate/Foo` will be set to "--featuregate/Foo=false".
	// +kubebuilder:default:=Disable
	// +kubebuilder:validation:Enum:=Enable;Disable
	// +optional
	Mode FeatureGateModeType `json:"mode,omitempty"`
}

func (*FeatureGate) DeepCopy added in v0.8.0

func (in *FeatureGate) DeepCopy() *FeatureGate

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

func (*FeatureGate) DeepCopyInto added in v0.8.0

func (in *FeatureGate) DeepCopyInto(out *FeatureGate)

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

func (FeatureGate) SwaggerDoc added in v0.8.0

func (FeatureGate) SwaggerDoc() map[string]string

type FeatureGateModeType added in v0.8.0

type FeatureGateModeType string
const (
	// FeatureGateModeTypeEnable is the feature gate type to enable a feature.
	FeatureGateModeTypeEnable FeatureGateModeType = "Enable"
	// FeatureGateModeTypeDisable is the feature gate type to disable a feature.
	FeatureGateModeTypeDisable FeatureGateModeType = "Disable"
)

type GenerationStatus

type GenerationStatus struct {
	// group is the group of the resource that you're tracking
	// +required
	Group string `json:"group"`

	// version is the version of the resource that you're tracking
	// +required
	Version string `json:"version"`

	// resource is the resource type of the resource that you're tracking
	// +required
	Resource string `json:"resource"`

	// namespace is where the resource that you're tracking is
	// +optional
	Namespace string `json:"namespace"`

	// name is the name of the resource that you're tracking
	// +required
	Name string `json:"name"`

	// lastGeneration is the last generation of the resource that controller applies
	// +required
	LastGeneration int64 `json:"lastGeneration" protobuf:"varint,5,opt,name=lastGeneration"`
}

GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made. The definition matches the GenerationStatus defined in github.com/openshift/api/v1

func (*GenerationStatus) DeepCopy

func (in *GenerationStatus) DeepCopy() *GenerationStatus

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

func (*GenerationStatus) DeepCopyInto

func (in *GenerationStatus) DeepCopyInto(out *GenerationStatus)

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

func (GenerationStatus) SwaggerDoc

func (GenerationStatus) SwaggerDoc() map[string]string

type HostedClusterManagerConfiguration added in v0.7.0

type HostedClusterManagerConfiguration struct {
	// RegistrationWebhookConfiguration represents the customized webhook-server configuration of registration.
	// +optional
	RegistrationWebhookConfiguration WebhookConfiguration `json:"registrationWebhookConfiguration,omitempty"`

	// WorkWebhookConfiguration represents the customized webhook-server configuration of work.
	// +optional
	WorkWebhookConfiguration WebhookConfiguration `json:"workWebhookConfiguration,omitempty"`
}

HostedClusterManagerConfiguration represents customized configurations we need to set for clustermanager in the Hosted mode.

func (*HostedClusterManagerConfiguration) DeepCopy added in v0.7.0

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

func (*HostedClusterManagerConfiguration) DeepCopyInto added in v0.7.0

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

func (HostedClusterManagerConfiguration) SwaggerDoc added in v0.7.0

type HubApiServerHostAlias added in v0.8.0

type HubApiServerHostAlias struct {
	// IP address of the host file entry.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$`
	IP string `json:"ip"`

	// Hostname for the above IP address.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$`
	Hostname string `json:"hostname"`
}

HubApiServerHostAlias holds the mapping between IP and hostname that will be injected as an entry in the pod's hosts file.

func (*HubApiServerHostAlias) DeepCopy added in v0.8.0

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

func (*HubApiServerHostAlias) DeepCopyInto added in v0.8.0

func (in *HubApiServerHostAlias) DeepCopyInto(out *HubApiServerHostAlias)

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

func (HubApiServerHostAlias) SwaggerDoc added in v0.8.0

func (HubApiServerHostAlias) SwaggerDoc() map[string]string

type InstallMode added in v0.6.0

type InstallMode string

InstallMode represents the mode of deploy cluster-manager or klusterlet

const (
	// InstallModeDefault is the default deploy mode.
	// The cluster-manager will be deployed in the hub-cluster, the klusterlet will be deployed in the managed-cluster.
	InstallModeDefault InstallMode = "Default"

	// InstallModeHosted means deploying components outside.
	// The cluster-manager will be deployed outside the hub-cluster, the klusterlet will be deployed outside the managed-cluster.
	InstallModeHosted InstallMode = "Hosted"

	// InstallModeSingleton means deploying components as a single controller.
	InstallModeSingleton InstallMode = "Singleton"

	// InstallModeSingleton means deploying components as a single controller in hosted mode.
	InstallModeSingletonHosted InstallMode = "SingletonHosted"
)

type Klusterlet

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

	// Spec represents the desired deployment configuration of Klusterlet agent.
	Spec KlusterletSpec `json:"spec,omitempty"`

	// Status represents the current status of Klusterlet agent.
	Status KlusterletStatus `json:"status,omitempty"`
}

Klusterlet represents controllers to install the resources for a managed cluster. When configured, the Klusterlet requires a secret named bootstrap-hub-kubeconfig in the agent namespace to allow API requests to the hub for the registration protocol. In Hosted mode, the Klusterlet requires an additional secret named external-managed-kubeconfig in the agent namespace to allow API requests to the managed cluster for resources installation.

func (*Klusterlet) DeepCopy

func (in *Klusterlet) DeepCopy() *Klusterlet

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

func (*Klusterlet) DeepCopyInto

func (in *Klusterlet) DeepCopyInto(out *Klusterlet)

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

func (*Klusterlet) DeepCopyObject

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

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

func (*Klusterlet) GetResourceRequirement added in v0.13.0

func (k *Klusterlet) GetResourceRequirement() *ResourceRequirement

func (Klusterlet) SwaggerDoc

func (Klusterlet) SwaggerDoc() map[string]string

type KlusterletDeployOption added in v0.7.0

type KlusterletDeployOption struct {
	// Mode can be Default, Hosted, Singleton or SingletonHosted. It is Default mode if not specified
	// In Default mode, all klusterlet related resources are deployed on the managed cluster.
	// In Hosted mode, only crd and configurations are installed on the spoke/managed cluster. Controllers run in another
	// cluster (defined as management-cluster) and connect to the mangaged cluster with the kubeconfig in secret of
	// "external-managed-kubeconfig"(a kubeconfig of managed-cluster with cluster-admin permission).
	// In Singleton mode, registration/work agent is started as a single deployment.
	// In SingletonHosted mode, agent is started as a single deployment in hosted mode.
	// Note: Do not modify the Mode field once it's applied.
	// +optional
	Mode InstallMode `json:"mode"`
}

KlusterletDeployOption describes the deployment options for klusterlet

func (*KlusterletDeployOption) DeepCopy added in v0.7.0

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

func (*KlusterletDeployOption) DeepCopyInto added in v0.7.0

func (in *KlusterletDeployOption) DeepCopyInto(out *KlusterletDeployOption)

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

func (KlusterletDeployOption) SwaggerDoc added in v0.7.0

func (KlusterletDeployOption) SwaggerDoc() map[string]string

type KlusterletList

type KlusterletList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of Klusterlet agents.
	Items []Klusterlet `json:"items"`
}

KlusterletList is a collection of Klusterlet agents.

func (*KlusterletList) DeepCopy

func (in *KlusterletList) DeepCopy() *KlusterletList

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

func (*KlusterletList) DeepCopyInto

func (in *KlusterletList) DeepCopyInto(out *KlusterletList)

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

func (*KlusterletList) DeepCopyObject

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

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

func (KlusterletList) SwaggerDoc

func (KlusterletList) SwaggerDoc() map[string]string

type KlusterletSpec

type KlusterletSpec struct {
	// Namespace is the namespace to deploy the agent on the managed cluster.
	// The namespace must have a prefix of "open-cluster-management-", and if it is not set,
	// the namespace of "open-cluster-management-agent" is used to deploy agent.
	// In addition, the add-ons are deployed to the namespace of "{Namespace}-addon".
	// In the Hosted mode, this namespace still exists on the managed cluster to contain
	// necessary resources, like service accounts, roles and rolebindings, while the agent
	// is deployed to the namespace with the same name as klusterlet on the management cluster.
	// +optional
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=^open-cluster-management-[-a-z0-9]*[a-z0-9]$
	Namespace string `json:"namespace,omitempty"`

	// RegistrationImagePullSpec represents the desired image configuration of registration agent.
	// quay.io/open-cluster-management.io/registration:latest will be used if unspecified.
	// +optional
	RegistrationImagePullSpec string `json:"registrationImagePullSpec,omitempty"`

	// WorkImagePullSpec represents the desired image configuration of work agent.
	// quay.io/open-cluster-management.io/work:latest will be used if unspecified.
	// +optional
	WorkImagePullSpec string `json:"workImagePullSpec,omitempty"`

	// ImagePullSpec represents the desired image configuration of agent, it takes effect only when
	// singleton mode is set. quay.io/open-cluster-management.io/registration-operator:latest will
	// be used if unspecified
	// +optional
	ImagePullSpec string `json:"imagePullSpec,omitempty"`

	// ClusterName is the name of the managed cluster to be created on hub.
	// The Klusterlet agent generates a random name if it is not set, or discovers the appropriate cluster name on OpenShift.
	// +optional
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
	ClusterName string `json:"clusterName,omitempty"`

	// ExternalServerURLs represents a list of apiserver urls and ca bundles that is accessible externally
	// If it is set empty, managed cluster has no externally accessible url that hub cluster can visit.
	// +optional
	ExternalServerURLs []ServerURL `json:"externalServerURLs,omitempty"`

	// NodePlacement enables explicit control over the scheduling of the deployed pods.
	// +optional
	NodePlacement NodePlacement `json:"nodePlacement,omitempty"`

	// DeployOption contains the options of deploying a klusterlet
	// +optional
	DeployOption KlusterletDeployOption `json:"deployOption,omitempty"`

	// RegistrationConfiguration contains the configuration of registration
	// +optional
	RegistrationConfiguration *RegistrationConfiguration `json:"registrationConfiguration,omitempty"`

	// WorkConfiguration contains the configuration of work
	// +optional
	WorkConfiguration *WorkAgentConfiguration `json:"workConfiguration,omitempty"`

	// HubApiServerHostAlias contains the host alias for hub api server.
	// registration-agent and work-agent will use it to communicate with hub api server.
	// +optional
	HubApiServerHostAlias *HubApiServerHostAlias `json:"hubApiServerHostAlias,omitempty"`

	// ResourceRequirement specify QoS classes of deployments managed by klusterlet.
	// It applies to all the containers in the deployments.
	// +optional
	ResourceRequirement *ResourceRequirement `json:"resourceRequirement,omitempty"`

	// PriorityClassName is the name of the PriorityClass that will be used by the
	// deployed klusterlet agent. It will be ignored when the PriorityClass/v1 API
	// is not available on the managed cluster.
	// +optional
	PriorityClassName string `json:"priorityClassName,omitempty"`
}

KlusterletSpec represents the desired deployment configuration of Klusterlet agent.

func (*KlusterletSpec) DeepCopy

func (in *KlusterletSpec) DeepCopy() *KlusterletSpec

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

func (*KlusterletSpec) DeepCopyInto

func (in *KlusterletSpec) DeepCopyInto(out *KlusterletSpec)

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

func (KlusterletSpec) SwaggerDoc

func (KlusterletSpec) SwaggerDoc() map[string]string

type KlusterletStatus

type KlusterletStatus struct {
	// ObservedGeneration is the last generation change you've dealt with
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Conditions contain the different condition statuses for this Klusterlet.
	// Valid condition types are:
	// Applied: Components have been applied in the managed cluster.
	// Available: Components in the managed cluster are available and ready to serve.
	// Progressing: Components in the managed cluster are in a transitioning state.
	// Degraded: Components in the managed cluster do not match the desired configuration and only provide
	// degraded service.
	Conditions []metav1.Condition `json:"conditions"`

	// Generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
	// +optional
	Generations []GenerationStatus `json:"generations,omitempty"`

	// RelatedResources are used to track the resources that are related to this Klusterlet.
	// +optional
	RelatedResources []RelatedResourceMeta `json:"relatedResources,omitempty"`
}

KlusterletStatus represents the current status of Klusterlet agent.

func (*KlusterletStatus) DeepCopy

func (in *KlusterletStatus) DeepCopy() *KlusterletStatus

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

func (*KlusterletStatus) DeepCopyInto

func (in *KlusterletStatus) DeepCopyInto(out *KlusterletStatus)

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

func (KlusterletStatus) SwaggerDoc

func (KlusterletStatus) SwaggerDoc() map[string]string

type NodePlacement added in v0.5.0

type NodePlacement struct {
	// NodeSelector defines which Nodes the Pods are scheduled on. The default is an empty list.
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Tolerations are attached by pods to tolerate any taint that matches
	// the triple <key,value,effect> using the matching operator <operator>.
	// The default is an empty list.
	// +optional
	Tolerations []v1.Toleration `json:"tolerations,omitempty"`
}

NodePlacement describes node scheduling configuration for the pods.

func (*NodePlacement) DeepCopy added in v0.5.0

func (in *NodePlacement) DeepCopy() *NodePlacement

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

func (*NodePlacement) DeepCopyInto added in v0.5.0

func (in *NodePlacement) DeepCopyInto(out *NodePlacement)

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

func (NodePlacement) SwaggerDoc added in v0.5.0

func (NodePlacement) SwaggerDoc() map[string]string

type RegistrationConfiguration added in v0.8.0

type RegistrationConfiguration struct {
	// clientCertExpirationSeconds represents the seconds of a client certificate to expire. If it is not set or 0, the default
	// duration seconds will be set by the hub cluster. If the value is larger than the max signing duration seconds set on
	// the hub cluster, the max signing duration seconds will be set.
	// +optional
	ClientCertExpirationSeconds int32 `json:"clientCertExpirationSeconds,omitempty"`

	// FeatureGates represents the list of feature gates for registration
	// If it is set empty, default feature gates will be used.
	// If it is set, featuregate/Foo is an example of one item in FeatureGates:
	//   1. If featuregate/Foo does not exist, registration-operator will discard it
	//   2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]
	//   3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,
	//  	he can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.
	// +optional
	FeatureGates []FeatureGate `json:"featureGates,omitempty"`

	// ClusterAnnotations is annotations with the reserve prefix "agent.open-cluster-management.io" set on
	// ManagedCluster when creating only, other actors can update it afterwards.
	// +optional
	ClusterAnnotations map[string]string `json:"clusterAnnotations,omitempty"`

	// KubeAPIQPS indicates the maximum QPS while talking with apiserver of hub cluster from the spoke cluster.
	// If it is set empty, use the default value: 50
	// +optional
	// +kubebuilder:default:=50
	KubeAPIQPS int32 `json:"kubeAPIQPS,omitempty"`

	// KubeAPIBurst indicates the maximum burst of the throttle while talking with apiserver of hub cluster from the spoke cluster.
	// If it is set empty, use the default value: 100
	// +optional
	// +kubebuilder:default:=100
	KubeAPIBurst int32 `json:"kubeAPIBurst,omitempty"`
}

func (*RegistrationConfiguration) DeepCopy added in v0.8.0

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

func (*RegistrationConfiguration) DeepCopyInto added in v0.8.0

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

func (RegistrationConfiguration) SwaggerDoc added in v0.8.0

func (RegistrationConfiguration) SwaggerDoc() map[string]string

type RegistrationHubConfiguration added in v0.11.0

type RegistrationHubConfiguration struct {
	// AutoApproveUser represents a list of users that can auto approve CSR and accept client. If the credential of the
	// bootstrap-hub-kubeconfig matches to the users, the cluster created by the bootstrap-hub-kubeconfig will
	// be auto-registered into the hub cluster. This takes effect only when ManagedClusterAutoApproval feature gate
	// is enabled.
	// +optional
	AutoApproveUsers []string `json:"autoApproveUsers,omitempty"`

	// FeatureGates represents the list of feature gates for registration
	// If it is set empty, default feature gates will be used.
	// If it is set, featuregate/Foo is an example of one item in FeatureGates:
	//   1. If featuregate/Foo does not exist, registration-operator will discard it
	//   2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]
	//   3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,
	//  	he can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.
	// +optional
	FeatureGates []FeatureGate `json:"featureGates,omitempty"`
}

func (*RegistrationHubConfiguration) DeepCopy added in v0.11.0

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

func (*RegistrationHubConfiguration) DeepCopyInto added in v0.11.0

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

func (RegistrationHubConfiguration) SwaggerDoc added in v0.11.0

func (RegistrationHubConfiguration) SwaggerDoc() map[string]string

type RelatedResourceMeta

type RelatedResourceMeta struct {
	// group is the group of the resource that you're tracking
	// +required
	Group string `json:"group"`

	// version is the version of the thing you're tracking
	// +required
	Version string `json:"version"`

	// resource is the resource type of the resource that you're tracking
	// +required
	Resource string `json:"resource"`

	// namespace is where the thing you're tracking is
	// +optional
	Namespace string `json:"namespace"`

	// name is the name of the resource that you're tracking
	// +required
	Name string `json:"name"`
}

RelatedResourceMeta represents the resource that is managed by an operator

func (*RelatedResourceMeta) DeepCopy

func (in *RelatedResourceMeta) DeepCopy() *RelatedResourceMeta

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

func (*RelatedResourceMeta) DeepCopyInto

func (in *RelatedResourceMeta) DeepCopyInto(out *RelatedResourceMeta)

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

func (RelatedResourceMeta) SwaggerDoc

func (RelatedResourceMeta) SwaggerDoc() map[string]string

type ResourceQosClass added in v0.13.0

type ResourceQosClass string
const (
	// Default use resource setting in the template file (with requests but no limits in the resources)
	ResourceQosClassDefault ResourceQosClass = "Default"
	// If all containers in the pod don't set resource request and limits, the pod is treated as BestEffort.
	ResourceQosClassBestEffort ResourceQosClass = "BestEffort"
	// Configurable resource requirements with requests and limits
	ResourceQosClassResourceRequirement ResourceQosClass = "ResourceRequirement"
)

type ResourceRequirement added in v0.13.0

type ResourceRequirement struct {
	// +kubebuilder:validation:Enum=Default;BestEffort;ResourceRequirement
	// +kubebuilder:default:=Default
	Type ResourceQosClass `json:"type"`
	// ResourceRequirements defines resource requests and limits when Type is ResourceQosClassResourceRequirement
	// +optional
	ResourceRequirements *corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
}

ResourceRequirement allow user override the default pod QoS classes

func (*ResourceRequirement) DeepCopy added in v0.13.0

func (in *ResourceRequirement) DeepCopy() *ResourceRequirement

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

func (*ResourceRequirement) DeepCopyInto added in v0.13.0

func (in *ResourceRequirement) DeepCopyInto(out *ResourceRequirement)

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

type ResourceRequirementAcquirer added in v0.13.0

type ResourceRequirementAcquirer interface {
	GetResourceRequirement() *ResourceRequirement
}

type ServerURL

type ServerURL struct {
	// URL is the url of apiserver endpoint of the managed cluster.
	// +required
	URL string `json:"url"`

	// CABundle is the ca bundle to connect to apiserver of the managed cluster.
	// System certs are used if it is not set.
	// +optional
	CABundle []byte `json:"caBundle,omitempty"`
}

ServerURL represents the apiserver url and ca bundle that is accessible externally

func (*ServerURL) DeepCopy

func (in *ServerURL) DeepCopy() *ServerURL

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

func (*ServerURL) DeepCopyInto

func (in *ServerURL) DeepCopyInto(out *ServerURL)

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

func (ServerURL) SwaggerDoc

func (ServerURL) SwaggerDoc() map[string]string

type WebhookConfiguration added in v0.7.0

type WebhookConfiguration struct {
	// Address represents the address of a webhook-server.
	// It could be in IP format or fqdn format.
	// The Address must be reachable by apiserver of the hub cluster.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$
	Address string `json:"address"`

	// Port represents the port of a webhook-server. The default value of Port is 443.
	// +optional
	// +kubebuilder:default=443
	// +kubebuilder:validation:Maximum=65535
	Port int32 `json:"port,omitempty"`
}

WebhookConfiguration has two properties: Address and Port.

func (*WebhookConfiguration) DeepCopy added in v0.7.0

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

func (*WebhookConfiguration) DeepCopyInto added in v0.7.0

func (in *WebhookConfiguration) DeepCopyInto(out *WebhookConfiguration)

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

func (WebhookConfiguration) SwaggerDoc added in v0.7.0

func (WebhookConfiguration) SwaggerDoc() map[string]string

type WorkAgentConfiguration added in v0.13.0

type WorkAgentConfiguration struct {
	// FeatureGates represents the list of feature gates for work
	// If it is set empty, default feature gates will be used.
	// If it is set, featuregate/Foo is an example of one item in FeatureGates:
	//   1. If featuregate/Foo does not exist, registration-operator will discard it
	//   2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]
	//   3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,
	//  	he can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.
	// +optional
	FeatureGates []FeatureGate `json:"featureGates,omitempty"`

	// KubeAPIQPS indicates the maximum QPS while talking with apiserver of hub cluster from the spoke cluster.
	// If it is set empty, use the default value: 50
	// +optional
	// +kubebuilder:default:=50
	KubeAPIQPS int32 `json:"kubeAPIQPS,omitempty"`

	// KubeAPIBurst indicates the maximum burst of the throttle while talking with apiserver of hub cluster from the spoke cluster.
	// If it is set empty, use the default value: 100
	// +optional
	// +kubebuilder:default:=100
	KubeAPIBurst int32 `json:"kubeAPIBurst,omitempty"`
}

func (*WorkAgentConfiguration) DeepCopy added in v0.13.0

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

func (*WorkAgentConfiguration) DeepCopyInto added in v0.13.0

func (in *WorkAgentConfiguration) DeepCopyInto(out *WorkAgentConfiguration)

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

func (WorkAgentConfiguration) SwaggerDoc added in v0.13.0

func (WorkAgentConfiguration) SwaggerDoc() map[string]string

type WorkConfiguration added in v0.9.0

type WorkConfiguration struct {
	// FeatureGates represents the list of feature gates for work
	// If it is set empty, default feature gates will be used.
	// If it is set, featuregate/Foo is an example of one item in FeatureGates:
	//   1. If featuregate/Foo does not exist, registration-operator will discard it
	//   2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]
	//   3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,
	//  	he can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.
	// +optional
	FeatureGates []FeatureGate `json:"featureGates,omitempty"`
}

func (*WorkConfiguration) DeepCopy added in v0.9.0

func (in *WorkConfiguration) DeepCopy() *WorkConfiguration

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

func (*WorkConfiguration) DeepCopyInto added in v0.9.0

func (in *WorkConfiguration) DeepCopyInto(out *WorkConfiguration)

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

func (WorkConfiguration) SwaggerDoc added in v0.9.0

func (WorkConfiguration) SwaggerDoc() map[string]string

Jump to

Keyboard shortcuts

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