v1beta1

package
v1.30.1-0...-8003cbd Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package v1beta1 is the v1beta1 version of the API.

Index

Constants

View Source
const (
	ClusterConfigKind       = "ClusterConfig"
	ClusterConfigAPIVersion = "k0s.k0sproject.io/v1beta1"
)
View Source
const (
	ModeIptables  = "iptables"
	ModeIPVS      = "ipvs"
	ModeUSerspace = "userspace"
)
View Source
const (
	EtcdStorageType = "etcd"
	KineStorageType = "kine"
)

supported storage types

View Source
const (
	ExternalStorage = "external_storage"
	OpenEBSLocal    = "openebs_local_storage"
)
View Source
const GroupName = "k0s.k0sproject.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Deprecated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1beta1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var KubernetesComponents = []string{
	"kube-apiserver",
	"kube-controller-manager",
	"kubelet",
	"kube-scheduler",
	"kube-proxy",
}

KubernetesComponents default components to use feature gates with

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func IsIPv6String

func IsIPv6String(ip string) bool

IsIPv6String returns if ip is IPv6.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type APISpec

type APISpec struct {
	// Address on which to connect to the API server.
	// +optional
	Address string `json:"address,omitempty"`

	// The loadbalancer address (for k0s controllers running behind a loadbalancer)
	// +optional
	ExternalAddress string `json:"externalAddress,omitempty"`

	// Map of key-values (strings) for any extra arguments to pass down to Kubernetes api-server process
	// +optional
	ExtraArgs map[string]string `json:"extraArgs,omitempty"`

	// Custom port for k0s-api server to listen on (default: 9443)
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	// +kubebuilder:default=9443
	// +optional
	K0sAPIPort int `json:"k0sApiPort,omitempty"`

	// Custom port for kube-api server to listen on (default: 6443)
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	// +kubebuilder:default=6443
	// +optional
	Port int `json:"port,omitempty"`

	// List of additional addresses to push to API servers serving the certificate
	// +optional
	SANs []string `json:"sans,omitempty"`
}

APISpec defines the settings for the K0s API

func DefaultAPISpec

func DefaultAPISpec() *APISpec

DefaultAPISpec default settings for api

func (*APISpec) APIAddress

func (a *APISpec) APIAddress() string

APIAddress ...

func (*APISpec) APIAddressURL

func (a *APISpec) APIAddressURL() string

APIAddressURL returns kube-apiserver external URI

func (*APISpec) DeepCopy

func (in *APISpec) DeepCopy() *APISpec

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

func (*APISpec) DeepCopyInto

func (in *APISpec) DeepCopyInto(out *APISpec)

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

func (*APISpec) K0sControlPlaneAPIAddress

func (a *APISpec) K0sControlPlaneAPIAddress() string

K0sControlPlaneAPIAddress returns the controller join APIs address

func (*APISpec) Sans

func (a *APISpec) Sans() []string

Sans return the given SANS plus all local adresses and externalAddress if given

func (*APISpec) UnmarshalJSON

func (a *APISpec) UnmarshalJSON(data []byte) error

Sets in some sane defaults when unmarshaling the data from JSON.

func (*APISpec) Validate

func (a *APISpec) Validate() []error

Validate validates APISpec struct

type CPLBType

type CPLBType string

CPLBType describes which type of load balancer should be deployed for the control plane load balancing. The default is CPLBTypeKeepalived. +kubebuilder:validation:Enum=Keepalived

const (
	// CPLBTypeKeepalived selects Keepalived as the backing load balancer.
	CPLBTypeKeepalived CPLBType = "Keepalived"
)

type CaResponse

type CaResponse struct {
	Key   []byte `json:"key"`
	Cert  []byte `json:"cert"`
	SAKey []byte `json:"saKey"`
	SAPub []byte `json:"saPub"`
}

CaResponse defines the response type for /ca control API

func (*CaResponse) DeepCopy

func (in *CaResponse) DeepCopy() *CaResponse

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

func (*CaResponse) DeepCopyInto

func (in *CaResponse) DeepCopyInto(out *CaResponse)

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

type Calico

type Calico struct {
	// Enable wireguard-based encryption (default: false)
	EnableWireguard bool `json:"wireguard"`

	// Environment variables to configure Calico node (see https://docs.projectcalico.org/reference/node/configuration)
	EnvVars map[string]string `json:"envVars,omitempty"`

	// The host path for Calicos flex-volume-driver(default: /usr/libexec/k0s/kubelet-plugins/volume/exec/nodeagent~uds)
	FlexVolumeDriverPath string `json:"flexVolumeDriverPath"`

	// Host's IP Auto-detection method for Calico (see https://docs.projectcalico.org/reference/node/configuration#ip-autodetection-methods)
	IPAutodetectionMethod string `json:"ipAutodetectionMethod,omitempty"`

	// Host's IPv6 Auto-detection method for Calico
	IPv6AutodetectionMethod string `json:"ipV6AutodetectionMethod,omitempty"`

	// MTU for overlay network (default: 0)
	MTU int `json:"mtu" yaml:"mtu"`

	// vxlan (default) or ipip
	Mode string `json:"mode"`

	// Overlay Type (Always, Never or CrossSubnet)
	Overlay string `json:"overlay" validate:"oneof=Always Never CrossSubnet" `

	// The UDP port for VXLAN (default: 4789)
	VxlanPort int `json:"vxlanPort"`

	// The virtual network ID for VXLAN (default: 4096)
	VxlanVNI int `json:"vxlanVNI"`
}

Calico defines the calico related config options

func DefaultCalico

func DefaultCalico() *Calico

DefaultCalico returns sane defaults for calico

func (*Calico) DeepCopy

func (in *Calico) DeepCopy() *Calico

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

func (*Calico) DeepCopyInto

func (in *Calico) DeepCopyInto(out *Calico)

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

func (*Calico) UnmarshalJSON

func (c *Calico) UnmarshalJSON(data []byte) error

UnmarshalJSON sets in some sane defaults when unmarshaling the data from JSON

type CalicoImageSpec

type CalicoImageSpec struct {
	CNI             ImageSpec `json:"cni"`
	Node            ImageSpec `json:"node"`
	KubeControllers ImageSpec `json:"kubecontrollers"`
}

CalicoImageSpec config group for calico related image settings

func (*CalicoImageSpec) DeepCopy

func (in *CalicoImageSpec) DeepCopy() *CalicoImageSpec

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

func (*CalicoImageSpec) DeepCopyInto

func (in *CalicoImageSpec) DeepCopyInto(out *CalicoImageSpec)

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

type Chart

