v1

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 57

Documentation

Overview

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

Index

Constants

View Source
const (
	// The types of ClusterManager condition status.
	// ConditionClusterManagerApplied is the ClusterManager condition status which means all components have been applied on the hub.
	ConditionClusterManagerApplied = "Applied"
	// ConditionHubRegistrationDegraded is the ClusterManager condition status which means the registration is not ready to serve on the hub.
	ConditionHubRegistrationDegraded = "HubRegistrationDegraded"
	// ConditionHubPlacementDegraded is the ClusterManager condition status which means the placement is not ready to serve on the hub.
	ConditionHubPlacementDegraded = "HubPlacementDegraded"
	// ConditionProgressing is the ClusterManager condition status which means the ClusterManager are in upgrading phase.
	ConditionProgressing = "Progressing"
	// ConditionMigrationSucceeded is the ClusterManager condition status which means the API migration is succeeded on the hub.
	ConditionMigrationSucceeded = "MigrationSucceeded"

	// ReasonClusterManagerApplied is the reason of the ConditionClusterManagerApplied condition to show all resources are applied.
	ReasonClusterManagerApplied = "ClusterManagerApplied"
	// ReasonRuntimeResourceApplyFailed is the reason of the ConditionClusterManagerApplied condition to show it is failed to apply deployments.
	ReasonRuntimeResourceApplyFailed = "RuntimeResourceApplyFailed"
	// ReasonServiceAccountSyncFailed is the reason of the ConditionClusterManagerApplied condition to show it is failed to apply serviceAccounts.
	ReasonServiceAccountSyncFailed = "ServiceAccountSyncFailed"
	// ReasonClusterManagerCRDApplyFailed is the reason of the ConditionClusterManagerApplied condition to show it is failed to apply CRDs.
	ReasonClusterManagerCRDApplyFailed = "CRDApplyFailed"
	// ReasonWebhookApplyFailed is the reason of the ConditionClusterManagerApplied condition to show it is failed to apply webhooks.
	ReasonWebhookApplyFailed = "WebhookApplyFailed"

	// ReasonDeploymentRolling is the reason of the ConditionProgressing condition to show the deployed deployments are rolling.
	ReasonDeploymentRolling = "ClusterManagerDeploymentRolling"
	// ReasonUpToDate is the reason of the ConditionProgressing condition to show the deployed deployments are up-to-date.
	ReasonUpToDate = "ClusterManagerUpToDate"

	// ReasonStorageVersionMigrationFailed is the reason of the ConditionMigrationSucceeded condition to show the API storageVersion migration is failed.
	ReasonStorageVersionMigrationFailed = "StorageVersionMigrationFailed"
	// ReasonStorageVersionMigrationProcessing is the reason of the ConditionMigrationSucceeded condition to show the API storageVersion migration is not completed.
	ReasonStorageVersionMigrationProcessing = "StorageVersionMigrationProcessing"
	// ReasonStorageVersionMigrationSucceed is the reason of the ConditionMigrationSucceeded condition to show the API storageVersion migration is succeeded.
	ReasonStorageVersionMigrationSucceed = "StorageVersionMigrationSucceed"

	// ReasonGetRegistrationDeploymentFailed is the reason of the ConditionRegistrationDegraded condition to show getting registration deployment failed.
	ReasonGetRegistrationDeploymentFailed = "GetRegistrationDeploymentFailed"
	// ReasonUnavailableRegistrationPod is the reason of the ConditionRegistrationDegraded condition to show the registration pods are unavailable.
	ReasonUnavailableRegistrationPod = "UnavailableRegistrationPod"
	// ReasonRegistrationFunctional is the reason of the ConditionRegistrationDegraded condition to show registration is functional.
	ReasonRegistrationFunctional = "RegistrationFunctional"

	// ReasonGetPlacementDeploymentFailed is the reason of the ConditionPlacementDegraded condition to show it is failed get placement deployment.
	ReasonGetPlacementDeploymentFailed = "GetPlacementDeploymentFailed"
	// ReasonUnavailablePlacementPod is the reason of the ConditionPlacementDegraded condition to show  the registration pods are unavailable.
	ReasonUnavailablePlacementPod = "UnavailablePlacementPod"
	// ReasonPlacementFunctional is the reason of the ConditionPlacementDegraded condition to show placement is functional.
	ReasonPlacementFunctional = "PlacementFunctional"
)
View Source
const (
	// The types of klusterlet condition status.
	// ConditionKlusterletApplied is the klusterlet condition status which means all components have been applied on the managed cluster.
	ConditionKlusterletApplied = "Applied"
	// ConditionReadyToApply is a klusterlet condition status which means it is ready to apply the resources on the managed cluster.
	ConditionReadyToApply = "ReadyToApply"
	// ConditionKlusterletAvailable is the klusterlet condition status which means all components are available and ready to serve.
	ConditionKlusterletAvailable = "Available"
	// ConditionHubConnectionDegraded is the klusterlet condition status which means the agent on the managed cluster cannot access the hub cluster.
	ConditionHubConnectionDegraded = "HubConnectionDegraded"
	// ConditionRegistrationDesiredDegraded is the klusterlet condition status which means the registration agent on the managed cluster is not ready to serve.
	ConditionRegistrationDesiredDegraded = "RegistrationDesiredDegraded"
	// ConditionWorkDesiredDegraded is the klusterlet condition status which means the work agent on the managed cluster is not ready to serve.
	ConditionWorkDesiredDegraded = "WorkDesiredDegraded"

	// ReasonKlusterletApplied is the reason of ConditionKlusterletApplied condition to show resources are applied.
	ReasonKlusterletApplied = "KlusterletApplied"
	// ReasonKlusterletApplyFailed is the reason of ConditionKlusterletApplied condition to show it is failed to apply resources.
	ReasonKlusterletApplyFailed = "KlusterletApplyFailed"
	// ReasonKlusterletCRDApplyFailed is the reason of ConditionKlusterletApplied condition to show it is failed to apply CRDs.
	ReasonKlusterletCRDApplyFailed = "CRDApplyFailed"
	// ReasonManagedClusterResourceApplyFailed is the reason of ConditionKlusterletApplied condition to show it is failed to apply resources on managed cluster.
	ReasonManagedClusterResourceApplyFailed = "ManagedClusterResourceApplyFailed"
	// ReasonManagementClusterResourceApplyFailed is the reason of ConditionKlusterletApplied condition to show it is failed to apply resources on management cluster.
	ReasonManagementClusterResourceApplyFailed = "ManagementClusterResourceApplyFailed"

	// ReasonKlusterletPrepareFailed is the reason of ConditionReadyToApply condition to show it is failed to get the kubeConfig
	// of managed cluster from the external-managed-kubeconfig secret in the hosted mode.
	ReasonKlusterletPrepareFailed = "KlusterletPrepareFailed"
	// ReasonKlusterletPrepared is the reason of ConditionReadyToApply condition to show the kubeConfig of managed cluster is
	// validated from the external-managed-kubeconfig secret in the hosted mode.
	ReasonKlusterletPrepared = "KlusterletPrepared"

	// ReasonKlusterletGetDeploymentFailed is the reason of ConditionKlusterletAvailable/ConditionRegistrationDesiredDegraded/ConditionWorkDesiredDegraded
	// condition to show it is failed to get deployments.
	ReasonKlusterletGetDeploymentFailed = "GetDeploymentFailed"
	// ReasonKlusterletUnavailablePods is the reason of ConditionKlusterletAvailable/ConditionRegistrationDesiredDegraded/ConditionWorkDesiredDegraded
	// condition to show there is unavailable pod.
	ReasonKlusterletUnavailablePods = "UnavailablePods"
	// ReasonKlusterletDeploymentsFunctional is the reason of ConditionKlusterletAvailable/ConditionRegistrationDesiredDegraded/ConditionWorkDesiredDegraded
	// condition to show all deployments are functional.
	ReasonKlusterletDeploymentsFunctional = "DeploymentsFunctional"
	// ReasonKlusterletNoAvailablePods is the reason of ConditionKlusterletAvailable/ConditionRegistrationDesiredDegraded/ConditionWorkDesiredDegraded
	// condition to show there is no available pod.
	ReasonKlusterletNoAvailablePods = "NoAvailablePods"

	// ReasonKlusterletAvailable is the reason of ConditionKlusterletAvailable condition to show all deployed resources are available.
	ReasonKlusterletAvailable = "KlusterletAvailable"

	// ReasonHubConnectionFunctional is the reason of ConditionHubConnectionDegraded condition to show spoke cluster connects hub cluster.
	ReasonHubConnectionFunctional = "HubConnectionFunctional"
	// ReasonHubKubeConfigSecretMissing is the reason of ConditionHubConnectionDegraded condition to show hubKubeConfigSecret is missing.
	ReasonHubKubeConfigSecretMissing = "HubKubeConfigSecretMissing"
	// ReasonHubKubeConfigMissing is the reason of ConditionHubConnectionDegraded condition to show hubKubeConfig in hubKubeConfigSecret is missing.
	ReasonHubKubeConfigMissing = "HubKubeConfigMissing"
	// ReasonHubKubeConfigError is the reason of ConditionHubConnectionDegraded condition to show it is failed to get hubKubeConfig.
	ReasonHubKubeConfigError = "HubKubeConfigError"
	// ReasonClusterNameMissing is the reason of ConditionHubConnectionDegraded condition to show the cluster-name is missing in the hubKubeConfigSecret.
	ReasonClusterNameMissing = "ClusterNameMissing"
	// ReasonHubKubeConfigUnauthorized is the reason of ConditionHubConnectionDegraded condition to show there is no permission to access hub using the hubKubeConfigSecret.
	ReasonHubKubeConfigUnauthorized = "HubKubeConfigUnauthorized"
)
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 AwsIrsa added in v0.15.0

