Documentation

Index

Constants

View Source
const (
	DefaultIPTablesMasqueradeBit = 14
	DefaultIPTablesDropBit       = 15
)
View Source
const GroupName = "crit.criticalstack.com"

GroupName is the group name used in this package.

Variables

View Source
var (
	// DefaultEvictionHard includes default options for hard eviction.
	DefaultEvictionHard = map[string]string{
		"memory.available":  "100Mi",
		"nodefs.available":  "10%",
		"nodefs.inodesFree": "5%",
		"imagefs.available": "15%",
	}

	// Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information.
	DefaultNodeAllocatableEnforcement = []string{"pods"}
)
View Source
var (
	// SchemeGroupVersion is group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
	// SchemeBuilder is a type to collect functions that add data to an API
	// object through a scheme.
	SchemeBuilder runtime.SchemeBuilder

	// AddToScheme applies all the stored functions in the localSchemeBuilder
	// to the scheme.
	AddToScheme = localSchemeBuilder.AddToScheme
)

Functions

func Convert_v1alpha1_ControlPlaneConfiguration_To_v1alpha2_ControlPlaneConfiguration

func Convert_v1alpha1_ControlPlaneConfiguration_To_v1alpha2_ControlPlaneConfiguration(in *ControlPlaneConfiguration, out *v1alpha2.ControlPlaneConfiguration, s conversion.Scope) error

func Convert_v1alpha1_CritBootstrapServerConfiguration_To_v1alpha2_CritBootstrapServerConfiguration

func Convert_v1alpha1_CritBootstrapServerConfiguration_To_v1alpha2_CritBootstrapServerConfiguration(in *CritBootstrapServerConfiguration, out *v1alpha2.CritBootstrapServerConfiguration, s conversion.Scope) error

func Convert_v1alpha1_EtcdConfiguration_To_v1alpha2_EtcdConfiguration

func Convert_v1alpha1_EtcdConfiguration_To_v1alpha2_EtcdConfiguration(in *EtcdConfiguration, out *v1alpha2.EtcdConfiguration, s conversion.Scope) error

Convert_v1alpha1_EtcdConfiguration_To_v1alpha2_EtcdConfiguration is an autogenerated conversion function.

func Convert_v1alpha1_KubeAPIServerConfiguration_To_v1alpha2_KubeAPIServerConfiguration

func Convert_v1alpha1_KubeAPIServerConfiguration_To_v1alpha2_KubeAPIServerConfiguration(in *KubeAPIServerConfiguration, out *v1alpha2.KubeAPIServerConfiguration, s conversion.Scope) error

Convert_v1alpha1_KubeAPIServerConfiguration_To_v1alpha2_KubeAPIServerConfiguration is an autogenerated conversion function.

func Convert_v1alpha1_KubeControllerManagerConfiguration_To_v1alpha2_KubeControllerManagerConfiguration

func Convert_v1alpha1_KubeControllerManagerConfiguration_To_v1alpha2_KubeControllerManagerConfiguration(in *KubeControllerManagerConfiguration, out *v1alpha2.KubeControllerManagerConfiguration, s conversion.Scope) error

Convert_v1alpha1_KubeControllerManagerConfiguration_To_v1alpha2_KubeControllerManagerConfiguration is an autogenerated conversion function.

func Convert_v1alpha1_KubeSchedulerConfiguration_To_v1alpha2_KubeSchedulerConfiguration

func Convert_v1alpha1_KubeSchedulerConfiguration_To_v1alpha2_KubeSchedulerConfiguration(in *KubeSchedulerConfiguration, out *v1alpha2.KubeSchedulerConfiguration, s conversion.Scope) error

Convert_v1alpha1_KubeSchedulerConfiguration_To_v1alpha2_KubeSchedulerConfiguration is an autogenerated conversion function.

func Convert_v1alpha1_NodeConfiguration_To_v1alpha2_NodeConfiguration

func Convert_v1alpha1_NodeConfiguration_To_v1alpha2_NodeConfiguration(in *NodeConfiguration, out *v1alpha2.NodeConfiguration, s conversion.Scope) error

func Convert_v1alpha1_WorkerConfiguration_To_v1alpha2_WorkerConfiguration

func Convert_v1alpha1_WorkerConfiguration_To_v1alpha2_WorkerConfiguration(in *WorkerConfiguration, out *v1alpha2.WorkerConfiguration, s conversion.Scope) error

