v1beta1

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package v1beta1 contains API Schema definitions for the bootstrap v1beta1 API group +kubebuilder:object:generate=true +groupName=bootstrap.cluster.x-k8s.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "bootstrap.cluster.x-k8s.io", Version: "v1beta1"}

	// 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
)

Functions

func DefaultK3sConfigSpec

func DefaultK3sConfigSpec(c *K3sConfigSpec)

DefaultK3sConfigSpec defaults a K3sConfigSpec.

Types

type AgentConfiguration

type AgentConfiguration struct {
	// Node defines the k3s agent node configuration.
	Node AgentNode `json:"node,omitempty"`

	// Runtime defines the k3s agent runtime configuration.
	Runtime AgentRuntime `json:"runtime,omitempty"`

	// Networking defines the k3s agent networking configuration.
	Networking AgentNetworking `json:"networking,omitempty"`

	// KubernetesAgentProcesses defines the k3s agent kubernetes processes configuration.
	KubernetesAgentProcesses KubernetesAgentProcesses `json:"kubernetesAgentProcesses,omitempty"`
}

AgentConfiguration defines the desired state of k3s agent configuration.

func (*AgentConfiguration) DeepCopy

func (in *AgentConfiguration) DeepCopy() *AgentConfiguration

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

func (*AgentConfiguration) DeepCopyInto

func (in *AgentConfiguration) DeepCopyInto(out *AgentConfiguration)

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

type AgentNetworking

type AgentNetworking struct {
	// NodeIP IP address to advertise for node.
	NodeIP string `json:"nodeIP,omitempty"`

	// NodeExternalIP External IP address to advertise for node.
	NodeExternalIP string `json:"nodeExternalIP,omitempty"`

	// ResolvConf Path to Kubelet resolv.conf file.
	ResolvConf string `json:"resolvConf,omitempty"`
}

AgentNetworking defines the desired state of k3s agent networking configuration.

func (*AgentNetworking) DeepCopy

func (in *AgentNetworking) DeepCopy() *AgentNetworking

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

func (*AgentNetworking) DeepCopyInto

func (in *AgentNetworking) DeepCopyInto(out *AgentNetworking)

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

type AgentNode

type AgentNode struct {
	// NodeName k3s node name.
	NodeName string `json:"nodeName,omitempty"`

	// NodeLabels registering and starting kubelet with set of labels.
	NodeLabels []string `json:"nodeLabels,omitempty"`

	// NodeTaints registering and starting kubelet with set of taints.
	NodeTaints []string `json:"nodeTaints,omitempty"`

	// SeLinux Enable SELinux in containerd
	SeLinux bool `json:"seLinux,omitempty"`

	// LBServerPort
	// Local port for supervisor client load-balancer.
	// If the supervisor and apiserver are not colocated an additional port 1 less than this port
	// will also be used for the apiserver client load-balancer. (default: 6444)
	LBServerPort int `json:"lbServerPort,omitempty"`

	// DataDir Folder to hold state.
	DataDir string `json:"dataDir,omitempty"`
}

AgentNode defines the desired state of k3s agent node configuration.

func (*AgentNode) DeepCopy

func (in *AgentNode) DeepCopy() *AgentNode

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

func (*AgentNode) DeepCopyInto

func (in *AgentNode) DeepCopyInto(out *AgentNode)

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

type AgentRuntime

type AgentRuntime struct {
	// ContainerRuntimeEndpoint Disable embedded containerd and use alternative CRI implementation.
	ContainerRuntimeEndpoint string `json:"containerRuntimeEndpoint,omitempty"`

	// PauseImage Customized pause image for containerd or Docker sandbox.
	PauseImage string `json:"pauseImage,omitempty"`

	// PrivateRegistry Path to a private registry configuration file.
	PrivateRegistry string `json:"privateRegistry,omitempty"`
}

AgentRuntime defines the desired state of k3s agent runtime configuration.

func (*AgentRuntime) DeepCopy

func (in *AgentRuntime) DeepCopy() *AgentRuntime

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

func (*AgentRuntime) DeepCopyInto

func (in *AgentRuntime) DeepCopyInto(out *AgentRuntime)

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

type Cluster

type Cluster struct {
	// Token shared secret used to join a server or agent to a cluster.
	Token string `json:"token,omitempty"`

	// TokenFile file containing the cluster-secret/token.
	TokenFile string `json:"tokenFile,omitempty"`

	// Server which server to connect to, used to join a cluster.
	Server string `json:"server,omitempty"`
}

Cluster is the desired state of k3s cluster configuration.

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

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

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

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

type Database