type AwsIrsa struct {
	// The arn of the hub cluster (ie: an EKS cluster). This will be required to pass information to hub, which hub will use to create IAM identities for this klusterlet.
	// Example - arn:eks:us-west-2:12345678910:cluster/hub-cluster1.
	// +required
	// +kubebuilder:validation:MinLength=1
	HubClusterArn string `json:"hubClusterArn"`
	// The arn of the managed cluster (ie: an EKS cluster). This will be required to generate the md5hash which will be used as a suffix to create IAM role on hub
	// as well as used by kluslerlet-agent, to assume role suffixed with the md5hash, on startup.
	// Example - arn:eks:us-west-2:12345678910:cluster/managed-cluster1.
	// +required
	// +kubebuilder:validation:MinLength=1
	ManagedClusterArn string `json:"managedClusterArn"`
}

func (*AwsIrsa) DeepCopy added in v0.15.0

func (in *AwsIrsa) DeepCopy() *AwsIrsa

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

func (*AwsIrsa) DeepCopyInto added in v0.15.0

func (in *AwsIrsa) DeepCopyInto(out *AwsIrsa)

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

func (AwsIrsa) SwaggerDoc added in v0.15.0

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

type BootstrapKubeConfigs added in v0.14.0

type BootstrapKubeConfigs struct {
	// Type specifies the type of priority bootstrap kubeconfigs.
	// By default, it is set to None, representing no priority bootstrap kubeconfigs are set.
	// +required
	// +kubebuilder:default:=None
	// +kubebuilder:validation:Enum=None;LocalSecrets
	Type TypeBootstrapKubeConfigs `json:"type,omitempty"`

	// LocalSecretsConfig include a list of secrets that contains the kubeconfigs for ordered bootstrap kubeconifigs.
	// The secrets must be in the same namespace where the agent controller runs.
	// +optional
	LocalSecrets LocalSecretsConfig `json:"localSecretsConfig,omitempty"`
}

