v1alpha2

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v1alpha2 implements the v1alpha2 apiVersion of the `kind` Config that introduces multi node support

+k8s:deepcopy-gen=package +k8s:conversion-gen=sigs.k8s.io/kind/pkg/cluster/config +k8s:defaulter-gen=TypeMeta

Index

Constants

View Source
const GroupName = "kind.sigs.k8s.io"

GroupName is the group name used in this package.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}
	// 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_config_Cluster_To_v1alpha2_Config added in v0.2.0

func Convert_config_Cluster_To_v1alpha2_Config(in *config.Cluster, out *Config, s conversion.Scope) error

func Convert_config_Node_To_v1alpha2_Node

func Convert_config_Node_To_v1alpha2_Node(in *config.Node, out *Node, s conversion.Scope) error

func Convert_v1alpha2_Config_To_config_Cluster added in v0.2.0

func Convert_v1alpha2_Config_To_config_Cluster(in *Config, out *config.Cluster, s conversion.Scope) error

func Convert_v1alpha2_Node_To_config_Node

func Convert_v1alpha2_Node_To_config_Node(in *Node, out *config.Node, 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_Config

func SetDefaults_Config(obj *Config)

SetDefaults_Config sets uninitialized fields to their default value.

func SetDefaults_Node

func SetDefaults_Node(obj *Node)

SetDefaults_Node sets uninitialized fields to their default value.

func SetObjectDefaults_Config

func SetObjectDefaults_Config(in *Config)

Types

type Config

type Config struct {
	// TypeMeta representing the type of the object and its API schema version.
	metav1.TypeMeta `json:",inline"`

	// nodes contains the list of nodes defined in the `kind` Config
	// If unset this will default to a single control-plane node
	// Note that if more than one control plane is specified, an external
	// control plane load balancer will be provisioned implicitly
	Nodes []Node `json:"nodes"`
}

Config groups all nodes in the `kind` Config.

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

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

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

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

func (*Config) DeepCopyObject

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

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

type Node

type Node struct {
	// Replicas is the number of desired node replicas.
	// Defaults to 1
	Replicas *int32 `json:"replicas,omitempty"`
	// Role defines the role of the node in the in the Kubernetes cluster managed by `kind`
	// Defaults to "control-plane"
	Role NodeRole `json:"role,omitempty"`
	// Image is the node image to use when running the cluster
	// If unset a default image will be used, see defaults.Image
	Image string `json:"image,omitempty"`
	// KubeadmConfigPatches are applied to the generated kubeadm config as
	// strategic merge patches to `kustomize build` internally
	// https://github.com/kubernetes/community/blob/master/contributors/devel/strategic-merge-patch.md
	// This should be an inline yaml blob-string
	KubeadmConfigPatches []string `json:"kubeadmConfigPatches,omitempty"`
	// KubeadmConfigPatchesJSON6902 are applied to the generated kubeadm config
	// as patchesJson6902 to `kustomize build`
	KubeadmConfigPatchesJSON6902 []kustomize.PatchJSON6902 `json:"kubeadmConfigPatchesJson6902,omitempty"`
	// ExtraMounts describes additional mount points for the node container
	// These may be used to bind a hostpath
	ExtraMounts []cri.Mount `json:"extraMounts,omitempty"`
}

Node contains settings for a node in the `kind` Config. A node in kind config represent a container that will be provisioned with all the components required for the assigned role in the Kubernetes cluster

func (*Node) DeepCopy

func (in *Node) DeepCopy() *Node

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

func (*Node) DeepCopyInto

func (in *Node) DeepCopyInto(out *Node)

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

type NodeRole

type NodeRole string

NodeRole defines possible role for nodes in a Kubernetes cluster managed by `kind`

const (
	// ControlPlaneRole identifies a node that hosts a Kubernetes control-plane.
	// NOTE: in single node clusters, control-plane nodes act also as a worker
	// nodes, in which case the taint will be removed. see:
	// https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#control-plane-node-isolation
	ControlPlaneRole NodeRole = "control-plane"
	// WorkerRole identifies a node that hosts a Kubernetes worker
	WorkerRole NodeRole = "worker"
	// ExternalLoadBalancerRole identifies a node that hosts an external load balancer for API server
	// in HA configurations.
	// WARNING: this node type is not yet implemented!
	// Please note that `kind` nodes hosting external load balancer are not kubernetes nodes
	ExternalLoadBalancerRole NodeRole = "external-load-balancer"
)

Jump to

Keyboard shortcuts

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