type Database struct {
	// DataStoreEndPoint specify etcd, Mysql, Postgres, or Sqlite (default) data source name.
	DataStoreEndPoint string `json:"dataStoreEndPoint,omitempty"`

	// DataStoreCAFile TLS Certificate Authority file used to secure datastore backend communication.
	DataStoreCAFile string `json:"dataStoreCAFile,omitempty"`

	// DataStoreCertFile TLS certification file used to secure datastore backend communication.
	DataStoreCertFile string `json:"dataStoreCertFile,omitempty"`

	// DataStoreKeyFile TLS key file used to secure datastore backend communication.
	DataStoreKeyFile string `json:"dataStoreKeyFile,omitempty"`

	// ClusterInit initialize a new cluster using embedded Etcd.
	ClusterInit *bool `json:"clusterInit,omitempty"`
}

Database defines the desired state of k3s database configuration.

func (*Database) DeepCopy

func (in *Database) DeepCopy() *Database

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

func (*Database) DeepCopyInto

func (in *Database) DeepCopyInto(out *Database)

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

type K3sConfig

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

	Spec   K3sConfigSpec   `json:"spec,omitempty"`
	Status K3sConfigStatus `json:"status,omitempty"`
}

K3sConfig is the Schema for the k3sConfigs API

func (*K3sConfig) DeepCopy

func (in *K3sConfig) DeepCopy() *K3sConfig

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

func (*K3sConfig) DeepCopyInto

func (in *K3sConfig) DeepCopyInto(out *K3sConfig)

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

func (*K3sConfig) DeepCopyObject

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

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

func (*K3sConfig) Default

func (c *K3sConfig) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*K3sConfig) GetConditions

func (c *K3sConfig) GetConditions() clusterv1.Conditions

GetConditions returns the set of conditions for this object.

func (*K3sConfig) SetConditions

func (c *K3sConfig) SetConditions(conditions clusterv1.Conditions)

SetConditions sets the conditions on this object.

func (*K3sConfig) SetupWebhookWithManager

func (c *K3sConfig) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*K3sConfig) ValidateCreate

func (c *K3sConfig) ValidateCreate() error

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

func (*K3sConfig) ValidateDelete

func (c *K3sConfig) ValidateDelete() error

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

func (*K3sConfig) ValidateUpdate

func (c *K3sConfig) ValidateUpdate(old runtime.Object) error

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

type K3sConfigList

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

K3sConfigList contains a list of K3sConfig

func (*K3sConfigList) DeepCopy

func (in *K3sConfigList) DeepCopy() *K3sConfigList

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

func (*K3sConfigList) DeepCopyInto

func (in *K3sConfigList) DeepCopyInto(out *K3sConfigList)

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

func (*K3sConfigList) DeepCopyObject

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

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

type K3sConfigSpec

type K3sConfigSpec struct {
	// Files specifies extra files to be passed to user_data upon creation.
	// +optional
	Files []bootstrapv1.File `json:"files,omitempty"`

	// Cluster defines the k3s cluster Options.
	Cluster *Cluster `json:"cluster,omitempty"`

	// ServerConfiguration defines the k3s server configuration.
	// +optional
	ServerConfiguration *ServerConfiguration `json:"serverConfiguration,omitempty"`

	// AgentConfiguration defines the k3s agent configuration.
	// +optional
	AgentConfiguration *AgentConfiguration `json:"agentConfiguration,omitempty"`

	// PreK3sCommands specifies extra commands to run before k3s setup runs
	// +optional
	PreK3sCommands []string `json:"preK3sCommands,omitempty"`

	// PostK3sCommands specifies extra commands to run after k3s setup runs
	// +optional
	PostK3sCommands []string `json:"postK3sCommands,omitempty"`

	// Version specifies the k3s version
	// +optional
	Version string `json:"version,omitempty"`
}

K3sConfigSpec defines the desired state of K3sConfig

func (*K3sConfigSpec) DeepCopy

func (in *K3sConfigSpec) DeepCopy() *K3sConfigSpec

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

func (*K3sConfigSpec) DeepCopyInto

func (in *K3sConfigSpec) DeepCopyInto(out *K3sConfigSpec)

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

func (*K3sConfigSpec) Validate

func (c *K3sConfigSpec) Validate(pathPrefix *field.Path) field.ErrorList

Validate ensures the K3sConfigSpec is valid.

type K3sConfigStatus

