v1alpha1

package
v0.0.0-...-a5e71b5 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the klusterletconfig v1alpha1 API group +k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +kubebuilder:validation:Optional +groupName=config.open-cluster-management.io

Index

Constants

View Source
const (
	GroupName = "config.open-cluster-management.io"
	Version   = "v1alpha1"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}

	// 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 adds the types in this group-version to the given scheme.
	AddToScheme = schemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type CABundle

type CABundle struct {
	// Name is the identifier used to reference the CA bundle; Do not use "auto-detected" as the name
	// since it is the reserved name for the auto-detected CA bundle.
	// +kubebuilder:validation:Required
	// +required
	Name string `json:"name,omitempty"`

	// CABundle refers to a ConfigMap with label "import.open-cluster-management.io/ca-bundle"
	// containing the user-provided CA bundle
	// The key of the CA data could be "ca-bundle.crt", "ca.crt", or "tls.crt".
	// +kubebuilder:validation:Required
	// +required
	CABundle ConfigMapReference `json:"caBundle,omitempty"`
}

CABundle is a user-provided CA bundle

func (*CABundle) DeepCopy

func (in *CABundle) DeepCopy() *CABundle

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

func (*CABundle) DeepCopyInto

func (in *CABundle) DeepCopyInto(out *CABundle)

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

func (CABundle) SwaggerDoc

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

type ConfigMapReference

type ConfigMapReference struct {
	// name is the metadata.name of the referenced config map
	// +kubebuilder:validation:Required
	// +required
	Name string `json:"name"`

	// name is the metadata.namespace of the referenced config map
	// +kubebuilder:validation:Required
	// +required
	Namespace string `json:"namespace"`
}

func (*ConfigMapReference) DeepCopy

func (in *ConfigMapReference) DeepCopy() *ConfigMapReference

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

func (*ConfigMapReference) DeepCopyInto

func (in *ConfigMapReference) DeepCopyInto(out *ConfigMapReference)

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

func (ConfigMapReference) SwaggerDoc

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

type InstallMode

type InstallMode struct {
	// InstallModeType is the type of install mode.
	// +kubebuilder:default=default
	// +kubebuilder:validation:Enum=default;noOperator
	Type InstallModeType `json:"type,omitempty"`

	// NoOperator is the setting of klusterlet installation when install type is noOperator.
	NoOperator *NoOperator `json:"noOperator,omitempty"`
}

func (*InstallMode) DeepCopy

func (in *InstallMode) DeepCopy() *InstallMode

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

func (*InstallMode) DeepCopyInto

func (in *InstallMode) DeepCopyInto(out *InstallMode)

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

func (InstallMode) SwaggerDoc

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

type InstallModeType

type InstallModeType string
const (
	// InstallModeDefault is the default mode to install klusterlet, the name of the Klusterlet resource
	// is klusterlet and the klusterlet namespace is open-cluster-management-agent.
	InstallModeDefault InstallModeType = "default"
	// InstallModeNoOperator is to install klusterlet without installing klusterlet operator. The name of
	// the klusterlet is by default klusterlet and can be set to klusterlet-{KlusterletNamePostFix}. The
	// install namespace of the klusterlet is open-cluster-management-{KlusterletNamePostFix}
	InstallModeNoOperator InstallModeType = "noOperator"
)

type KlusterletConfig

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

	// Spec defines the desired state of KlusterletConfig
	// +optional
	Spec KlusterletConfigSpec `json:"spec,omitempty"`

	// Status defines the observed state of KlusterletConfig
	// +optional
	Status KlusterletConfigStatus `json:"status,omitempty"`
}

KlusterletConfig contains the configuration of a klusterlet including the upgrade strategy, config overrides, proxy configurations etc.

func (*KlusterletConfig) DeepCopy

func (in *KlusterletConfig) DeepCopy() *KlusterletConfig

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

func (*KlusterletConfig) DeepCopyInto

func (in *KlusterletConfig) DeepCopyInto(out *KlusterletConfig)

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

func (*KlusterletConfig) DeepCopyObject

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

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

func (KlusterletConfig) SwaggerDoc

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

type KlusterletConfigList

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

KlusterletConfigList contains a list of KlusterletConfig.

func (*KlusterletConfigList) DeepCopy

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

func (*KlusterletConfigList) DeepCopyInto

func (in *KlusterletConfigList) DeepCopyInto(out *KlusterletConfigList)

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

func (*KlusterletConfigList) DeepCopyObject

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

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

func (KlusterletConfigList) SwaggerDoc

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

type KlusterletConfigSpec