func Convert_v1alpha2_ControlPlaneConfiguration_To_v1alpha1_ControlPlaneConfiguration

func Convert_v1alpha2_ControlPlaneConfiguration_To_v1alpha1_ControlPlaneConfiguration(in *v1alpha2.ControlPlaneConfiguration, out *ControlPlaneConfiguration, s conversion.Scope) error

func Convert_v1alpha2_CritBootstrapServerConfiguration_To_v1alpha1_CritBootstrapServerConfiguration

func Convert_v1alpha2_CritBootstrapServerConfiguration_To_v1alpha1_CritBootstrapServerConfiguration(in *v1alpha2.CritBootstrapServerConfiguration, out *CritBootstrapServerConfiguration, s conversion.Scope) error

func Convert_v1alpha2_EtcdConfiguration_To_v1alpha1_EtcdConfiguration

func Convert_v1alpha2_EtcdConfiguration_To_v1alpha1_EtcdConfiguration(in *v1alpha2.EtcdConfiguration, out *EtcdConfiguration, s conversion.Scope) error

Convert_v1alpha2_EtcdConfiguration_To_v1alpha1_EtcdConfiguration is an autogenerated conversion function.

func Convert_v1alpha2_KubeAPIServerConfiguration_To_v1alpha1_KubeAPIServerConfiguration

func Convert_v1alpha2_KubeAPIServerConfiguration_To_v1alpha1_KubeAPIServerConfiguration(in *v1alpha2.KubeAPIServerConfiguration, out *KubeAPIServerConfiguration, s conversion.Scope) error

func Convert_v1alpha2_KubeControllerManagerConfiguration_To_v1alpha1_KubeControllerManagerConfiguration

func Convert_v1alpha2_KubeControllerManagerConfiguration_To_v1alpha1_KubeControllerManagerConfiguration(in *v1alpha2.KubeControllerManagerConfiguration, out *KubeControllerManagerConfiguration, s conversion.Scope) error

Convert_v1alpha2_KubeControllerManagerConfiguration_To_v1alpha1_KubeControllerManagerConfiguration is an autogenerated conversion function.

func Convert_v1alpha2_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration

func Convert_v1alpha2_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in *v1alpha2.KubeSchedulerConfiguration, out *KubeSchedulerConfiguration, s conversion.Scope) error

Convert_v1alpha2_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration is an autogenerated conversion function.

func Convert_v1alpha2_NodeConfiguration_To_v1alpha1_NodeConfiguration

func Convert_v1alpha2_NodeConfiguration_To_v1alpha1_NodeConfiguration(in *v1alpha2.NodeConfiguration, out *NodeConfiguration, s conversion.Scope) error

Convert_v1alpha2_NodeConfiguration_To_v1alpha1_NodeConfiguration is an autogenerated conversion function.

func Convert_v1alpha2_WorkerConfiguration_To_v1alpha1_WorkerConfiguration

func Convert_v1alpha2_WorkerConfiguration_To_v1alpha1_WorkerConfiguration(in *v1alpha2.WorkerConfiguration, out *WorkerConfiguration, s conversion.Scope) error

func RegisterConversions

func RegisterConversions(s *runtime.Scheme) error

RegisterConversions adds conversion functions to the given scheme. Public to allow building arbitrary schemes.

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func SetDefaults_ControlPlaneConfiguration

func SetDefaults_ControlPlaneConfiguration(obj *ControlPlaneConfiguration)

func SetDefaults_KubeletConfiguration

func SetDefaults_KubeletConfiguration(obj *kubeletconfigv1beta1.KubeletConfiguration)

func SetDefaults_NodeConfiguration

func SetDefaults_NodeConfiguration(obj *NodeConfiguration)

func SetDefaults_WorkerConfiguration

func SetDefaults_WorkerConfiguration(obj *WorkerConfiguration)

func SetObjectDefaults_ControlPlaneConfiguration

func SetObjectDefaults_ControlPlaneConfiguration(in *ControlPlaneConfiguration)

func SetObjectDefaults_WorkerConfiguration

func SetObjectDefaults_WorkerConfiguration(in *WorkerConfiguration)

Types

type APIEndpoint

type APIEndpoint struct {
	// The hostname on which the API server is serving.
	Host string `json:"host"`

	// The port on which the API server is serving.
	Port int `json:"port"`
}

APIEndpoint represents a reachable Kubernetes API endpoint.