type K3sConfigStatus struct {
	// Ready indicates the BootstrapData field is ready to be consumed
	Ready bool `json:"ready,omitempty"`

	BootstrapData []byte `json:"bootstrapData,omitempty"`

	// DataSecretName is the name of the secret that stores the bootstrap data script.
	// +optional
	DataSecretName *string `json:"dataSecretName,omitempty"`

	// FailureReason will be set on non-retryable errors
	// +optional
	FailureReason string `json:"failureReason,omitempty"`

	// FailureMessage will be set on non-retryable errors
	// +optional
	FailureMessage string `json:"failureMessage,omitempty"`

	// ObservedGeneration is the latest generation observed by the controller.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Conditions defines current service state of the K3sConfig.
	// +optional
	Conditions clusterv1.Conditions `json:"conditions,omitempty"`
}

K3sConfigStatus defines the observed state of K3sConfig

func (*K3sConfigStatus) DeepCopy

func (in *K3sConfigStatus) DeepCopy() *K3sConfigStatus

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

func (*K3sConfigStatus) DeepCopyInto

func (in *K3sConfigStatus) DeepCopyInto(out *K3sConfigStatus)

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

type K3sConfigTemplate

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

	Spec K3sConfigTemplateSpec `json:"spec,omitempty"`
}

K3sConfigTemplate is the Schema for the k3sconfigtemplates API

func (*K3sConfigTemplate) DeepCopy

func (in *K3sConfigTemplate) DeepCopy() *K3sConfigTemplate

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

func (*K3sConfigTemplate) DeepCopyInto

func (in *K3sConfigTemplate) DeepCopyInto(out *K3sConfigTemplate)

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

func (*K3sConfigTemplate) DeepCopyObject

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

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

func (*K3sConfigTemplate) Default

func (r *K3sConfigTemplate) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*K3sConfigTemplate) SetupWebhookWithManager

func (r *K3sConfigTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*K3sConfigTemplate) ValidateCreate

func (r *K3sConfigTemplate) ValidateCreate() error

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

func (*K3sConfigTemplate) ValidateDelete

func (r *K3sConfigTemplate) ValidateDelete() error

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

func (*K3sConfigTemplate) ValidateUpdate

func (r *K3sConfigTemplate) ValidateUpdate(old runtime.Object) error

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

type K3sConfigTemplateList

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

K3sConfigTemplateList contains a list of K3sConfigTemplate

func (*K3sConfigTemplateList) DeepCopy

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

func (*K3sConfigTemplateList) DeepCopyInto

func (in *K3sConfigTemplateList) DeepCopyInto(out *K3sConfigTemplateList)

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

func (*K3sConfigTemplateList) DeepCopyObject

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

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

type K3sConfigTemplateResource

type K3sConfigTemplateResource struct {
	Spec K3sConfigSpec `json:"spec,omitempty"`
}

K3sConfigTemplateResource defines the Template structure

func (*K3sConfigTemplateResource) DeepCopy

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

func (*K3sConfigTemplateResource) DeepCopyInto

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

type K3sConfigTemplateSpec

type K3sConfigTemplateSpec struct {
	Template K3sConfigTemplateResource `json:"template"`
}

K3sConfigTemplateSpec defines the desired state of K3sConfigTemplate

func (*K3sConfigTemplateSpec) DeepCopy

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

func (*K3sConfigTemplateSpec) DeepCopyInto

func (in *K3sConfigTemplateSpec) DeepCopyInto(out *K3sConfigTemplateSpec)

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

type KubernetesAgentProcesses

type KubernetesAgentProcesses struct {
	// KubeletArgs Customized flag for kubelet process
	// +optional
	KubeletArgs []string `json:"kubeletArgs,omitempty"`

	// KubeProxyArgs Customized flag for kube-proxy process
	// +optional
	KubeProxyArgs []string `json:"kubeProxyArgs,omitempty"`
}

KubernetesAgentProcesses defines the desired state of kubernetes agent processes configuration.

func (*KubernetesAgentProcesses) DeepCopy

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

func (*KubernetesAgentProcesses) DeepCopyInto

func (in *KubernetesAgentProcesses) DeepCopyInto(out *KubernetesAgentProcesses)

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

type KubernetesComponents

type KubernetesComponents struct {
	// Disable do not deploy packaged components and delete any deployed components
	// (valid items: coredns, servicelb, traefik,local-storage, metrics-server).
	Disable string `json:"disable,omitempty"`

	// DisableKubeProxy disable running kube-proxy.
	DisableKubeProxy bool `json:"disableKubeProxy,omitempty"`

	// DisableNetworkPolicy disable k3s default network policy controller.
	DisableNetworkPolicy bool `json:"disableNetworkPolicy,omitempty"`

	// DisableHelmController disable Helm controller.
	DisableHelmController bool `json:"disableHelmController,omitempty"`
}

