v1beta1

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 5 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

View Source
const (
	// DataSecretAvailableCondition documents the status of the bootstrap secret generation process.
	//
	// NOTE: When the DataSecret generation starts the process completes immediately and within the
	// same reconciliation, so the user will always see a transition from Wait to Generated without having
	// evidence that BootstrapSecret generation is started/in progress.
	DataSecretAvailableCondition clusterv1.ConditionType = "DataSecretAvailable"

	// WaitingForClusterInfrastructureReason (Severity=Info) document a bootstrap secret generation process
	// waiting for the cluster infrastructure to be ready.
	//
	// NOTE: Having the cluster infrastructure ready is a pre-condition for starting to create machines;
	// the KThreesConfig controller ensure this pre-condition is satisfied.
	WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure"

	// WaitingForControlPlaneAvailableReason (Severity=Info) document a bootstrap secret generation process
	// waiting for the control plane machine to be available.
	//
	// NOTE: Having the control plane machine available is a pre-condition for joining additional control planes
	// or workers nodes.
	// DEPRECATED: This has been deprecated in v1beta1 and will be removed in a future version.
	// Switch to WaitingForControlPlaneAvailableReason constant from the `sigs.k8s.io/cluster-api/api/v1beta1`
	// package.
	WaitingForControlPlaneAvailableReason = clusterv1.WaitingForControlPlaneAvailableReason

	// DataSecretGenerationFailedReason (Severity=Warning) documents a KThreesConfig controller detecting
	// an error while generating a data secret; those kind of errors are usually due to misconfigurations
	// and user intervention is required to get them fixed.
	DataSecretGenerationFailedReason = "DataSecretGenerationFailed"
)
View Source
const (
	// CertificatesAvailableCondition documents that cluster certificates are available.
	//
	// NOTE: Cluster certificates are generated only for the KThreesConfig object linked to the initial control plane
	// machine, if the cluster is not using a control plane ref object, if the certificates are not provided
	// by the users.
	// IMPORTANT: This condition won't be re-created after clusterctl move.
	CertificatesAvailableCondition clusterv1.ConditionType = "CertificatesAvailable"

	// CertificatesGenerationFailedReason (Severity=Warning) documents a KThreesConfig controller detecting
	// an error while generating certificates; those kind of errors are usually temporary and the controller
	// automatically recover from them.
	CertificatesGenerationFailedReason = "CertificatesGenerationFailed"

	// CertificatesCorruptedReason (Severity=Error) documents a KThreesConfig controller detecting
	// an error while while retrieving certificates for a joining node.
	CertificatesCorruptedReason = "CertificatesCorrupted"
)

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

This section is empty.

Types

type Encoding

type Encoding string

Encoding specifies the cloud-init file encoding. +kubebuilder:validation:Enum=base64;gzip;gzip+base64

const (
	// Base64 implies the contents of the file are encoded as base64.
	Base64 Encoding = "base64"
	// Gzip implies the contents of the file are encoded with gzip.
	Gzip Encoding = "gzip"
	// GzipBase64 implies the contents of the file are first base64 encoded and then gzip encoded.
	GzipBase64 Encoding = "gzip+base64"
)

type File

type File struct {
	// Path specifies the full path on disk where to store the file.
	Path string `json:"path"`

	// Owner specifies the ownership of the file, e.g. "root:root".
	// +optional
	Owner string `json:"owner,omitempty"`

	// Permissions specifies the permissions to assign to the file, e.g. "0640".
	// +optional
	Permissions string `json:"permissions,omitempty"`

	// Encoding specifies the encoding of the file contents.
	// +optional
	Encoding Encoding `json:"encoding,omitempty"`

	// Content is the actual content of the file.
	// +optional
	Content string `json:"content,omitempty"`

	// ContentFrom is a referenced source of content to populate the file.
	// +optional
	ContentFrom *FileSource `json:"contentFrom,omitempty"`
}