type Chart struct {
	Name      string `json:"name"`
	ChartName string `json:"chartname"`
	Version   string `json:"version"`
	Values    string `json:"values"`
	TargetNS  string `json:"namespace"`
	// Timeout specifies the timeout for how long to wait for the chart installation to finish.
	// A duration string is a sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
	Timeout metav1.Duration `json:"timeout"`
	Order   int             `json:"order"`
}

Chart single helm addon

func (*Chart) DeepCopy

func (in *Chart) DeepCopy() *Chart

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

func (*Chart) DeepCopyInto

func (in *Chart) DeepCopyInto(out *Chart)

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

func (Chart) ManifestFileName

func (c Chart) ManifestFileName() string

ManifestFileName returns filename to use for the crd manifest

func (Chart) Validate

func (c Chart) Validate() error

Validate performs validation

type ChartsSettings

type ChartsSettings []Chart

ChartsSettings charts settings

func (ChartsSettings) DeepCopy

func (in ChartsSettings) DeepCopy() ChartsSettings

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

func (ChartsSettings) DeepCopyInto

func (in ChartsSettings) DeepCopyInto(out *ChartsSettings)

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

func (ChartsSettings) Validate

func (cs ChartsSettings) Validate() []error

Validate performs validation

type ClusterConfig

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

	Spec   *ClusterSpec         `json:"spec,omitempty"`
	Status *ClusterConfigStatus `json:"status,omitempty"`
}

ClusterConfig is the Schema for the clusterconfigs API

func ConfigFromReader

func ConfigFromReader(r io.Reader, defaultStorage ...*StorageSpec) (*ClusterConfig, error)

ConfigFromReader reads the configuration from any reader (can be stdin, file reader, etc)

func ConfigFromString

func ConfigFromString(yml string, defaultStorage ...*StorageSpec) (*ClusterConfig, error)

func DefaultClusterConfig

func DefaultClusterConfig(defaultStorage ...*StorageSpec) *ClusterConfig

DefaultClusterConfig sets the default ClusterConfig values, when none are given

func (*ClusterConfig) CRValidator

func (c *ClusterConfig) CRValidator() *ClusterConfig

CRValidator is used to make sure a config CR is created with correct values

func (*ClusterConfig) DeepCopy

func (in *ClusterConfig) DeepCopy() *ClusterConfig

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

func (*ClusterConfig) DeepCopyInto

func (in *ClusterConfig) DeepCopyInto(out *ClusterConfig)

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

func (*ClusterConfig) DeepCopyObject

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

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

func (*ClusterConfig) GetClusterWideConfig

func (c *ClusterConfig) GetClusterWideConfig() *ClusterConfig

HACK: the current ClusterConfig struct holds both bootstrapping config & cluster-wide config this hack strips away the node-specific bootstrapping config so that we write a "clean" config to the CR This function accepts a standard ClusterConfig and returns the same config minus the node specific info: - APISpec - StorageSpec - Network.ServiceCIDR - Network.ClusterDomain - Network.ControlPlaneLoadBalancing - Install

func (*ClusterConfig) StripDefaults

func (c *ClusterConfig) StripDefaults() *ClusterConfig

StripDefaults returns a copy of the config where the default values a nilled out

func (*ClusterConfig) UnmarshalJSON