KubernetesComponents defines the desired state of k3s kubernetes components configuration.

func (*KubernetesComponents) DeepCopy

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

func (*KubernetesComponents) DeepCopyInto

func (in *KubernetesComponents) DeepCopyInto(out *KubernetesComponents)

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

type KubernetesProcesses

type KubernetesProcesses struct {
	// KubeAPIServerArgs is a customized flag for kube-apiserver process
	// +optional
	KubeAPIServerArgs []string `json:"kubeAPIServerArg,omitempty"`

	// KubeControllerManagerArgs is a customized flag for kube-controller-manager process
	// +optional
	KubeControllerManagerArgs []string `json:"kubeControllerManagerArgs,omitempty"`

	// KubeSchedulerArgs is a customized flag for kube-scheduler process
	// +optional
	KubeSchedulerArgs []string `json:"kubeSchedulerArgs,omitempty"`
}

KubernetesProcesses defines the desired state of kubernetes processes configuration.

func (*KubernetesProcesses) DeepCopy

func (in *KubernetesProcesses) DeepCopy() *KubernetesProcesses

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

func (*KubernetesProcesses) DeepCopyInto

func (in *KubernetesProcesses) DeepCopyInto(out *KubernetesProcesses)

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

type Listener

type Listener struct {
	// BindAddress k3s bind address.
	BindAddress string `json:"bindAddress,omitempty"`

	// HTTPSListenPort HTTPS listen port.
	HTTPSListenPort int `json:"httpsListenPort,omitempty"`

	// AdvertiseAddress IP address that apiserver uses to advertise to members of the cluster.
	AdvertiseAddress string `json:"advertiseAddress,omitempty"`

	// AdvertisePort Port that apiserver uses to advertise to members of the cluster (default: listen-port).
	AdvertisePort int `json:"advertisePort,omitempty"`

	// TLSSan Add additional hostname or IP as a Subject Alternative Name in the TLS cert.
	TLSSan string `json:"tlsSan,omitempty"`
}

Listener defines the desired state of k3s listener configuration.

func (*Listener) DeepCopy

func (in *Listener) DeepCopy() *Listener

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

func (*Listener) DeepCopyInto

func (in *Listener) DeepCopyInto(out *Listener)

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

type Networking

type Networking struct {
	// ClusterCIDR Network CIDR to use for pod IPs.
	ClusterCIDR string `json:"clusterCIDR,omitempty"`

	// ServiceCIDR Network CIDR to use for services IPs.
	ServiceCIDR string `json:"serviceCIDR,omitempty"`

	// ServiceNodePortRange Port range to reserve for services with NodePort visibility.
	ServiceNodePortRange string `json:"serviceNodePortRange,omitempty"`

	// ClusterDNS cluster IP for coredns service. Should be in your service-cidr range.
	ClusterDNS string `json:"clusterDNS,omitempty"`

	// ClusterDomain cluster Domain.
	ClusterDomain string `json:"clusterDomain,omitempty"`

	// FlannelBackend One of ‘none’, ‘vxlan’, ‘ipsec’, ‘host-gw’, or ‘wireguard’. (default: vxlan)
	FlannelBackend string `json:"flannelBackend,omitempty"`
}

Networking defines the desired state of k3s networking configuration.

func (*Networking) DeepCopy

func (in *Networking) DeepCopy() *Networking

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

func (*Networking) DeepCopyInto

func (in *Networking) DeepCopyInto(out *Networking)

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

type ServerConfiguration

type ServerConfiguration struct {
	// Database is the database configuration.
	Database Database `json:"database,omitempty"`

	// Listener is the listener configuration.
	Listener Listener `json:"listener,omitempty"`

	// Networking is the networking configuration.
	Networking Networking `json:"networking,omitempty"`

	// KubernetesComponents is the kubernetes components configuration.
	KubernetesComponents KubernetesComponents `json:"kubernetesComponents,omitempty"`

	// KubernetesProcesses is the kubernetes processes configuration.
	KubernetesProcesses KubernetesProcesses `json:"kubernetesProcesses,omitempty"`

	// Agent is the agent configuration.
	Agent AgentConfiguration `json:"agent,omitempty"`
}

ServerConfiguration defines the desired state of k3s server configuration.

func (*ServerConfiguration) DeepCopy

func (in *ServerConfiguration) DeepCopy() *ServerConfiguration

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

func (*ServerConfiguration) DeepCopyInto

func (in *ServerConfiguration) DeepCopyInto(out *ServerConfiguration)

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

Jump to

Keyboard shortcuts

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