func (*BootstrapKubeConfigs) DeepCopy added in v0.14.0

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

func (*BootstrapKubeConfigs) DeepCopyInto added in v0.14.0

func (in *BootstrapKubeConfigs) DeepCopyInto(out *BootstrapKubeConfigs)

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

func (BootstrapKubeConfigs) SwaggerDoc added in v0.14.0

func (BootstrapKubeConfigs) 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
	// +kubebuilder:default={workDriver: kube}
	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=57
	// +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 KubeConfigSecret added in v0.14.0

type KubeConfigSecret struct {
	// Name is the name of the secret.
	// +required
	Name string `json:"name"`
}

func (*KubeConfigSecret) DeepCopy added in v0.14.0

func (in *KubeConfigSecret) DeepCopy() *KubeConfigSecret

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

func (*KubeConfigSecret) DeepCopyInto added in v0.14.0

func (in *KubeConfigSecret) DeepCopyInto(out *KubeConfigSecret)

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

func (KubeConfigSecret) SwaggerDoc added in v0.14.0

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

type LocalSecretsConfig added in v0.14.0

type LocalSecretsConfig struct {
	// KubeConfigSecrets is a list of secret names. The secrets are in the same namespace where the agent controller runs.
	// +required
	// +kubebuilder:validation:minItems=2
	KubeConfigSecrets []KubeConfigSecret `json:"kubeConfigSecrets"`

	// HubConnectionTimeoutSeconds is used to set the timeout of connecting to the hub cluster.
	// When agent loses the connection to the hub over the timeout seconds, the agent do a rebootstrap.
	// By default is 10 mins.
	// +optional
	// +kubebuilder:default:=600
	// +kubebuilder:validation:Minimum=180
	HubConnectionTimeoutSeconds int32 `json:"hubConnectionTimeoutSeconds,omitempty"`
}