func (c *ClusterConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON sets in some sane defaults when unmarshaling the data from json

func (*ClusterConfig) Validate

func (c *ClusterConfig) Validate() (errs []error)

Validate validates cluster config

type ClusterConfigList

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

+kubebuilder:object:root=true ClusterConfigList contains a list of ClusterConfig

func (*ClusterConfigList) DeepCopy

func (in *ClusterConfigList) DeepCopy() *ClusterConfigList

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

func (*ClusterConfigList) DeepCopyInto

func (in *ClusterConfigList) DeepCopyInto(out *ClusterConfigList)

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

func (*ClusterConfigList) DeepCopyObject

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

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

type ClusterConfigStatus

type ClusterConfigStatus struct {
}

ClusterConfigStatus defines the observed state of ClusterConfig

func (*ClusterConfigStatus) DeepCopy

func (in *ClusterConfigStatus) DeepCopy() *ClusterConfigStatus

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

func (*ClusterConfigStatus) DeepCopyInto

func (in *ClusterConfigStatus) DeepCopyInto(out *ClusterConfigStatus)

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

type ClusterExtensions

type ClusterExtensions struct {
	//+kubebuilder:deprecatedversion:warning="storage is deprecated and will be ignored in 1.30. https://docs.k0sproject.io/stable/examples/openebs".
	Storage *StorageExtension `json:"storage"`
	Helm    *HelmExtensions   `json:"helm"`
}

ClusterExtensions specifies cluster extensions

func DefaultExtensions

func DefaultExtensions() *ClusterExtensions

DefaultExtensions default values

func (*ClusterExtensions) DeepCopy

func (in *ClusterExtensions) DeepCopy() *ClusterExtensions

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

func (*ClusterExtensions) DeepCopyInto

func (in *ClusterExtensions) DeepCopyInto(out *ClusterExtensions)

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

func (*ClusterExtensions) Validate

func (e *ClusterExtensions) Validate() []error

Validate stub for Validateable interface

type ClusterImages

type ClusterImages struct {
	Konnectivity  ImageSpec `json:"konnectivity"`
	PushGateway   ImageSpec `json:"pushgateway"`
	MetricsServer ImageSpec `json:"metricsserver"`
	KubeProxy     ImageSpec `json:"kubeproxy"`
	CoreDNS       ImageSpec `json:"coredns"`
	Pause         ImageSpec `json:"pause"`

	Calico     CalicoImageSpec     `json:"calico"`
	KubeRouter KubeRouterImageSpec `json:"kuberouter"`

	Repository string `json:"repository,omitempty"`

	// +optional
	// +kubebuilder:default=IfNotPresent
	// +kubebuilder:validation:Enum=Always;IfNotPresent;Never
	DefaultPullPolicy string `json:"default_pull_policy,omitempty"`
}

ClusterImages sets docker images for addon components

func DefaultClusterImages

func DefaultClusterImages() *ClusterImages

DefaultClusterImages default image settings

func (*ClusterImages) DeepCopy

func (in *ClusterImages) DeepCopy() *ClusterImages

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

func (*ClusterImages) DeepCopyInto

func (in *ClusterImages) DeepCopyInto(out *ClusterImages)

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

func (*ClusterImages) UnmarshalJSON

func (ci *ClusterImages) UnmarshalJSON(data []byte) error

func (*ClusterImages) Validate

func (ci *ClusterImages) Validate(path *field.Path) (errs field.ErrorList)

type ClusterSpec

type ClusterSpec struct {
	API               *APISpec               `json:"api,omitempty"`
	ControllerManager *ControllerManagerSpec `json:"controllerManager,omitempty"`
	Scheduler         *SchedulerSpec         `json:"scheduler,omitempty"`
	Storage           *StorageSpec           `json:"storage,omitempty"`
	Network           *Network               `json:"network,omitempty"`
	WorkerProfiles    WorkerProfiles         `json:"workerProfiles,omitempty"`
	Telemetry         *ClusterTelemetry      `json:"telemetry,omitempty"`
	Install           *InstallSpec           `json:"installConfig,omitempty"`
	Images            *ClusterImages         `json:"images,omitempty"`
	Extensions        *ClusterExtensions     `json:"extensions,omitempty"`
	Konnectivity      *KonnectivitySpec      `json:"konnectivity,omitempty"`
	FeatureGates      FeatureGates           `json:"featureGates,omitempty"`
}

ClusterSpec defines the desired state of ClusterConfig

func DefaultClusterSpec

func DefaultClusterSpec(defaultStorage ...*StorageSpec) *ClusterSpec

DefaultClusterSpec default settings

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

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

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

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

func (*ClusterSpec) Validate

func (s *ClusterSpec) Validate() (errs []error)

func (*ClusterSpec) ValidateNodeLocalLoadBalancing

func (s *ClusterSpec) ValidateNodeLocalLoadBalancing() (errs field.ErrorList)

type ClusterTelemetry

type ClusterTelemetry struct {
	Enabled bool `json:"enabled"`
}

ClusterTelemetry holds telemetry related settings

func DefaultClusterTelemetry

func DefaultClusterTelemetry() *ClusterTelemetry

DefaultClusterTelemetry default settings

func (*ClusterTelemetry) DeepCopy

func (in *ClusterTelemetry) DeepCopy() *ClusterTelemetry

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

func (*ClusterTelemetry) DeepCopyInto

func (in *ClusterTelemetry) DeepCopyInto(out *ClusterTelemetry)

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

func (*ClusterTelemetry) Validate

func (c *ClusterTelemetry) Validate() []error

Validate stub for Validateable interface

type ControlPlaneLoadBalancingSpec

type ControlPlaneLoadBalancingSpec struct {
	// Indicates if control plane load balancing should be enabled.
	// Default: false
	// +kubebuilder:default=false
	// +optional
	Enabled bool `json:"enabled,omitempty"`

	// type indicates the type of the control plane load balancer to deploy on
	// controller nodes. Currently, the only supported type is "Keepalived".
	// +kubebuilder:default=Keepalived
	// +optional
	Type CPLBType `json:"type,omitempty"`

	// Keepalived contains configuration options related to the "Keepalived" type
	// of load balancing.
	// +optional
	Keepalived *KeepalivedSpec `json:"keepalived,omitempty"`
}

ControlPlaneLoadBalancingSpec defines the configuration options related to k0s's keepalived feature.

func (*ControlPlaneLoadBalancingSpec) DeepCopy

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

func (*ControlPlaneLoadBalancingSpec) DeepCopyInto

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

func (*ControlPlaneLoadBalancingSpec) Validate

func (c *ControlPlaneLoadBalancingSpec) Validate(externalAddress string) (errs []error)

Validate validates the ControlPlaneLoadBalancingSpec

type ControllerManagerSpec

type ControllerManagerSpec struct {
	// Map of key-values (strings) for any extra arguments you want to pass down to the Kubernetes controller manager process
	ExtraArgs map[string]string `json:"extraArgs,omitempty"`
}

ControllerManagerSpec defines the fields for the ControllerManager

func DefaultControllerManagerSpec

func DefaultControllerManagerSpec() *ControllerManagerSpec

func (*ControllerManagerSpec) DeepCopy

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

func (*ControllerManagerSpec) DeepCopyInto

func (in *ControllerManagerSpec) DeepCopyInto(out *ControllerManagerSpec)

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

func (*ControllerManagerSpec) IsZero

func (c *ControllerManagerSpec) IsZero() bool

IsZero needed to omit empty object from yaml output

func (*ControllerManagerSpec) Validate

func (c *ControllerManagerSpec) Validate() []error

type DualStack

type DualStack struct {
	Enabled         bool   `json:"enabled,omitempty"`
	IPv6PodCIDR     string `json:"IPv6podCIDR,omitempty"`
	IPv6ServiceCIDR string `json:"IPv6serviceCIDR,omitempty"`
}

DualStack defines network configuration for ipv4\ipv6 mixed cluster setup

func DefaultDualStack

func DefaultDualStack() DualStack

DefaultDualStack builds default values

func (*DualStack) DeepCopy

func (in *DualStack) DeepCopy() *DualStack

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

func (*DualStack) DeepCopyInto

func (in *DualStack) DeepCopyInto(out *DualStack)

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

type EnvoyProxy

type EnvoyProxy struct {
	// image specifies the OCI image that's being used for the Envoy Pod.
	// +optional
	Image *ImageSpec `json:"image,omitempty"`

	// imagePullPolicy specifies the pull policy being used for the Envoy Pod.
	// Defaults to the default image pull policy.
	// +kubebuilder:validation:Enum=Always;Never;IfNotPresent
	// +optional
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// apiServerBindPort is the port number on which to bind the Envoy load
	// balancer for the Kubernetes API server to on a worker's loopback
	// interface. This must be a valid port number, 0 < x < 65536.
	// Default: 7443
	// +optional
	// +kubebuilder:default=7443
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	APIServerBindPort int32 `json:"apiServerBindPort,omitempty"`

	// konnectivityServerBindPort is the port number on which to bind the Envoy
	// load balancer for the konnectivity server to on a worker's loopback
	// interface. This must be a valid port number, 0 < x < 65536.
	// Default: 7132
	// +optional
	// +kubebuilder:default=7132
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	KonnectivityServerBindPort *int32 `json:"konnectivityServerBindPort,omitempty"`
}

EnvoyProxy describes configuration options required for using Envoy as the backing implementation for node-local load balancing.

func DefaultEnvoyProxy

func DefaultEnvoyProxy() *EnvoyProxy

DefaultEnvoyProxy returns the default envoy proxy configuration.

func (*EnvoyProxy) DeepCopy

func (in *EnvoyProxy) DeepCopy() *EnvoyProxy

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

func (*EnvoyProxy) DeepCopyInto

func (in *EnvoyProxy) DeepCopyInto(out *EnvoyProxy)

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

func (*EnvoyProxy) UnmarshalJSON

func (p *EnvoyProxy) UnmarshalJSON(data []byte) error

func (*EnvoyProxy) Validate

func (p *EnvoyProxy) Validate(path *field.Path) (errs field.ErrorList)

type EtcdConfig

type EtcdConfig struct {
	// ExternalCluster defines external etcd cluster related config options
	ExternalCluster *ExternalCluster `json:"externalCluster"`

	// Node address used for etcd cluster peering
	PeerAddress string `json:"peerAddress"`

	// Map of key-values (strings) for any extra arguments you want to pass down to the etcd process
	ExtraArgs map[string]string `json:"extraArgs,omitempty"`
}

EtcdConfig defines etcd related config options

func DefaultEtcdConfig

func DefaultEtcdConfig() *EtcdConfig

DefaultEtcdConfig creates EtcdConfig with sane defaults

func (*EtcdConfig) DeepCopy

func (in *EtcdConfig) DeepCopy() *EtcdConfig

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

func (*EtcdConfig) DeepCopyInto

func (in *EtcdConfig) DeepCopyInto(out *EtcdConfig)

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

func (*EtcdConfig) GetCaFilePath

func (e *EtcdConfig) GetCaFilePath(certDir string) string

GetCaFilePath returns the host path to a file with CA certificate if external cluster has configured all TLS properties, otherwise it returns the host path to a default CA certificate in a given certDir directory.

func (*EtcdConfig) GetCertFilePath

func (e *EtcdConfig) GetCertFilePath(certDir string) string

GetCertFilePath returns the host path to a file with a client certificate if external cluster has configured all TLS properties, otherwise it returns the host path to a default client certificate in a given certDir directory.

func (*EtcdConfig) GetEndpoints

func (e *EtcdConfig) GetEndpoints() []string

GetEndpointsAsString returns external cluster endpoints if exist or internal etcd address which is https://127.0.0.1:2379

func (*EtcdConfig) GetEndpointsAsString

func (e *EtcdConfig) GetEndpointsAsString() string

GetEndpointsAsString returns comma-separated list of external cluster endpoints if exist or internal etcd address which is https://127.0.0.1:2379

func (*EtcdConfig) GetKeyFilePath

func (e *EtcdConfig) GetKeyFilePath(certDir string) string

GetCaFilePath returns the host path to a file with client private key if external cluster has configured all TLS properties, otherwise it returns the host path to a default client private key in a given certDir directory.

func (*EtcdConfig) GetNodeName

func (e *EtcdConfig) GetNodeName() (string, error)

GetNodeName returns the node name for the etcd peer

func (*EtcdConfig) IsExternalClusterUsed

func (e *EtcdConfig) IsExternalClusterUsed() bool

IsExternalClusterUsed returns true if `spec.storage.etcd.externalCluster` is defined, otherwise returns false.

func (*EtcdConfig) IsTLSEnabled

func (e *EtcdConfig) IsTLSEnabled() bool

IsTLSEnabled returns true if external cluster is not configured or external cluster is configured with all TLS properties: caFile, clientCertFile, clientKeyFile. Otherwise it returns false.

type EtcdRequest

type EtcdRequest struct {
	Node        string `json:"node"`
	PeerAddress string `json:"peerAddress"`
}

EtcdRequest defines the etcd control api request structure

func (*EtcdRequest) DeepCopy

func (in *EtcdRequest) DeepCopy() *EtcdRequest

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

func (*EtcdRequest) DeepCopyInto

func (in *EtcdRequest) DeepCopyInto(out *EtcdRequest)

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

func (*EtcdRequest) Validate

func (e *EtcdRequest) Validate() error

Validate validates the request

type EtcdResponse

type EtcdResponse struct {
	CA             CaResponse `json:"ca"`
	InitialCluster []string   `json:"initialCluster"`
}

EtcdResponse defines the etcd control api response structure

func (*EtcdResponse) DeepCopy

func (in *EtcdResponse) DeepCopy() *EtcdResponse

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

func (*EtcdResponse) DeepCopyInto

func (in *EtcdResponse) DeepCopyInto(out *EtcdResponse)

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

type ExternalCluster

type ExternalCluster struct {
	// Endpoints of external etcd cluster used to connect by k0s
	Endpoints []string `json:"endpoints"`

	// EtcdPrefix is a prefix to prepend to all resource paths in etcd
	EtcdPrefix string `json:"etcdPrefix"`

	// CaFile is the host path to a file with CA certificate
	CaFile string `json:"caFile"`

	// ClientCertFile is the host path to a file with TLS certificate for etcd client
	ClientCertFile string `json:"clientCertFile"`

	// ClientKeyFile is the host path to a file with TLS key for etcd client
	ClientKeyFile string `json:"clientKeyFile"`
}

ExternalCluster defines external etcd cluster related config options

func (*ExternalCluster) DeepCopy

func (in *ExternalCluster) DeepCopy() *ExternalCluster

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

func (*ExternalCluster) DeepCopyInto

func (in *ExternalCluster) DeepCopyInto(out *ExternalCluster)

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

type FeatureGate

type FeatureGate struct {
	// Name of the feature gate
	Name string `json:"name,omitempty"`
	// Enabled or disabled
	Enabled bool `json:"enabled,omitempty"`
	// Components to use feature gate on, if empty `KubernetesComponents` is used as the list
	Components []string `json:"components,omitempty"`
}

FeatureGate specifies single feature gate

func (*FeatureGate) DeepCopy

func (in *FeatureGate) DeepCopy() *FeatureGate

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

func (*FeatureGate) DeepCopyInto

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

func (fg *FeatureGate) EnabledFor(component string) (value bool, found bool)

EnabledFor checks if current feature gate is enabled for a given component

func (*FeatureGate) String

func (fg *FeatureGate) String(component string) string

String represents feature gate as a string

func (*FeatureGate) Validate

func (fg *FeatureGate) Validate() error

Validate given feature gate

type FeatureGates

type FeatureGates []FeatureGate

FeatureGates collection of feature gate specs

func (FeatureGates) AsMap

func (fgs FeatureGates) AsMap(component string) map[string]bool

AsMap returns feature gates as map[string]bool, used in kubelet

func (FeatureGates) AsSliceOfStrings

func (fgs FeatureGates) AsSliceOfStrings(component string) []string

AsSliceOfStrings returns feature gates as slice of strings, used in arguments

func (FeatureGates) BuildArgs

func (fgs FeatureGates) BuildArgs(args stringmap.StringMap, component string) stringmap.StringMap

BuildArgs build cli args using the given args and component name

func (FeatureGates) DeepCopy

func (in FeatureGates) DeepCopy() FeatureGates

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

func (FeatureGates) DeepCopyInto

func (in FeatureGates) DeepCopyInto(out *FeatureGates)

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

func (FeatureGates) Validate

func (fgs FeatureGates) Validate() []error

Validate validates all profiles

type Hairpin

type Hairpin string

+kubebuilder:validation:Enum=Enabled;Allowed;Disabled

const (
	HairpinEnabled  Hairpin = "Enabled"
	HairpinAllowed  Hairpin = "Allowed"
	HairpinDisabled Hairpin = "Disabled"
	// Necessary for backwards compatibility with HairpinMode
	HairpinUndefined Hairpin = ""
)

type HelmExtensions

type HelmExtensions struct {
	ConcurrencyLevel int                  `json:"concurrencyLevel"`
	Repositories     RepositoriesSettings `json:"repositories"`
	Charts           ChartsSettings       `json:"charts"`
}

HelmExtensions specifies settings for cluster helm based extensions

func (*HelmExtensions) DeepCopy

func (in *HelmExtensions) DeepCopy() *HelmExtensions

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

func (*HelmExtensions) DeepCopyInto

func (in *HelmExtensions) DeepCopyInto(out *HelmExtensions)

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

func (HelmExtensions) Validate

func (he HelmExtensions) Validate() []error

Validate performs validation

type ImageSpec

type ImageSpec struct {
	Image   string `json:"image"`
	Version string `json:"version"`
}

ImageSpec container image settings

func DefaultEnvoyProxyImage

func DefaultEnvoyProxyImage() *ImageSpec

DefaultEnvoyProxyImage returns the default image spec to use for Envoy.

func (*ImageSpec) DeepCopy

func (in *ImageSpec) DeepCopy() *ImageSpec

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

func (*ImageSpec) DeepCopyInto

func (in *ImageSpec) DeepCopyInto(out *ImageSpec)

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

func (*ImageSpec) URI

func (s *ImageSpec) URI() string

URI build image uri

func (*ImageSpec) Validate

func (s *ImageSpec) Validate(path *field.Path) (errs field.ErrorList)

type InstallSpec

type InstallSpec struct {
	SystemUsers *SystemUser `json:"users,omitempty"`
}

InstallSpec defines the required fields for the `k0s install` command

func DefaultInstallSpec

func DefaultInstallSpec() *InstallSpec

DefaultInstallSpec ...

func (*InstallSpec) DeepCopy

func (in *InstallSpec) DeepCopy() *InstallSpec

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

func (*InstallSpec) DeepCopyInto

func (in *InstallSpec) DeepCopyInto(out *InstallSpec)

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

func (*InstallSpec) Validate

func (*InstallSpec) Validate() []error

type KeepalivedLBAlgo

type KeepalivedLBAlgo string

KeepalivedLBAlgo describes the load balancing algorithm. +kubebuilder:validation:Enum=rr;wrr;lc;wlc;lblc;dh;sh;sed;nq

const (
	RRAlgo   KeepalivedLBAlgo = "rr"
	WRRAlgo  KeepalivedLBAlgo = "wrr"
	LCAlgo   KeepalivedLBAlgo = "lc"
	WLCAlgo  KeepalivedLBAlgo = "wlc"
	LBLCAlgo KeepalivedLBAlgo = "lblc"
	DHAlgo   KeepalivedLBAlgo = "dh"
	SHAlgo   KeepalivedLBAlgo = "sh"
	SEDAlgo  KeepalivedLBAlgo = "sed"
	NQAlgo   KeepalivedLBAlgo = "nq"
)

type KeepalivedLBKind

type KeepalivedLBKind string

KeepalivedLBKind describes the load balancing forwarding method. +kubebuilder:validation:Enum=NAT;DR;TUN

const (
	NATLBKind KeepalivedLBKind = "NAT"
	DRLBKind  KeepalivedLBKind = "DR"
	TUNLBKind KeepalivedLBKind = "TUN"
)

type KeepalivedSpec

type KeepalivedSpec struct {
	// Configuration options related to the VRRP. This is an array which allows
	// to configure multiple virtual IPs.
	VRRPInstances VRRPInstances `json:"vrrpInstances,omitempty"`
	// Configuration options related to the virtual servers. This is an array
	// which allows to configure multiple load balancers.
	VirtualServers VirtualServers `json:"virtualServers,omitempty"`
}

func (*KeepalivedSpec) DeepCopy

func (in *KeepalivedSpec) DeepCopy() *KeepalivedSpec

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

func (*KeepalivedSpec) DeepCopyInto

func (in *KeepalivedSpec) DeepCopyInto(out *KeepalivedSpec)

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

func (*KeepalivedSpec) Validate

func (k *KeepalivedSpec) Validate(externalAddress string) (errs []error)

Validate validates the KeepalivedSpec

type KineConfig

type KineConfig struct {
	// kine datasource URL
	DataSource string `json:"dataSource"`
}

KineConfig defines the Kine related config options

func DefaultKineConfig

func DefaultKineConfig(dataDir string) *KineConfig

DefaultKineConfig creates KineConfig with sane defaults

func (*KineConfig) DeepCopy

func (in *KineConfig) DeepCopy() *KineConfig

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

func (*KineConfig) DeepCopyInto

func (in *KineConfig) DeepCopyInto(out *KineConfig)

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

type KonnectivitySpec

type KonnectivitySpec struct {
	// admin port to listen on (default 8133)
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	// +kubebuilder:default=8133
	// +optional
	AdminPort int32 `json:"adminPort,omitempty"`

	// agent port to listen on (default 8132)
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	// +kubebuilder:default=8132
	// +optional
	AgentPort int32 `json:"agentPort,omitempty"`
}

KonnectivitySpec defines the requested state for Konnectivity

func DefaultKonnectivitySpec

func DefaultKonnectivitySpec() *KonnectivitySpec

DefaultKonnectivitySpec builds default KonnectivitySpec

func (*KonnectivitySpec) DeepCopy

func (in *KonnectivitySpec) DeepCopy() *KonnectivitySpec

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

func (*KonnectivitySpec) DeepCopyInto

func (in *KonnectivitySpec) DeepCopyInto(out *KonnectivitySpec)

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

func (*KonnectivitySpec) Validate

func (k *KonnectivitySpec) Validate() (errs []error)

Validate implements Validateable.

type KubeProxy

type KubeProxy struct {
	Disabled           bool                            `json:"disabled,omitempty"`
	Mode               string                          `json:"mode,omitempty"`
	MetricsBindAddress string                          `json:"metricsBindAddress,omitempty"`
	IPTables           *KubeProxyIPTablesConfiguration `json:"iptables,omitempty"`
	IPVS               *KubeProxyIPVSConfiguration     `json:"ipvs,omitempty"`
	NodePortAddresses  []string                        `json:"nodePortAddresses,omitempty"`
}

KubeProxy defines the configuration for kube-proxy

func DefaultKubeProxy

func DefaultKubeProxy() *KubeProxy

DefaultKubeProxy creates the default config for kube-proxy

func (*KubeProxy) DeepCopy

func (in *KubeProxy) DeepCopy() *KubeProxy

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

func (*KubeProxy) DeepCopyInto

func (in *KubeProxy) DeepCopyInto(out *KubeProxy)

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

func (*KubeProxy) Validate

func (k *KubeProxy) Validate() []error

Validate validates kube proxy config

type KubeProxyIPTablesConfiguration

type KubeProxyIPTablesConfiguration struct {
	MasqueradeBit      *int32          `json:"masqueradeBit,omitempty"`
	MasqueradeAll      bool            `json:"masqueradeAll,omitempty"`
	LocalhostNodePorts *bool           `json:"localhostNodePorts,omitempty"`
	SyncPeriod         metav1.Duration `json:"syncPeriod,omitempty"`
	MinSyncPeriod      metav1.Duration `json:"minSyncPeriod,omitempty"`
}

KubeProxyIPTablesConfiguration contains iptables-related kube-proxy configuration @see https://github.com/kubernetes/kube-proxy/blob/v0.30.1/config/v1alpha1/types.go#L27-L48

func DefaultKubeProxyIPTables

func DefaultKubeProxyIPTables() *KubeProxyIPTablesConfiguration

func (*KubeProxyIPTablesConfiguration) DeepCopy

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

func (*KubeProxyIPTablesConfiguration) DeepCopyInto

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

type KubeProxyIPVSConfiguration

type KubeProxyIPVSConfiguration struct {
	SyncPeriod    metav1.Duration `json:"syncPeriod,omitempty"`
	MinSyncPeriod metav1.Duration `json:"minSyncPeriod,omitempty"`
	Scheduler     string          `json:"scheduler,omitempty"`
	ExcludeCIDRs  []string        `json:"excludeCIDRs,omitempty"`
	StrictARP     bool            `json:"strictARP,omitempty"`
	TCPTimeout    metav1.Duration `json:"tcpTimeout,omitempty"`
	TCPFinTimeout metav1.Duration `json:"tcpFinTimeout,omitempty"`
	UDPTimeout    metav1.Duration `json:"udpTimeout,omitempty"`
}

KubeProxyIPVSConfiguration contains ipvs-related kube-proxy configuration @see https://github.com/kubernetes/kube-proxy/blob/v0.30.1/config/v1alpha1/types.go#L52-L78

func DefaultKubeProxyIPVS

func DefaultKubeProxyIPVS() *KubeProxyIPVSConfiguration

func (*KubeProxyIPVSConfiguration) DeepCopy

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

func (*KubeProxyIPVSConfiguration) DeepCopyInto

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

type KubeRouter

type KubeRouter struct {
	// Auto-detection of used MTU (default: true)
	AutoMTU bool `json:"autoMTU"`
	// Override MTU setting (autoMTU must be set to false)
	MTU int `json:"mtu"`
	// Kube-router metrics server port. Set to 0 to disable metrics  (default: 8080)
	MetricsPort int `json:"metricsPort"`
	// Admits three values: "Enabled" enables it globally, "Allowed" allows but services must be annotated explicitly and "Disabled"
	// Defaults to "Enabled"
	// +kubebuilder:default=Enabled
	Hairpin Hairpin `json:"hairpin"`
	// DEPRECATED: Use hairpin instead. Activates Hairpin Mode (allow a Pod behind a Service to communicate to its own ClusterIP:Port)
	HairpinMode bool `json:"hairpinMode,omitempty"`
	// IP masquerade for traffic originating from the pod network, and destined outside of it (default: false)
	IPMasq bool `json:"ipMasq"`
	// Comma-separated list of global peer addresses
	// DEPRECATED: Use extraArgs with peerRouterASNs instead
	PeerRouterASNs string `json:"peerRouterASNs"`
	// Comma-separated list of global peer ASNs
	// DEPRECATED: Use extraArgs with peerRouterIPs instead
	PeerRouterIPs string `json:"peerRouterIPs"`
	// ExtraArgs are extra arguments to pass to kube-router
	// Can be also used to override the default k0s managed kube-router arguments
	ExtraArgs map[string]string `json:"extraArgs,omitempty"`
}

KubeRouter defines the kube-router related config options

func DefaultKubeRouter

func DefaultKubeRouter() *KubeRouter

DefaultKubeRouter returns the default config for kube-router

func (*KubeRouter) DeepCopy

func (in *KubeRouter) DeepCopy() *KubeRouter

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

func (*KubeRouter) DeepCopyInto

func (in *KubeRouter) DeepCopyInto(out *KubeRouter)

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

type KubeRouterImageSpec

type KubeRouterImageSpec struct {
	CNI          ImageSpec `json:"cni"`
	CNIInstaller ImageSpec `json:"cniInstaller"`
}

KubeRouterImageSpec config group for kube-router related images

func (*KubeRouterImageSpec) DeepCopy

func (in *KubeRouterImageSpec) DeepCopy() *KubeRouterImageSpec

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

func (*KubeRouterImageSpec) DeepCopyInto

func (in *KubeRouterImageSpec) DeepCopyInto(out *KubeRouterImageSpec)

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

type Network

type Network struct {
	Calico    *Calico   `json:"calico"`
	DualStack DualStack `json:"dualStack,omitempty"`

	KubeProxy  *KubeProxy  `json:"kubeProxy"`
	KubeRouter *KubeRouter `json:"kuberouter"`

	// NodeLocalLoadBalancing defines the configuration options related to k0s's
	// node-local load balancing feature.
	// NOTE: This feature is currently unsupported on ARMv7!
	// +optional
	NodeLocalLoadBalancing *NodeLocalLoadBalancing `json:"nodeLocalLoadBalancing,omitempty"`

	// ControlPlaneLoadBalancing defines the configuration options related to k0s's
	// control plane load balancing feature.
	// +optional
	ControlPlaneLoadBalancing *ControlPlaneLoadBalancingSpec `json:"controlPlaneLoadBalancing,omitempty"`

	// Pod network CIDR to use in the cluster
	PodCIDR string `json:"podCIDR"`
	// Network provider (valid values: calico, kuberouter, or custom)
	Provider string `json:"provider"`
	// Network CIDR to use for cluster VIP services
	ServiceCIDR string `json:"serviceCIDR,omitempty"`
	// Cluster Domain
	ClusterDomain string `json:"clusterDomain,omitempty"`
}

Network defines the network related config options

func DefaultNetwork

func DefaultNetwork() *Network

DefaultNetwork creates the Network config struct with sane default values

func (*Network) BuildPodCIDR

func (n *Network) BuildPodCIDR() string

BuildPodCIDR returns actual argument value for pod cidr

func (*Network) BuildServiceCIDR

func (n *Network) BuildServiceCIDR(addr string) string

BuildServiceCIDR returns actual argument value for service cidr

func (*Network) DNSAddress

func (n *Network) DNSAddress() (string, error)

DNSAddress calculates the 10th address of configured service CIDR block.

func (*Network) DeepCopy

func (in *Network) DeepCopy() *Network

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

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

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

func (*Network) InternalAPIAddresses

func (n *Network) InternalAPIAddresses() ([]string, error)

InternalAPIAddresses calculates the internal API address of configured service CIDR block.

func (*Network) UnmarshalJSON

func (n *Network) UnmarshalJSON(data []byte) error

UnmarshalJSON sets in some sane defaults when unmarshaling the data from json

func (*Network) Validate

func (n *Network) Validate() []error

Validate validates all the settings make sense and should work

type NllbType

type NllbType string

NllbType describes which type of load balancer should be deployed for the node-local load balancing. The default is NllbTypeEnvoyProxy. +kubebuilder:validation:Enum=EnvoyProxy

const (
	// NllbTypeEnvoyProxy selects Envoy as the backing load balancer.
	NllbTypeEnvoyProxy NllbType = "EnvoyProxy"
)

type NodeLocalLoadBalancing

type NodeLocalLoadBalancing struct {
	// enabled indicates if node-local load balancing should be used to access
	// Kubernetes API servers from worker nodes.
	// Default: false
	// +optional
	Enabled bool `json:"enabled,omitempty"`

	// type indicates the type of the node-local load balancer to deploy on
	// worker nodes. Currently, the only supported type is "EnvoyProxy".
	// +kubebuilder:default=EnvoyProxy
	// +optional
	Type NllbType `json:"type,omitempty"`

	// envoyProxy contains configuration options related to the "EnvoyProxy" type
	// of load balancing.
	EnvoyProxy *EnvoyProxy `json:"envoyProxy,omitempty"`
}

NodeLocalLoadBalancing defines the configuration options related to k0s's node-local load balancing feature. NOTE: This feature is currently unsupported on ARMv7!

func DefaultNodeLocalLoadBalancing

func DefaultNodeLocalLoadBalancing() *NodeLocalLoadBalancing

DefaultNodeLocalLoadBalancing returns the default node-local load balancing configuration.

func (*NodeLocalLoadBalancing) DeepCopy

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

func (*NodeLocalLoadBalancing) DeepCopyInto

func (in *NodeLocalLoadBalancing) DeepCopyInto(out *NodeLocalLoadBalancing)

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

func (*NodeLocalLoadBalancing) IsEnabled

func (n *NodeLocalLoadBalancing) IsEnabled() bool

func (*NodeLocalLoadBalancing) UnmarshalJSON

func (n *NodeLocalLoadBalancing) UnmarshalJSON(data []byte) error

func (*NodeLocalLoadBalancing) Validate

func (n *NodeLocalLoadBalancing) Validate(path *field.Path) (errs field.ErrorList)

type RepositoriesSettings

type RepositoriesSettings []Repository

RepositoriesSettings repository settings

func (RepositoriesSettings) DeepCopy

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

func (RepositoriesSettings) DeepCopyInto

func (in RepositoriesSettings) DeepCopyInto(out *RepositoriesSettings)

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

func (RepositoriesSettings) Validate

func (rs RepositoriesSettings) Validate() []error

Validate performs validation

type Repository

type Repository struct {
	Name     string `json:"name"`
	URL      string `json:"url"`
	CAFile   string `json:"caFile"`
	CertFile string `json:"certFile"`
	Insecure bool   `json:"insecure"`
	KeyFile  string `json:"keyfile"`
	Username string `json:"username"`
	Password string `json:"password"`
}

Repository describes single repository entry. Fields map to the CLI flags for the "helm add" command

func (*Repository) DeepCopy

func (in *Repository) DeepCopy() *Repository

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

func (*Repository) DeepCopyInto

func (in *Repository) DeepCopyInto(out *Repository)

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

func (Repository) Validate

func (r Repository) Validate() error

Validate performs validation

type SchedulerSpec

type SchedulerSpec struct {
	// Map of key-values (strings) for any extra arguments you want to pass down to Kubernetes scheduler process
	ExtraArgs map[string]string `json:"extraArgs,omitempty"`
}

SchedulerSpec defines the fields for the Scheduler

func DefaultSchedulerSpec

func DefaultSchedulerSpec() *SchedulerSpec

func (*SchedulerSpec) DeepCopy

func (in *SchedulerSpec) DeepCopy() *SchedulerSpec

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

func (*SchedulerSpec) DeepCopyInto

func (in *SchedulerSpec) DeepCopyInto(out *SchedulerSpec)

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

func (*SchedulerSpec) IsZero

func (s *SchedulerSpec) IsZero() bool

IsZero needed to omit empty object from yaml output

func (*SchedulerSpec) Validate

func (*SchedulerSpec) Validate() []error

type StorageExtension

type StorageExtension struct {
	Type                      string `json:"type"`
	CreateDefaultStorageClass bool   `json:"create_default_storage_class"`
}

StorageExtenstion specifies cluster default storage

func DefaultStorageExtension

func DefaultStorageExtension() *StorageExtension

func (*StorageExtension) DeepCopy

func (in *StorageExtension) DeepCopy() *StorageExtension

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

func (*StorageExtension) DeepCopyInto

func (in *StorageExtension) DeepCopyInto(out *StorageExtension)

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

func (*StorageExtension) Validate

func (se *StorageExtension) Validate() []error

type StorageSpec

type StorageSpec struct {
	Etcd *EtcdConfig `json:"etcd"`
	Kine *KineConfig `json:"kine,omitempty"`

	// Type of the data store (valid values:etcd or kine)
	Type string `json:"type"`
}

StorageSpec defines the storage related config options

func DefaultStorageSpec

func DefaultStorageSpec() *StorageSpec

DefaultStorageSpec creates StorageSpec with sane defaults

func (*StorageSpec) DeepCopy

func (in *StorageSpec) DeepCopy() *StorageSpec

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

func (*StorageSpec) DeepCopyInto

func (in *StorageSpec) DeepCopyInto(out *StorageSpec)

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

func (*StorageSpec) IsJoinable

func (s *StorageSpec) IsJoinable() bool

IsJoinable returns true only if the storage config is such that another controller can join the cluster

func (*StorageSpec) UnmarshalJSON

func (s *StorageSpec) UnmarshalJSON(data []byte) error

UnmarshalJSON sets in some sane defaults when unmarshaling the data from json

func (*StorageSpec) Validate

func (s *StorageSpec) Validate() []error

Validate validates storage specs correctness

type SystemUser

type SystemUser struct {
	Etcd          string `json:"etcdUser,omitempty"`
	Kine          string `json:"kineUser,omitempty"`
	Konnectivity  string `json:"konnectivityUser,omitempty"`
	KubeAPIServer string `json:"kubeAPIserverUser,omitempty"`
	KubeScheduler string `json:"kubeSchedulerUser,omitempty"`
}

SystemUser defines the user to use for each component

func DefaultSystemUsers

func DefaultSystemUsers() *SystemUser

DefaultSystemUsers returns the default system users to be used for the different components

func (*SystemUser) DeepCopy

func (in *SystemUser) DeepCopy() *SystemUser

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

func (*SystemUser) DeepCopyInto

func (in *SystemUser) DeepCopyInto(out *SystemUser)

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

type VRRPInstance

type VRRPInstance struct {
	// VirtualIPs is the list of virtual IP address used by the VRRP instance.
	// Each virtual IP must be a CIDR as defined in RFC 4632 and RFC 4291.
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:Required
	// +listType=set
	VirtualIPs []string `json:"virtualIPs"`

	// Interface specifies the NIC used by the virtual router. If not specified,
	// k0s will use the interface that owns the default route.
	Interface string `json:"interface,omitempty"`

	// VirtualRouterID is the VRRP router ID. If not specified, k0s will
	// automatically number the IDs for each VRRP instance, starting with 51.
	// VirtualRouterID must be in the range of 1-255, all the control plane
	// nodes must use the same VirtualRouterID. Other clusters in the same
	// network must not use the same VirtualRouterID.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=255
	// +optional
	VirtualRouterID int32 `json:"virtualRouterID,omitempty"`

	// AdvertIntervalSeconds is the advertisement interval in seconds. Defaults to 1
	// second.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=1
	// +optional
	AdvertIntervalSeconds int32 `json:"advertIntervalSeconds,omitempty"`

	// AuthPass is the password for accessing VRRPD. This is not a security
	// feature but a way to prevent accidental misconfigurations.
	// AuthPass must be 8 characters or less.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=8
	// +kubebuilder:validation:Required
	AuthPass string `json:"authPass"`
}

VRRPInstance defines the configuration options for a VRRP instance.

func (*VRRPInstance) DeepCopy

func (in *VRRPInstance) DeepCopy() *VRRPInstance

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

func (*VRRPInstance) DeepCopyInto

func (in *VRRPInstance) DeepCopyInto(out *VRRPInstance)

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

type VRRPInstances

type VRRPInstances []VRRPInstance

VRRPInstances is a list of VRRPInstance +kubebuilder:validation:MaxItems=255

func (VRRPInstances) DeepCopy

func (in VRRPInstances) DeepCopy() VRRPInstances

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

func (VRRPInstances) DeepCopyInto

func (in VRRPInstances) DeepCopyInto(out *VRRPInstances)

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

type Validateable

type Validateable interface {
	Validate() []error
}

Validateable interface to ensure that all config components implement Validate function +k8s:deepcopy-gen=false

type VirtualServer

type VirtualServer struct {
	// IPAddress is the virtual IP address used by the virtual server.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	IPAddress string `json:"ipAddress"`
	// DelayLoop is the delay timer for check polling. DelayLoop accepts
	// microsecond precision. Further precision will be truncated without
	// warnings. Defaults to 1m.
	// +kubebuilder:default="1m"
	// +optional
	DelayLoop metav1.Duration `json:"delayLoop,omitempty"`
	// LBAlgo is the load balancing algorithm. If not specified, defaults to rr.
	// Valid values are rr, wrr, lc, wlc, lblc, dh, sh, sed, nq. For further
	// details refer to keepalived documentation.
	// +kubebuilder:default=rr
	// +optional
	LBAlgo KeepalivedLBAlgo `json:"lbAlgo,omitempty"`
	// LBKind is the load balancing kind. If not specified, defaults to DR.
	// Valid values are NAT DR TUN. For further details refer to keepalived documentation.
	// +kubebuilder:default=DR
	// +optional
	LBKind KeepalivedLBKind `json:"lbKind,omitempty"`
	// PersistenceTimeoutSeconds specifies a timeout value for persistent
	// connections in seconds. PersistentTimeoutSeconds must be in the range of
	// 1-2678400 (31 days). If not specified, defaults to 360 (6 minutes).
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=2678400
	// +kubebuilder:default=360
	// +optional
	PersistenceTimeoutSeconds int `json:"persistenceTimeoutSeconds,omitempty"`
}

VirtualServer defines the configuration options for a virtual server.

func (*VirtualServer) DeepCopy

func (in *VirtualServer) DeepCopy() *VirtualServer

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

func (*VirtualServer) DeepCopyInto

func (in *VirtualServer) DeepCopyInto(out *VirtualServer)

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

type VirtualServers

type VirtualServers []VirtualServer

VirtualServers is a list of VirtualServer +listType=map +listMapKey=ipAddress

func (VirtualServers) DeepCopy

func (in VirtualServers) DeepCopy() VirtualServers

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

func (VirtualServers) DeepCopyInto

func (in VirtualServers) DeepCopyInto(out *VirtualServers)

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

type WorkerProfile

type WorkerProfile struct {
	// String; name to use as profile selector for the worker process
	Name string `json:"name"`
	// Worker Mapping object
	// +kubebuilder:validation:type=object
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Optional
	Config *runtime.RawExtension `json:"values"`
}

WorkerProfile worker profile

func (*WorkerProfile) DeepCopy

func (in *WorkerProfile) DeepCopy() *WorkerProfile

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

func (*WorkerProfile) DeepCopyInto

func (in *WorkerProfile) DeepCopyInto(out *WorkerProfile)

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

func (*WorkerProfile) Validate

func (wp *WorkerProfile) Validate() error

Validate validates instance

type WorkerProfiles

type WorkerProfiles []WorkerProfile

WorkerProfiles profiles collection

func (WorkerProfiles) DeepCopy

func (in WorkerProfiles) DeepCopy() WorkerProfiles

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

func (WorkerProfiles) DeepCopyInto

func (in WorkerProfiles) DeepCopyInto(out *WorkerProfiles)

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

func (WorkerProfiles) Validate

func (wps WorkerProfiles) Validate() []error

Validate validates all profiles

Jump to

Keyboard shortcuts

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