File defines the input for generating write_files in cloud-init.

func (*File) DeepCopy

func (in *File) DeepCopy() *File

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

func (*File) DeepCopyInto

func (in *File) DeepCopyInto(out *File)

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

type FileSource

type FileSource struct {
	// Secret represents a secret that should populate this file.
	Secret SecretFileSource `json:"secret"`
}

FileSource is a union of all possible external source types for file data. Only one field may be populated in any given instance. Developers adding new sources of data for target systems should add them here.

func (*FileSource) DeepCopy

func (in *FileSource) DeepCopy() *FileSource

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

func (*FileSource) DeepCopyInto

func (in *FileSource) DeepCopyInto(out *FileSource)

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

type KThreesAgentConfig

type KThreesAgentConfig struct {
	// NodeLabels  Registering and starting kubelet with set of labels
	// +optional
	NodeLabels []string `json:"nodeLabels,omitempty"`

	// NodeTaints Registering kubelet with set of taints
	// +optional
	NodeTaints []string `json:"nodeTaints,omitempty"`

	// TODO: take in a object or secret and write to file. this is not useful
	// PrivateRegistry  registry configuration file (default: "/etc/rancher/k3s/registries.yaml")
	// +optional
	PrivateRegistry string `json:"privateRegistry,omitempty"`

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

	// NodeName Name of the Node
	// +optional
	NodeName string `json:"nodeName,omitempty"`
}

func (*KThreesAgentConfig) DeepCopy

func (in *KThreesAgentConfig) DeepCopy() *KThreesAgentConfig

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

func (*KThreesAgentConfig) DeepCopyInto

func (in *KThreesAgentConfig) DeepCopyInto(out *KThreesAgentConfig)

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

type KThreesConfig

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

	Spec   KThreesConfigSpec   `json:"spec,omitempty"`
	Status KThreesConfigStatus `json:"status,omitempty"`
}

KThreesConfig is the Schema for the kthreesconfigs API

func (*KThreesConfig) DeepCopy

func (in *KThreesConfig) DeepCopy() *KThreesConfig

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

func (*KThreesConfig) DeepCopyInto

func (in *KThreesConfig) DeepCopyInto(out *KThreesConfig)

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

func (*KThreesConfig) DeepCopyObject

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

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

func (*KThreesConfig) GetConditions

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

func (*KThreesConfig) SetConditions

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

type KThreesConfigList

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

KThreesConfigList contains a list of KThreesConfig

func (*KThreesConfigList) DeepCopy

func (in *KThreesConfigList) DeepCopy() *KThreesConfigList

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

func (*KThreesConfigList) DeepCopyInto

func (in *KThreesConfigList) DeepCopyInto(out *KThreesConfigList)

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

func (*KThreesConfigList) DeepCopyObject

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

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

type KThreesConfigSpec

type KThreesConfigSpec struct {
	// Files specifies extra files to be passed to user_data upon creation.
	// +optional
	Files []File `json:"files,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"`

	// AgentConfig specifies configuration for the agent nodes
	// +optional
	AgentConfig KThreesAgentConfig `json:"agentConfig,omitempty"`

	// ServerConfig specifies configuration for the agent nodes
	// +optional
	ServerConfig KThreesServerConfig `json:"serverConfig,omitempty"`

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

KThreesConfigSpec defines the desired state of KThreesConfig

func (*KThreesConfigSpec) DeepCopy

func (in *KThreesConfigSpec) DeepCopy() *KThreesConfigSpec

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

func (*KThreesConfigSpec) DeepCopyInto

func (in *KThreesConfigSpec) DeepCopyInto(out *KThreesConfigSpec)

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

type KThreesConfigStatus

type KThreesConfigStatus 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 KThreesConfig.
	// +optional
	Conditions clusterv1.Conditions `json:"conditions,omitempty"`
}

KThreesConfigStatus defines the observed state of KThreesConfig

func (*KThreesConfigStatus) DeepCopy

