v1alpha1

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the fleetconfig v1alpha1 API group. +kubebuilder:object:generate=true +groupName=fleetconfig.open-cluster-management.io

Index

Constants

View Source
const (
	// FleetConfigHubInitialized means that the Hub has been initialized.
	FleetConfigHubInitialized = "HubInitialized"

	// FleetConfigAddonsConfigured means that all addons have been configured on the Hub.
	FleetConfigAddonsConfigured = "AddonsConfigured"

	// FleetConfigCleanupFailed means that a failure occurred during cleanup.
	FleetConfigCleanupFailed = "CleanupFailed"

	// FleetConfigAddonsEnabled means that all addons have been enabled for a particular Spoke.
	FleetConfigAddonsEnabled = "AddonsEnabled"
)

FleetConfig condition types

View Source
const (
	// FleetConfigStarting means that the Hub and Spoke(s) are being initialized / joined.
	FleetConfigStarting = "Initializing"

	// FleetConfigRunning means that the Hub is initialized and all Spoke(s) have joined successfully.
	FleetConfigRunning = "Running"

	// FleetConfigUnhealthy means that a failure occurred during Hub initialization and/or Spoke join attempt.
	FleetConfigUnhealthy = "Unhealthy"

	// FleetConfigDeleting means that the FleetConfig is being deleted.
	FleetConfigDeleting = "Deleting"
)

FleetConfig phases

View Source
const (
	// ManagedClusterTypeHub is the type of managed cluster that is a hub.
	ManagedClusterTypeHub = "hub"

	// ManagedClusterTypeSpoke is the type of managed cluster that is a spoke.
	ManagedClusterTypeSpoke = "spoke"

	// ManagedClusterTypeHubAsSpoke is the type of managed cluster that is both a hub and a spoke.
	ManagedClusterTypeHubAsSpoke = "hub-as-spoke"
)
View Source
const (
	// LabelManagedClusterType is the label key for the managed cluster type.
	LabelManagedClusterType = "fleetconfig.open-cluster-management.io/managedClusterType"

	// LabelAddOnManagedBy is the label key for the lifecycle manager of an add-on resource.
	LabelAddOnManagedBy = "addon.open-cluster-management.io/managedBy"
)

FleetConfig labels

View Source
const (
	// CSRRegistrationDriver is the default CSR-based registration driver.
	CSRRegistrationDriver = "csr"

	// AWSIRSARegistrationDriver is the AWS IAM Role for Service Accounts (IRSA) registration driver.
	AWSIRSARegistrationDriver = "awsirsa"
)

Registration driver types

View Source
const (
	// AddonConfigMapNamePrefix is the common name prefix for all configmaps containing addon configurations.
	AddonConfigMapNamePrefix = "fleet-addon"

	// AddonConfigMapManifestRawKey is the data key containing raw manifests.
	AddonConfigMapManifestRawKey = "manifestsRaw"

	// AddonConfigMapManifestRawKey is the data key containing a URL to download manifests.
	AddonConfigMapManifestURLKey = "manifestsURL"
)

Addon ConfigMap constants

View Source
const (
	// FleetConfigFinalizer is the finalizer for FleetConfig cleanup.
	FleetConfigFinalizer = "fleetconfig.open-cluster-management.io/cleanup"
)
View Source
const (
	ReconcileSuccess = "ReconcileSuccess"
)

FleetConfig condition reasons

Variables