func (*APIEndpoint) DeepCopy

func (in *APIEndpoint) DeepCopy() *APIEndpoint

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

func (*APIEndpoint) DeepCopyInto

func (in *APIEndpoint) DeepCopyInto(out *APIEndpoint)

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

func (APIEndpoint) IsZero

func (v APIEndpoint) IsZero() bool

IsZero returns true if host and the port are zero values.

func (APIEndpoint) String

func (v APIEndpoint) String() string

String returns a formatted version HOST:PORT of this APIEndpoint.

type ContainerRuntime

type ContainerRuntime string
const (
	Containerd ContainerRuntime = "containerd"
	Docker     ContainerRuntime = "docker"
	CRIO       ContainerRuntime = "crio"
)

func (ContainerRuntime) CRISocket

func (cr ContainerRuntime) CRISocket() string

type ControlPlaneConfiguration

type ControlPlaneConfiguration struct {
	metav1.TypeMeta `json:",inline"`
	// ClusterName
	// Default: "crit"
	// +optional
	ClusterName string `json:"clusterName,omitempty"`
	// ControlPlaneEndpoint is the IP address or DNS name that represents the
	// control plane.
	// +optional
	ControlPlaneEndpoint string `json:"controlPlaneEndpoint,omitempty"`

	// APIServerURL is the kube-apiserver URL.
	// +optional
	APIServerURL   string `json:"apiServerURL,omitempty"`
	CoreDNSVersion string `json:"coreDNSVersion,omitempty"`
	Verbosity      int    `json:"verbosity,omitempty"`

	CritBootstrapServerConfiguration   CritBootstrapServerConfiguration   `json:"critBootstrapServer,omitempty"`
	EtcdConfiguration                  EtcdConfiguration                  `json:"etcd,omitempty"`
	KubeAPIServerConfiguration         KubeAPIServerConfiguration         `json:"kubeAPIServer,omitempty"`
	KubeControllerManagerConfiguration KubeControllerManagerConfiguration `json:"kubeControllerManager,omitempty"`
	KubeSchedulerConfiguration         KubeSchedulerConfiguration         `json:"kubeScheduler,omitempty"`
	NodeConfiguration                  NodeConfiguration                  `json:"node,omitempty"`
}

func (*ControlPlaneConfiguration) DeepCopy

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

func (*ControlPlaneConfiguration) DeepCopyInto

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

func (*ControlPlaneConfiguration) DeepCopyObject

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

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

type CritBootstrapServerConfiguration

type CritBootstrapServerConfiguration struct {
	// TODO(chrism): maybe add option to disable
	ImageRegistry string            `json:"imageRegistry,omitempty"`
	Version       string            `json:"version,omitempty"`
	BindPort      int               `json:"bindPort,omitempty"`
	CloudProvider string            `json:"cloudProvider,omitempty"`
	ExtraArgs     map[string]string `json:"extraArgs,omitempty"`
}

func (*CritBootstrapServerConfiguration) DeepCopy

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

func (*CritBootstrapServerConfiguration) DeepCopyInto

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

type EtcdConfiguration

type EtcdConfiguration struct {
	Endpoints []string `json:"endpoints,omitempty"`
	CAFile    string   `json:"caFile,omitempty"`
	CertFile  string   `json:"certFile,omitempty"`
	KeyFile   string   `json:"keyFile,omitempty"`

	// CAKey is the etcd CA private key. It is only used to encrypt e2db
	// tables, so any file containing data to be used as a secret can be
	// provided here to enable e2db table encryption for shared cluster files.
	CAKey string `json:"caKey,omitempty"`
}

func (*EtcdConfiguration) ClientAddr

func (ec *EtcdConfiguration) ClientAddr() string

func (*EtcdConfiguration) DeepCopy

func (in *EtcdConfiguration) DeepCopy() *EtcdConfiguration

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

func (*EtcdConfiguration) DeepCopyInto

func (in *EtcdConfiguration) DeepCopyInto(out *EtcdConfiguration)

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

type HostPathMount

type HostPathMount struct {
	// Name of the volume inside the pod template.
	Name string `json:"name,omitempty"`
	// HostPath is the path in the host that will be mounted inside
	// the pod.
	HostPath string `json:"hostPath,omitempty"`
	// MountPath is the path inside the pod where hostPath will be mounted.
	MountPath string `json:"mountPath,omitempty"`
	// ReadOnly controls write access to the volume
	ReadOnly bool `json:"readOnly,omitempty"`

	HostPathType corev1.HostPathType `json:"hostPathType,omitempty"`
}