func (in *KThreesConfigStatus) DeepCopy() *KThreesConfigStatus

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

func (*KThreesConfigStatus) DeepCopyInto

func (in *KThreesConfigStatus) DeepCopyInto(out *KThreesConfigStatus)

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

type KThreesConfigTemplate

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

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

KThreesConfigTemplate is the Schema for the kthreesconfigtemplates API

func (*KThreesConfigTemplate) DeepCopy

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

func (*KThreesConfigTemplate) DeepCopyInto

func (in *KThreesConfigTemplate) DeepCopyInto(out *KThreesConfigTemplate)

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

func (*KThreesConfigTemplate) DeepCopyObject

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

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

type KThreesConfigTemplateList

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

KThreesConfigTemplateList contains a list of KThreesConfigTemplate

func (*KThreesConfigTemplateList) DeepCopy

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

func (*KThreesConfigTemplateList) DeepCopyInto

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

func (*KThreesConfigTemplateList) DeepCopyObject

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

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

type KThreesConfigTemplateResource

type KThreesConfigTemplateResource struct {
	Spec KThreesConfigSpec `json:"spec,omitempty"`
}

KThreesConfigTemplateResource defines the Template structure

func (*KThreesConfigTemplateResource) DeepCopy

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

func (*KThreesConfigTemplateResource) DeepCopyInto

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

type KThreesConfigTemplateSpec

type KThreesConfigTemplateSpec struct {
	Template KThreesConfigTemplateResource `json:"template"`
}

KThreesConfigTemplateSpec defines the desired state of KThreesConfigTemplate

func (*KThreesConfigTemplateSpec) DeepCopy

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

func (*KThreesConfigTemplateSpec) DeepCopyInto

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

type KThreesServerConfig

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

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

	// BindAddress k3s bind address (default: 0.0.0.0)
	// +optional
	BindAddress string `json:"bindAddress,omitempty"`

	// HttpsListenPort HTTPS listen port (default: 6443)
	// +optional
	HttpsListenPort string `json:"httpsListenPort,omitempty"`

	// AdvertiseAddress IP address that apiserver uses to advertise to members of the cluster (default: node-external-ip/node-ip)
	// +optional
	AdvertiseAddress string `json:"advertiseAddress,omitempty"`

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

	// ClusterCidr  Network CIDR to use for pod IPs (default: "10.42.0.0/16")
	// +optional
	ClusterCidr string `json:"clusterCidr,omitempty"`

	// ServiceCidr Network CIDR to use for services IPs (default: "10.43.0.0/16")
	// +optional
	ServiceCidr string `json:"serviceCidr,omitempty"`

	// ClusterDNS  Cluster IP for coredns service. Should be in your service-cidr range (default: 10.43.0.10)
	// +optional
	ClusterDNS string `json:"clusterDNS,omitempty"`

	// ClusterDomain Cluster Domain (default: "cluster.local")
	// +optional
	ClusterDomain string `json:"clusterDomain,omitempty"`

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

func (*KThreesServerConfig) DeepCopy

func (in *KThreesServerConfig) DeepCopy() *KThreesServerConfig

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

func (*KThreesServerConfig) DeepCopyInto

func (in *KThreesServerConfig) DeepCopyInto(out *KThreesServerConfig)

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

type SecretFileSource

type SecretFileSource struct {
	// Name of the secret in the KThreesBootstrapConfig's namespace to use.
	Name string `json:"name"`

	// Key is the key in the secret's data map for this value.
	Key string `json:"key"`
}

Adapts a Secret into a FileSource.

The contents of the target Secret's Data field will be presented as files using the keys in the Data field as the file names.

func (*SecretFileSource) DeepCopy

func (in *SecretFileSource) DeepCopy() *SecretFileSource

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

func (*SecretFileSource) DeepCopyInto

func (in *SecretFileSource) DeepCopyInto(out *SecretFileSource)

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