View Source
var (
	// ManagedByLabels are labeles applies to resources to denote that fleetconfig-controller is managing the lifecycle.
	ManagedByLabels = map[string]string{
		LabelAddOnManagedBy: "fleetconfig-controller",
	}
	// ManagedBySelector is a label selector for filtering add-on resources managed fleetconfig-controller.
	ManagedBySelector = labels.SelectorFromSet(labels.Set(ManagedByLabels))
)
View Source
var (
	// GroupKind is the group kind for the fleetconfig API.
	GroupKind = schema.GroupKind{Group: group, Kind: "FleetConfig"}

	// GroupVersion is the group version for the fleetconfig API.
	GroupVersion = schema.GroupVersion{Group: group, Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var AllowedAddonURLSchemes = []string{"http", "https"}

AllowedAddonURLSchemes are the URL schemes which can be used to provide manifests for configuring addons.

Functions

func SetupFleetConfigWebhookWithManager

func SetupFleetConfigWebhookWithManager(mgr ctrl.Manager) error

SetupFleetConfigWebhookWithManager registers the webhook for FleetConfig in the manager.

Types

type AddOn added in v0.0.6

type AddOn struct {
	// The name of the add-on being enabled. Must match one of the default or manually configured add-on names.
	// +required
	ConfigName string `json:"configName"`

	// The namespace to install the add-on in. If left empty, installs into the "open-cluster-management-addon" namespace.
	// +optional
	InstallNamespace string `json:"installNamespace,omitempty"`

	// Annotations to apply to the add-on.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
}

AddOn enables add-on installation on the cluster.

func (*AddOn) DeepCopy added in v0.0.6

func (in *AddOn) DeepCopy() *AddOn

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

func (*AddOn) DeepCopyInto added in v0.0.6

func (in *AddOn) DeepCopyInto(out *AddOn)

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

type AddOnConfig added in v0.0.6

type AddOnConfig struct {
	// The name of the add-on.
	// +required
	Name string `json:"name"`

	// The add-on version. Optional, defaults to "v0.0.1"
	// +kubebuilder:default:="v0.0.1"
	// +optional
	Version string `json:"version,omitempty"`

	// The rolebinding to the clusterrole in the cluster namespace for the addon agent
	// +optional
	ClusterRoleBinding string `json:"clusterRoleBinding,omitempty"`

	// Enable the agent to register to the hub cluster. Optional, defaults to false.
	// +kubebuilder:default:=false
	// +optional
	HubRegistration bool `json:"hubRegistration,omitempty"`

	// Whether to overwrite the add-on if it already exists. Optional, defaults to false.
	// +kubebuilder:default:=false
	// +optional
	Overwrite bool `json:"overwrite,omitempty"`
}

AddOnConfig is the configuration of a custom AddOn that can be installed on a cluster.

func (*AddOnConfig) DeepCopy added in v0.0.6

func (in *AddOnConfig) DeepCopy() *AddOnConfig

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

func (*AddOnConfig) DeepCopyInto added in v0.0.6

func (in *AddOnConfig) DeepCopyInto(out *AddOnConfig)

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

type ClusterManager

type ClusterManager struct {
	// A set of comma-separated pairs of the form 'key1=value1,key2=value2' that describe feature gates for alpha/experimental features.
	// Options are:
	//  - AddonManagement (ALPHA - default=true)
	//  - AllAlpha (ALPHA - default=false)
	//  - AllBeta (BETA - default=false)
	//  - CloudEventsDrivers (ALPHA - default=false)
	//  - DefaultClusterSet (ALPHA - default=false)
	//  - ManagedClusterAutoApproval (ALPHA - default=false)
	//  - ManifestWorkReplicaSet (ALPHA - default=false)
	//  - NilExecutorValidating (ALPHA - default=false)
	//  - ResourceCleanup (BETA - default=true)
	//  - V1beta1CSRAPICompatibility (ALPHA - default=false)
	// +kubebuilder:default:="AddonManagement=true"
	// +optional
	FeatureGates string `json:"featureGates,omitempty"`

	// If set, the cluster manager operator will be purged and the open-cluster-management namespace deleted
	// when the FleetConfig CR is deleted.
	// +kubebuilder:default:=true
	// +optional
	PurgeOperator bool `json:"purgeOperator,omitempty"`

	// Resource specifications for all clustermanager-managed containers.
	// +kubebuilder:default:={}
	// +optional
	Resources ResourceSpec `json:"resources,omitzero"`

	// Version and image registry details for the cluster manager.
	// +kubebuilder:default:={}
	// +optional
	Source OCMSource `json:"source,omitzero"`

	// If set, the bootstrap token will used instead of a service account token.
	// +optional
	UseBootstrapToken bool `json:"useBootstrapToken,omitempty"`
}

ClusterManager is the configuration for a 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.

type Condition

type Condition struct {
	metav1.Condition `json:",inline"`
	WantStatus       metav1.ConditionStatus `json:"wantStatus"`
}

Condition describes the state of a FleetConfig.

func NewCondition

func NewCondition(msg, cType string, status, wantStatus metav1.ConditionStatus) Condition

NewCondition returns a new v1alpha1.Condition.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

func (Condition) Equal

func (c Condition) Equal(other Condition) bool

Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.

type FleetConfig

type FleetConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitzero"`

	Spec   FleetConfigSpec   `json:"spec,omitzero"`
	Status FleetConfigStatus `json:"status,omitempty"`
}

FleetConfig is the Schema for the fleetconfigs API.

func (*FleetConfig) BaseArgs added in v0.0.7

func (m *FleetConfig) BaseArgs() []string

BaseArgs returns the base arguments for all clusteradm commands.

func (*FleetConfig) DeepCopy

func (in *FleetConfig) DeepCopy() *FleetConfig

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

func (*FleetConfig) DeepCopyInto

func (in *FleetConfig) DeepCopyInto(out *FleetConfig)

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

func (*FleetConfig) DeepCopyObject

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

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

func (*FleetConfig) GetCondition

func (m *FleetConfig) GetCondition(cType string) *Condition

GetCondition gets the condition with the supplied type, if it exists.

func (*FleetConfig) IsUnjoined added in v0.0.8

func (m *FleetConfig) IsUnjoined(spoke Spoke, joinedSpoke JoinedSpoke) bool

IsUnjoined returns true if a spoke cluster was successfully joined and then successfully unjoined, and the unjoined timestamp is after the joined timestamp. Returns false in all other cases.

func (*FleetConfig) SetConditions

func (m *FleetConfig) SetConditions(cover bool, c ...Condition)

SetConditions sets the supplied conditions on a FleetConfig, replacing any existing conditions.

type FleetConfigCustomDefaulter

type FleetConfigCustomDefaulter struct {
}

FleetConfigCustomDefaulter struct is responsible for setting default values on the custom resource of the Kind FleetConfig when those are created or updated.

NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods, as it is used only for temporary operations and does not need to be deeply copied.

func (*FleetConfigCustomDefaulter) DeepCopy

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

func (*FleetConfigCustomDefaulter) DeepCopyInto

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

func (*FleetConfigCustomDefaulter) Default

Default implements webhook.CustomDefaulter so a webhook will be registered for the Kind FleetConfig.

type FleetConfigCustomValidator

type FleetConfigCustomValidator struct {
	// contains filtered or unexported fields
}

FleetConfigCustomValidator struct is responsible for validating the FleetConfig resource when it is created, updated, or deleted.

NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods, as this struct is used only for temporary operations and does not need to be deeply copied.

func (*FleetConfigCustomValidator) ValidateCreate

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*FleetConfigCustomValidator) ValidateDelete

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*FleetConfigCustomValidator) ValidateUpdate