type KlusterletConfigSpec struct {
	// Registries includes the mirror and source registries. The source registry will be replaced by the Mirror.
	// +optional
	Registries []Registries `json:"registries,omitempty"`

	// PullSecret is the name of image pull secret.
	// +optional
	PullSecret corev1.ObjectReference `json:"pullSecret,omitempty"`

	// NodePlacement enables explicit control over the scheduling of the agent components.
	// If the placement is nil, the placement is not specified, it will be omitted.
	// If the placement is an empty object, the placement will match all nodes and tolerate nothing.
	// +optional
	NodePlacement *operatorv1.NodePlacement `json:"nodePlacement,omitempty"`

	// HubKubeAPIServerConfig specifies the settings required for connecting to the hub Kube API server.
	// If this field is present, the below deprecated fields will be ignored:
	// - HubKubeAPIServerProxyConfig
	// - HubKubeAPIServerURL
	// - HubKubeAPIServerCABundle
	// +optional
	HubKubeAPIServerConfig *KubeAPIServerConfig `json:"hubKubeAPIServerConfig,omitempty"`

	// HubKubeAPIServerProxyConfig holds proxy settings for connections between klusterlet/add-on agents
	// on the managed cluster and the kube-apiserver on the hub cluster.
	// Empty means no proxy settings is available.
	//
	// Deprecated and maintained for backward compatibility, use HubKubeAPIServerConfig.ProxyURL instead
	// +optional
	HubKubeAPIServerProxyConfig KubeAPIServerProxyConfig `json:"hubKubeAPIServerProxyConfig,omitempty"`

	// HubKubeAPIServerURL is the URL of the hub Kube API server.
	// If not present, the .status.apiServerURL of Infrastructure/cluster will be used as the default value.
	// e.g. `oc get infrastructure cluster -o jsonpath='{.status.apiServerURL}'`
	//
	// Deprecated and maintained for backward compatibility, use HubKubeAPIServerConfig.URL instead
	// +optional
	HubKubeAPIServerURL string `json:"hubKubeAPIServerURL,omitempty"`

	// HubKubeAPIServerCABundle is the CA bundle to verify the server certificate of the hub kube API
	// against. If not present, CA bundle will be determined with the logic below:
	// 1). Use the certificate of the named certificate configured in APIServer/cluster if FQDN matches;
	// 2). Otherwise use the CA certificates from kube-root-ca.crt ConfigMap in the cluster namespace;
	//
	// Deprecated and maintained for backward compatibility, use HubKubeAPIServerConfig.ServerVarificationStrategy
	// and HubKubeAPIServerConfig.TrustedCABundles instead
	// +optional
	HubKubeAPIServerCABundle []byte `json:"hubKubeAPIServerCABundle,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. If its value is
	// set to "INFINITE", it means the AppliedManifestWorks will never been evicted from the managed cluster.
	// +optional
	// +kubebuilder:validation:Pattern=`^([0-9]+(s|m|h))+$|^INFINITE$`
	AppliedManifestWorkEvictionGracePeriod string `json:"appliedManifestWorkEvictionGracePeriod,omitempty"`

	// InstallMode is the mode to install the klusterlet
	InstallMode *InstallMode `json:"installMode,omitempty"`

	// BootstrapKubeConfigSecrets is the list of secrets that reflects the
	// Klusterlet.Spec.RegistrationConfiguration.BootstrapKubeConfigs.
	BootstrapKubeConfigs operatorv1.BootstrapKubeConfigs `json:"bootstrapKubeConfigs,omitempty"`
}

KlusterletConfigSpec defines the desired state of KlusterletConfig, usually provided by the user.

func (*KlusterletConfigSpec) DeepCopy

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

func (*KlusterletConfigSpec) DeepCopyInto

func (in *KlusterletConfigSpec) DeepCopyInto(out *KlusterletConfigSpec)

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

func (KlusterletConfigSpec) SwaggerDoc

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

type KlusterletConfigStatus

type KlusterletConfigStatus struct {
}

KlusterletConfigStatus defines the observed state of KlusterletConfig.

func (*KlusterletConfigStatus) DeepCopy

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

func (*KlusterletConfigStatus) DeepCopyInto

func (in *KlusterletConfigStatus) DeepCopyInto(out *KlusterletConfigStatus)

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

func (KlusterletConfigStatus) SwaggerDoc

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

type KubeAPIServerConfig

type KubeAPIServerConfig struct {
	// URL is the endpoint of the hub Kube API server.
	// If not present, the .status.apiServerURL of Infrastructure/cluster will be used as the default value.
	// e.g. `oc get infrastructure cluster -o jsonpath='{.status.apiServerURL}'`
	// +optional
	URL string `json:"url,omitempty"`

	// ServerVerificationStrategy is the strategy used for verifying the server certification;
	// The value could be "UseSystemTruststore", "UseAutoDetectedCABundle", "UseCustomCABundles", empty.
	//
	// When this strategy is not set or value is empty; if there is only one klusterletConfig configured for a cluster,
	// the strategy is eaual to "UseAutoDetectedCABundle", if there are more than one klusterletConfigs, the empty
	// strategy will be overrided by other non-empty strategies.
	//
	// +kubebuilder:validation:Enum=UseSystemTruststore;UseAutoDetectedCABundle;UseCustomCABundles
	// +optional
	ServerVerificationStrategy ServerVerificationStrategy `json:"serverVerificationStrategy,omitempty"`

	// TrustedCABundles refers to a collection of user-provided CA bundles used for verifying the server
	// certificate of the hub Kubernetes API
	// If the ServerVerificationStrategy is set to "UseSystemTruststore", this field will be ignored.
	// Otherwise, the CA certificates from the configured bundles will be appended to the klusterlet CA bundle.
	// +listType:=map
	// +listMapKey:=name
	// +optional
	TrustedCABundles []CABundle `json:"trustedCABundles,omitempty"`

	// ProxyURL is the URL to the proxy to be used for all requests made by client
	// If an HTTPS proxy server is configured, you may also need to add the necessary CA certificates to
	// TrustedCABundles.
	// +optional
	ProxyURL string `json:"proxyURL,omitempty"`
}

KubeAPIServerConfig specifies the custom configuration for the Hub kube API server

func (*KubeAPIServerConfig) DeepCopy

func (in *KubeAPIServerConfig) DeepCopy() *KubeAPIServerConfig

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

func (*KubeAPIServerConfig) DeepCopyInto

func (in *KubeAPIServerConfig) DeepCopyInto(out *KubeAPIServerConfig)

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

func (KubeAPIServerConfig) SwaggerDoc

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

type KubeAPIServerProxyConfig

type KubeAPIServerProxyConfig struct {
	// HTTPProxy is the URL of the proxy for HTTP requests
	// +optional
	HTTPProxy string `json:"httpProxy,omitempty"`

	// HTTPSProxy is the URL of the proxy for HTTPS requests
	// HTTPSProxy will be chosen if both HTTPProxy and HTTPSProxy are set.
	// +optional
	HTTPSProxy string `json:"httpsProxy,omitempty"`

	// CABundle is a CA certificate bundle to verify the proxy server.
	// It will be ignored if only HTTPProxy is set;
	// And it is required when HTTPSProxy is set and self signed CA certificate is used
	// by the proxy server.
	// +optional
	CABundle []byte `json:"caBundle,omitempty"`
}

KubeAPIServerProxyConfig describes the proxy settings for the connections to a kube-apiserver

func (*KubeAPIServerProxyConfig) DeepCopy

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

func (*KubeAPIServerProxyConfig) DeepCopyInto

func (in *KubeAPIServerProxyConfig) DeepCopyInto(out *KubeAPIServerProxyConfig)

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

func (KubeAPIServerProxyConfig) SwaggerDoc

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

type NoOperator

type NoOperator struct {
	// Postfix is the postfix of the klusterlet name. The name of the klusterlet is "klusterlet" if
	// it is not set, and "klusterlet-{Postfix}". The install namespace is "open-cluster-management-agent"
	// if it is not set, and "open-cluster-management-{Postfix}".
	// +kubebuilder:validation:MaxLength=33
	// +kubebuilder:validation:Pattern=^[-a-z0-9]*[a-z0-9]$
	Postfix string `json:"postfix,omitempty"`
}

func (*NoOperator) DeepCopy

func (in *NoOperator) DeepCopy() *NoOperator

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

func (*NoOperator) DeepCopyInto

func (in *NoOperator) DeepCopyInto(out *NoOperator)

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

func (NoOperator) SwaggerDoc

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

type Registries

type Registries struct {
	// Mirror is the mirrored registry of the Source. Will be ignored if Mirror is empty.
	// +kubebuilder:validation:Required
	// +required
	Mirror string `json:"mirror"`

	// Source is the source registry. All image registries will be replaced by Mirror if Source is empty.
	// +optional
	Source string `json:"source"`
}

func (*Registries) DeepCopy

func (in *Registries) DeepCopy() *Registries

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

func (*Registries) DeepCopyInto

func (in *Registries) DeepCopyInto(out *Registries)

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

func (Registries) SwaggerDoc

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

type ServerVerificationStrategy

type ServerVerificationStrategy string

ServerVerificationStrategy represents the strategy used for the server certificate varification

const (
	// ServerVerificationStrategyUseSystemTruststore is the strategy that utilizes CA certificates in the system
	// truststore of the Operating System to validate the server certificate.
	ServerVerificationStrategyUseSystemTruststore ServerVerificationStrategy = "UseSystemTruststore"

	// ServerVerificationStrategyUseAutoDetectedCABundle is the strategy that automatically detects CA certificates
	// for the hub Kube API server and uses them to validate the server certificate.
	ServerVerificationStrategyUseAutoDetectedCABundle ServerVerificationStrategy = "UseAutoDetectedCABundle"

	// ServerVerificationStrategyUseCustomCABundles is the strategy that uses CA certificates from a custom CA bundle
	// to validate the server certificate.
	ServerVerificationStrategyUseCustomCABundles ServerVerificationStrategy = "UseCustomCABundles"
)

Jump to

Keyboard shortcuts

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