func (*LocalSecretsConfig) DeepCopy added in v0.14.0

func (in *LocalSecretsConfig) DeepCopy() *LocalSecretsConfig

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

func (*LocalSecretsConfig) DeepCopyInto added in v0.14.0

func (in *LocalSecretsConfig) DeepCopyInto(out *LocalSecretsConfig)

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

func (LocalSecretsConfig) SwaggerDoc added in v0.14.0

func (LocalSecretsConfig) 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"`

	// BootstrapKubeConfigs defines the ordered list of bootstrap kubeconfigs. The order decides which bootstrap kubeconfig to use first when rebootstrap.
	//
	// When the agent loses the connection to the current hub over HubConnectionTimeoutSeconds, or the managedcluster CR
	// is set `hubAcceptsClient=false` on the hub, the controller marks the related bootstrap kubeconfig as "failed".
	//
	// A failed bootstrapkubeconfig won't be used for the duration specified by SkipFailedBootstrapKubeConfigSeconds.
	// But if the user updates the content of a failed bootstrapkubeconfig, the "failed" mark will be cleared.
	// +optional
	BootstrapKubeConfigs BootstrapKubeConfigs `json:"bootstrapKubeConfigs,omitempty"`

	// This provides driver details required to register with hub
	// +optional
	RegistrationDriver RegistrationDriver `json:"registrationDriver,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 RegistrationDriver added in v0.15.0

type RegistrationDriver struct {
	// Type of the authentication used by managedcluster to register as well as pull work from hub. Possible values are csr and awsirsa.
	// +required
	// +kubebuilder:default:=csr
	// +kubebuilder:validation:Enum=csr;awsirsa
	AuthType string `json:"authType,omitempty"`

	// Contain the details required for registering with hub cluster (ie: an EKS cluster) using AWS IAM roles for service account.
	// This is required only when the authType is awsirsa.
	AwsIrsa *AwsIrsa `json:"awsIrsa,omitempty"`
}

func (*RegistrationDriver) DeepCopy added in v0.15.0

func (in *RegistrationDriver) DeepCopy() *RegistrationDriver

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

func (*RegistrationDriver) DeepCopyInto added in v0.15.0

func (in *RegistrationDriver) DeepCopyInto(out *RegistrationDriver)

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

func (RegistrationDriver) SwaggerDoc added in v0.15.0

func (RegistrationDriver) 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 TypeBootstrapKubeConfigs added in v0.14.0

type TypeBootstrapKubeConfigs string
const (
	LocalSecrets TypeBootstrapKubeConfigs = "LocalSecrets"
	None         TypeBootstrapKubeConfigs = "None"
)

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"`

	// AppliedManifestWorkEvictionGracePeriod is the eviction grace period the work agent will wait before
	// evicting the AppliedManifestWorks, whose corresponding ManifestWorks are missing on the hub cluster, from
	// the managed cluster. If not present, the default value of the work agent will be used.
	// +optional
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(s|m|h))+$"
	AppliedManifestWorkEvictionGracePeriod *metav1.Duration `json:"appliedManifestWorkEvictionGracePeriod,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"`

	// WorkDriver represents the type of work driver. Possible values are "kube", "mqtt", or "grpc".
	// If not provided, the default value is "kube".
	// If set to non-"kube" drivers, the klusterlet need to use the same driver.
	// and the driver configuration must be provided in a secret named "work-driver-config"
	// in the namespace where the cluster manager is running, adhering to the following structure:
	// config.yaml: |
	//   <driver-config-in-yaml>
	//
	// For detailed driver configuration, please refer to the sdk-go documentation: https://github.com/open-cluster-management-io/sdk-go/blob/main/pkg/cloudevents/README.md#supported-protocols-and-drivers
	//
	// +optional
	// +kubebuilder:default:=kube
	// +kubebuilder:validation:Enum=kube;mqtt;grpc
	WorkDriver WorkDriverType `json:"workDriver,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

type WorkDriverType added in v0.14.0

type WorkDriverType string

WorkDriverType represents the type of work driver.

const (
	// WorkDriverTypeKube is the work driver type for kube.
	WorkDriverTypeKube WorkDriverType = "kube"
	// WorkDriverTypeMqtt is the work driver type for mqtt.
	WorkDriverTypeMqtt WorkDriverType = "mqtt"
	// WorkDriverTypeGrpc is the work driver type for grpc.
	WorkDriverTypeGrpc WorkDriverType = "grpc"
)

Jump to

Keyboard shortcuts

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