func (v *FleetConfigCustomValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type FleetConfigList

type FleetConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`
	Items           []FleetConfig `json:"items"`
}

FleetConfigList contains a list of FleetConfig.

func (*FleetConfigList) DeepCopy

func (in *FleetConfigList) DeepCopy() *FleetConfigList

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

func (*FleetConfigList) DeepCopyInto

func (in *FleetConfigList) DeepCopyInto(out *FleetConfigList)

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

func (*FleetConfigList) DeepCopyObject

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

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

type FleetConfigSpec

type FleetConfigSpec struct {
	// +required
	Hub Hub `json:"hub"`

	// +required
	Spokes []Spoke `json:"spokes"`

	// +kubebuilder:default:={}
	// +optional
	RegistrationAuth RegistrationAuth `json:"registrationAuth,omitzero"`

	// +optional
	AddOnConfigs []AddOnConfig `json:"addOnConfigs,omitempty"`

	// Timeout is the timeout in seconds for all clusteradm operations, including init, accept, join, upgrade, etc.
	// +kubebuilder:default:=300
	// +optional
	Timeout int `json:"timeout,omitempty"`

	// LogVerbosity is the verbosity of the logs.
	// +kubebuilder:validation:Enum=0;1;2;3;4;5;6;7;8;9;10
	// +kubebuilder:default:=0
	// +optional
	LogVerbosity int `json:"logVerbosity,omitempty"`
}

FleetConfigSpec defines the desired state of FleetConfig.

func (*FleetConfigSpec) DeepCopy

func (in *FleetConfigSpec) DeepCopy() *FleetConfigSpec

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

func (*FleetConfigSpec) DeepCopyInto

func (in *FleetConfigSpec) DeepCopyInto(out *FleetConfigSpec)

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

type FleetConfigStatus

type FleetConfigStatus struct {
	Phase        string        `json:"phase,omitempty"`
	Conditions   []Condition   `json:"conditions,omitempty"`
	JoinedSpokes []JoinedSpoke `json:"joinedSpokes,omitempty"`
}

FleetConfigStatus defines the observed state of FleetConfig.

func (*FleetConfigStatus) DeepCopy

func (in *FleetConfigStatus) DeepCopy() *FleetConfigStatus

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

func (*FleetConfigStatus) DeepCopyInto

func (in *FleetConfigStatus) DeepCopyInto(out *FleetConfigStatus)

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

func (*FleetConfigStatus) Equal

func (s *FleetConfigStatus) Equal(other *FleetConfigStatus) bool

Equal returns true if the status is identical to the supplied status, ignoring the LastTransitionTimes and order of statuses.

func (*FleetConfigStatus) GetCondition

func (s *FleetConfigStatus) GetCondition(cType string) *Condition

GetCondition returns the condition with the supplied type, if it exists.

func (*FleetConfigStatus) SetConditions

func (s *FleetConfigStatus) SetConditions(cover bool, c ...Condition)

SetConditions sets the supplied conditions, adding net-new conditions and replacing any existing conditions of the same type. This is a no-op if all supplied conditions are identical (ignoring the last transition time) to those already set. If cover is false, existing conditions are not replaced.

func (*FleetConfigStatus) ToComparable

func (s *FleetConfigStatus) ToComparable(_ ...Condition) *FleetConfigStatus

ToComparable returns a deep copy of the FleetConfigStatus that's suitable for semantic comparison.

type Helm

type Helm struct {
	// Raw, YAML-formatted Helm values.
	// +optional
	Values string `json:"values,omitempty"`

	// Comma-separated Helm values, e.g., key1=val1,key2=val2.
	// +optional
	Set []string `json:"set,omitempty"`

	// Comma-separated Helm JSON values, e.g., key1=jsonval1,key2=jsonval2.
	// +optional
	SetJSON []string `json:"setJson,omitempty"`

	// Comma-separated Helm literal STRING values.
	// +optional
	SetLiteral []string `json:"setLiteral,omitempty"`

	// Comma-separated Helm STRING values, e.g., key1=val1,key2=val2.
	// +optional
	SetString []string `json:"setString,omitempty"`
}

Helm is the configuration for helm.

func (*Helm) DeepCopy

func (in *Helm) DeepCopy() *Helm

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

func (*Helm) DeepCopyInto

func (in *Helm) DeepCopyInto(out *Helm)

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

type Hub

type Hub struct {
	// APIServer is the API server URL for the Hub cluster. If provided, spokes clusters will
	// join the hub using this API server instead of the one in the bootstrap kubeconfig.
	// Spoke clusters with ForceInternalEndpointLookup set to true will ignore this field.
	// +optional
	APIServer string `json:"apiServer,omitempty"`

	// Hub cluster CA certificate, optional
	// +optional
	Ca string `json:"ca,omitempty"`

	// ClusterManager configuration.
	// +optional
	ClusterManager *ClusterManager `json:"clusterManager,omitempty"`

	// If true, create open-cluster-management namespace, otherwise use existing one.
	// +kubebuilder:default:=true
	// +optional
	CreateNamespace bool `json:"createNamespace,omitempty"`

	// If set, the hub will be reinitialized.
	// +optional
	Force bool `json:"force,omitempty"`

	// Kubeconfig details for the Hub cluster.
	// +required
	Kubeconfig Kubeconfig `json:"kubeconfig"`

	// Singleton control plane configuration. If provided, deploy a singleton control plane instead of clustermanager.
	// This is an alpha stage flag.
	// +optional
	SingletonControlPlane *SingletonControlPlane `json:"singleton,omitempty"`
}

Hub provides specifications for an OCM hub cluster.

func (*Hub) DeepCopy

func (in *Hub) DeepCopy() *Hub

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

func (*Hub) DeepCopyInto

func (in *Hub) DeepCopyInto(out *Hub)

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

type ISpoke added in v0.0.7

type ISpoke interface {
	GetName() string
	GetKubeconfig() Kubeconfig
	GetPurgeKlusterletOperator() bool
}

ISpoke is an interface that both Spoke and JoinedSpoke implement. +kubebuilder:object:generate=false

type JoinedSpoke

type JoinedSpoke struct {
	// The name of the spoke cluster.
	Name string `json:"name"`

	// Kubeconfig details for the Spoke cluster.
	Kubeconfig Kubeconfig `json:"kubeconfig"`

	// If set, the klusterlet operator will be purged and all open-cluster-management namespaces deleted
	// when the klusterlet is unjoined from its Hub cluster.
	// +kubebuilder:default:=true
	// +optional
	PurgeKlusterletOperator bool `json:"purgeKlusterletOperator,omitempty"`

	// EnabledAddons is the list of addons that are currently enabled for the cluster.
	// +kubebuilder:default:={}
	// +optional
	EnabledAddons []string `json:"enabledAddons,omitempty"`
}

JoinedSpoke represents a spoke that has been joined to a hub.

func (*JoinedSpoke) AddonDisableType added in v0.0.8

func (j *JoinedSpoke) AddonDisableType() string

AddonDisableType returns a status condition type indicating that a particular Spoke cluster's addons have been disabled.

func (*JoinedSpoke) DeepCopy

func (in *JoinedSpoke) DeepCopy() *JoinedSpoke

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

func (*JoinedSpoke) DeepCopyInto

func (in *JoinedSpoke) DeepCopyInto(out *JoinedSpoke)

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

func (*JoinedSpoke) GetKubeconfig added in v0.0.7

func (j *JoinedSpoke) GetKubeconfig() Kubeconfig

GetKubeconfig returns the kubeconfig for the joined spoke cluster.

func (*JoinedSpoke) GetName added in v0.0.7

func (j *JoinedSpoke) GetName() string

GetName returns the name of the joined spoke cluster.

func (*JoinedSpoke) GetPurgeKlusterletOperator added in v0.0.7

func (j *JoinedSpoke) GetPurgeKlusterletOperator() bool

GetPurgeKlusterletOperator returns the purge klusterlet operator flag for the joined spoke cluster.

func (*JoinedSpoke) UnjoinType

func (j *JoinedSpoke) UnjoinType() string

UnjoinType returns a status condition type indicating that a particular Spoke cluster has been removed from the Hub.

type Klusterlet

type Klusterlet struct {
	// Annotations to apply to the spoke cluster. If not present, the 'agent.open-cluster-management.io/' prefix is added to each key.
	// Each annotation is added to klusterlet.spec.registrationConfiguration.clusterAnnotations on the spoke and subsequently to the ManagedCluster on the hub.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// A set of comma-separated pairs of the form 'key1=value1,key2=value2' that describe feature gates for alpha/experimental features.
	// Options are:
	//  - AddonManagement (ALPHA - default=true)
	//  - AllAlpha (ALPHA - default=false)
	//  - AllBeta (BETA - default=false)
	//  - ClusterClaim (ALPHA - default=true)
	//  - ExecutorValidatingCaches (ALPHA - default=false)
	//  - RawFeedbackJsonString (ALPHA - default=false)
	//  - V1beta1CSRAPICompatibility (ALPHA - default=false)
	// +kubebuilder:default:="AddonManagement=true,ClusterClaim=true"
	// +optional
	FeatureGates string `json:"featureGates,omitempty"`

	// Deployent mode for klusterlet
	// +kubebuilder:validation:Enum=Default;Hosted
	// +kubebuilder:default:="Default"
	// +optional
	Mode string `json:"mode,omitempty"`

	// If set, the klusterlet operator will be purged and all open-cluster-management namespaces deleted
	// when the klusterlet is unjoined from its Hub cluster.
	// +kubebuilder:default:=true
	// +optional
	PurgeOperator bool `json:"purgeOperator,omitempty"`

	// If true, the installed klusterlet agent will start the cluster registration process by looking for the
	// internal endpoint from the public cluster-info in the Hub cluster instead of using hubApiServer.
	// +optional
	ForceInternalEndpointLookup bool `json:"forceInternalEndpointLookup,omitempty"`

	// External managed cluster kubeconfig, required if using hosted mode.
	// +optional
	ManagedClusterKubeconfig Kubeconfig `json:"managedClusterKubeconfig,omitzero"`

	// If true, the klusterlet accesses the managed cluster using the internal endpoint from the public
	// cluster-info in the managed cluster instead of using managedClusterKubeconfig.
	// +optional
	ForceInternalEndpointLookupManaged bool `json:"forceInternalEndpointLookupManaged,omitempty"`

	// Resource specifications for all klusterlet-managed containers.
	// +kubebuilder:default:={}
	// +optional
	Resources ResourceSpec `json:"resources,omitzero"`

	// If true, deploy klusterlet in singleton mode, with registration and work agents running in a single pod.
	// This is an alpha stage flag.
	// +optional
	Singleton bool `json:"singleton,omitempty"`

	// Version and image registry details for the klusterlet.
	// +kubebuilder:default:={}
	// +optional
	Source OCMSource `json:"source,omitzero"`

	// Values for the klusterlet Helm chart.
	// +optional
	Values *KlusterletChartConfig `json:"values,omitempty"`
}

Klusterlet is the configuration for a klusterlet.

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.

type KlusterletChartConfig added in v0.0.9

type KlusterletChartConfig struct {
	chart.KlusterletChartConfig `json:",inline"`
}

KlusterletChartConfig is a wrapper around the external chart.KlusterletChartConfig to provide the required DeepCopy methods for code generation.

func (*KlusterletChartConfig) DeepCopy added in v0.0.9

DeepCopy returns a deep copy of the KlusterletChartConfig.

func (*KlusterletChartConfig) DeepCopyInto added in v0.0.9

func (k *KlusterletChartConfig) DeepCopyInto(out *KlusterletChartConfig)

DeepCopyInto copies all properties of this object into another object of the same type that is provided as a pointer.

func (*KlusterletChartConfig) IsEmpty added in v0.0.9

func (k *KlusterletChartConfig) IsEmpty() bool

IsEmpty checks if the KlusterletChartConfig is empty/default/zero-valued

type Kubeconfig

type Kubeconfig struct {
	// A reference to an existing secret containing a kubeconfig.
	// Must be provided for remote clusters.
	// For same-cluster, must be provided unless InCluster is set to true.
	// +optional
	SecretReference *SecretReference `json:"secretReference,omitempty"`

	// If set, the kubeconfig will be read from the cluster.
	// Only applicable for same-cluster operations.
	// Defaults to false.
	// +optional
	InCluster bool `json:"inCluster,omitempty"`

	// The context to use in the kubeconfig file.
	// +optional
	Context string `json:"context,omitempty"`
}

Kubeconfig is the configuration for a kubeconfig.

func (*Kubeconfig) DeepCopy

func (in *Kubeconfig) DeepCopy() *Kubeconfig

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

func (*Kubeconfig) DeepCopyInto

func (in *Kubeconfig) DeepCopyInto(out *Kubeconfig)

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

type ManagedClusterType

type ManagedClusterType string

ManagedClusterType is the type of a managed cluster.

type OCMSource

type OCMSource struct {
	// The version of predefined compatible image versions (e.g. v0.6.0). Defaults to the latest released version.
	// You can also set "latest" to install the latest development version.
	// +kubebuilder:default:="default"
	// +optional
	BundleVersion string `json:"bundleVersion,omitempty"`

	// The name of the image registry serving OCM images, which will be used for all OCM components."
	// +kubebuilder:default:="quay.io/open-cluster-management"
	// +optional
	Registry string `json:"registry,omitempty"`
}

OCMSource is the configuration for an OCM source.

func (*OCMSource) DeepCopy

func (in *OCMSource) DeepCopy() *OCMSource

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

func (*OCMSource) DeepCopyInto

func (in *OCMSource) DeepCopyInto(out *OCMSource)

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

type RegistrationAuth

type RegistrationAuth struct {
	// The registration authentication driver to use.
	// Options are:
	//  - csr: Use the default CSR-based registration authentication.
	//  - awsirsa: Use AWS IAM Role for Service Accounts (IRSA) registration authentication.
	// The set of valid options is open for extension.
	// +kubebuilder:validation:Enum=csr;awsirsa
	// +kubebuilder:default:="csr"
	// +optional
	Driver string `json:"driver,omitempty"`

	// The Hub cluster ARN for awsirsa registration authentication. Required when Type is awsirsa, otherwise ignored.
	// +optional
	HubClusterARN string `json:"hubClusterARN,omitempty"`

	// List of AWS EKS ARN patterns so any EKS clusters with these patterns will be auto accepted to join with hub cluster.
	// Example pattern: "arn:aws:eks:us-west-2:123456789013:cluster/.*"
	// +optional
	AutoApprovedARNPatterns []string `json:"autoApprovedARNPatterns,omitempty"`
}

RegistrationAuth provides specifications for registration authentication.

func (*RegistrationAuth) DeepCopy

func (in *RegistrationAuth) DeepCopy() *RegistrationAuth

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

func (*RegistrationAuth) DeepCopyInto

func (in *RegistrationAuth) DeepCopyInto(out *RegistrationAuth)

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

type ResourceSpec

type ResourceSpec struct {
	// The resource limits of all the containers managed by the Cluster Manager or Klusterlet operators.
	// +optional
	Limits *ResourceValues `json:"limits,omitempty"`

	// The resource requests of all the containers managed by the Cluster Manager or Klusterlet operators.
	// +optional
	Requests *ResourceValues `json:"requests,omitempty"`

	// The resource QoS class of all the containers managed by the Cluster Manager or Klusterlet operators.
	// One of Default, BestEffort or ResourceRequirement.
	// +kubebuilder:validation:Enum=Default;BestEffort;ResourceRequirement
	// +kubebuilder:default:="Default"
	// +optional
	QosClass string `json:"qosClass,omitempty"`
}

ResourceSpec defines resource limits and requests for all managed clusters.

func (*ResourceSpec) DeepCopy

func (in *ResourceSpec) DeepCopy() *ResourceSpec

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

func (*ResourceSpec) DeepCopyInto

func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)

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

type ResourceValues

type ResourceValues struct {
	// The number of CPU units to request, e.g., '800m'.
	// +optional
	CPU string `json:"cpu,omitempty"`

	// The amount of memory to request, e.g., '8Gi'.
	// +optional
	Memory string `json:"memory,omitempty"`
}

ResourceValues detail container resource constraints.

func (*ResourceValues) DeepCopy

func (in *ResourceValues) DeepCopy() *ResourceValues

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

func (*ResourceValues) DeepCopyInto

func (in *ResourceValues) DeepCopyInto(out *ResourceValues)

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

func (*ResourceValues) String

func (r *ResourceValues) String() string

String returns a string representation of the resource values.

type SecretReference

type SecretReference struct {
	// The name of the secret.
	// +required
	Name string `json:"name"`

	// The namespace the secret is in.
	// +required
	Namespace string `json:"namespace"`

	// The map key to access the kubeconfig. Defaults to 'kubeconfig'.
	// +kubebuilder:default:="kubeconfig"
	// +optional
	KubeconfigKey string `json:"kubeconfigKey,omitempty"`
}

SecretReference describes how to retrieve a kubeconfig stored as a secret

func (*SecretReference) DeepCopy

func (in *SecretReference) DeepCopy() *SecretReference

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

func (*SecretReference) DeepCopyInto

func (in *SecretReference) DeepCopyInto(out *SecretReference)

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

type SingletonControlPlane

type SingletonControlPlane struct {
	// The name of the singleton control plane.
	// +kubebuilder:default:="singleton-controlplane"
	// +optional
	Name string `json:"name,omitempty"`

	// Helm configuration for the multicluster-controlplane Helm chart.
	// For now https://open-cluster-management.io/helm-charts/ocm/multicluster-controlplane is always used - no private registry support.
	// See: https://github.com/open-cluster-management-io/multicluster-controlplane/blob/main/charts/multicluster-controlplane/values.yaml
	// +optional
	Helm *Helm `json:"helm,omitempty"`
}

SingletonControlPlane is the configuration for a singleton control plane

func (*SingletonControlPlane) DeepCopy

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

func (*SingletonControlPlane) DeepCopyInto

func (in *SingletonControlPlane) DeepCopyInto(out *SingletonControlPlane)

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

type Spoke

type Spoke struct {
	// The name of the spoke cluster.
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
	// +required
	Name string `json:"name"`

	// If true, create open-cluster-management namespace and agent namespace (open-cluster-management-agent for Default mode,
	// <klusterlet-name> for Hosted mode), otherwise use existing one.
	// +kubebuilder:default:=true
	// +optional
	CreateNamespace bool `json:"createNamespace,omitempty"`

	// If true, sync the labels from klusterlet to all agent resources.
	// +optional
	SyncLabels bool `json:"syncLabels,omitempty"`

	// Kubeconfig details for the Spoke cluster.
	// +required
	Kubeconfig Kubeconfig `json:"kubeconfig"`

	// Proxy CA certificate, optional
	// +optional
	ProxyCa string `json:"proxyCa,omitempty"`

	// URL of a forward proxy server used by agents to connect to the Hub cluster.
	// +optional
	ProxyURL string `json:"proxyUrl,omitempty"`

	// Klusterlet configuration.
	// +kubebuilder:default:={}
	// +optional
	Klusterlet Klusterlet `json:"klusterlet,omitzero"`

	// ClusterARN is the ARN of the spoke cluster.
	// This field is optionally used for AWS IRSA registration authentication.
	// +optional
	ClusterARN string `json:"clusterARN,omitempty"`

	// AddOns are the add-ons to enable for the spoke cluster.
	// +optional
	AddOns []AddOn `json:"addOns,omitempty"`
}

Spoke provides specifications for joining and potentially upgrading spokes.

func (*Spoke) AddonEnableType added in v0.0.8

func (s *Spoke) AddonEnableType() string

AddonEnableType returns a status condition type indicating that a particular Spoke cluster's addons have been disabled.

func (*Spoke) DeepCopy

func (in *Spoke) DeepCopy() *Spoke

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

func (*Spoke) DeepCopyInto

func (in *Spoke) DeepCopyInto(out *Spoke)

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

func (*Spoke) GetKubeconfig added in v0.0.7

func (s *Spoke) GetKubeconfig() Kubeconfig

GetKubeconfig returns the kubeconfig for the spoke cluster.

func (*Spoke) GetName added in v0.0.7

func (s *Spoke) GetName() string

GetName returns the name of the spoke cluster.

func (*Spoke) GetPurgeKlusterletOperator added in v0.0.7

func (s *Spoke) GetPurgeKlusterletOperator() bool

GetPurgeKlusterletOperator returns the purge klusterlet operator flag.

func (*Spoke) JoinType

func (s *Spoke) JoinType() string

JoinType returns a status condition type indicating that a particular Spoke cluster has joined the Hub.

Jump to

Keyboard shortcuts

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