HostPathMount contains elements describing volumes that are mounted from the host.

func (*HostPathMount) DeepCopy

func (in *HostPathMount) DeepCopy() *HostPathMount

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

func (*HostPathMount) DeepCopyInto

func (in *HostPathMount) DeepCopyInto(out *HostPathMount)

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

type KubeAPIServerConfiguration

type KubeAPIServerConfiguration struct {
	BindPort     int               `json:"bindPort,omitempty"`
	ExtraArgs    map[string]string `json:"extraArgs,omitempty"`
	ExtraVolumes []HostPathMount   `json:"extraVolumes,omitempty"`
	FeatureGates map[string]bool   `json:"featureGates,omitempty"`
	ExtraSANs    []string          `json:"extraSans,omitempty"`
}

func (*KubeAPIServerConfiguration) DeepCopy

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

func (*KubeAPIServerConfiguration) DeepCopyInto

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

type KubeControllerManagerConfiguration

type KubeControllerManagerConfiguration struct {
	ExtraArgs    map[string]string `json:"extraArgs,omitempty"`
	ExtraVolumes []HostPathMount   `json:"extraVolumes,omitempty"`
	FeatureGates map[string]bool   `json:"featureGates,omitempty"`
}

func (*KubeControllerManagerConfiguration) DeepCopy

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

func (*KubeControllerManagerConfiguration) DeepCopyInto

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

type KubeSchedulerConfiguration

type KubeSchedulerConfiguration struct {
	ExtraArgs    map[string]string `json:"extraArgs,omitempty"`
	ExtraVolumes []HostPathMount   `json:"extraVolumes,omitempty"`
	FeatureGates map[string]bool   `json:"featureGates,omitempty"`
}

func (*KubeSchedulerConfiguration) DeepCopy

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

func (*KubeSchedulerConfiguration) DeepCopyInto

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

type NodeConfiguration

type NodeConfiguration struct {
	KubernetesVersion    string                                     `json:"kubernetesVersion,omitempty"`
	Hostname             string                                     `json:"hostname,omitempty"`
	KubeDir              string                                     `json:"kubeDir,omitempty"`
	HostIPv4             string                                     `json:"hostIPv4,omitempty"`
	KubeProxyMode        string                                     `json:"kubeProxyMode,omitempty"`
	DNSDomain            string                                     `json:"dnsDomain,omitempty"`
	PodSubnet            string                                     `json:"podSubnet,omitempty"`
	ServiceSubnet        string                                     `json:"serviceSubnet,omitempty"`
	CloudProvider        string                                     `json:"cloudProvider,omitempty"`
	ContainerRuntime     ContainerRuntime                           `json:"containerRuntime,omitempty"`
	Taints               []corev1.Taint                             `json:"taints,omitempty"`
	KubeletConfiguration *kubeletconfigv1beta1.KubeletConfiguration `json:"kubelet,omitempty"`
	KubeletExtraArgs     map[string]string                          `json:"kubeletExtraArgs,omitempty"`
}

func (*NodeConfiguration) DeepCopy

func (in *NodeConfiguration) DeepCopy() *NodeConfiguration

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

func (*NodeConfiguration) DeepCopyInto

func (in *NodeConfiguration) DeepCopyInto(out *NodeConfiguration)

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

type WorkerConfiguration

type WorkerConfiguration struct {
	metav1.TypeMeta `json:",inline"`

	ClusterName          string            `json:"clusterName,omitempty"`
	ControlPlaneEndpoint string            `json:"controlPlaneEndpoint,omitempty"`
	APIServerURL         string            `json:"apiServerURL,omitempty"`
	BootstrapServerURL   string            `json:"bootstrapServerURL,omitempty"`
	BootstrapToken       string            `json:"bootstrapToken,omitempty"`
	CACert               string            `json:"caCert,omitempty"`
	NodeConfiguration    NodeConfiguration `json:"node,omitempty"`
}

func (*WorkerConfiguration) DeepCopy

func (in *WorkerConfiguration) DeepCopy() *WorkerConfiguration

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

func (*WorkerConfiguration) DeepCopyInto

func (in *WorkerConfiguration) DeepCopyInto(out *WorkerConfiguration)

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

func (*WorkerConfiguration) DeepCopyObject

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

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