kubeadm

package
v0.3.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigurationToYAML

func ConfigurationToYAML(obj runtime.Object) (string, error)

ConfigurationToYAML converts a kubeadm configuration type to its YAML representation.

func GetCodecs

func GetCodecs() serializer.CodecFactory

GetCodecs returns a type that can be used to deserialize most kubeadm configuration types.

func NewBootstrapTokenDiscovery added in v0.3.0

func NewBootstrapTokenDiscovery(opts ...BootstrapTokenDiscoveryOption) *kubeadmv1beta1.BootstrapTokenDiscovery

NewBootstrapTokenDiscovery will create a new kubeadm bootstrap token discovery and run options against it.

func SetClusterConfigurationOptions added in v0.3.0

func SetClusterConfigurationOptions(base *kubeadmv1beta1.ClusterConfiguration, opts ...ClusterConfigurationOption)

SetClusterConfigurationOptions will run all options on the passed in ClusterConfiguration. Use this to customize an existing ClusterConfiguration.

func SetInitConfigurationOptions added in v0.3.0

func SetInitConfigurationOptions(base *kubeadmv1beta1.InitConfiguration, opts ...InitConfigurationOption)

SetInitConfigurationOptions will run all the options provided against some existing InitConfiguration. Use this to customize an existing InitConfiguration.

func SetJoinConfigurationOptions added in v0.3.0

func SetJoinConfigurationOptions(base *kubeadmv1beta1.JoinConfiguration, opts ...JoinConfigurationOption)

SetJoinConfigurationOptions runs a set of options against a JoinConfiguration. Use this to customize an existing JoinConfiguration.

func SetNodeRegistrationOptions added in v0.3.1

SetNodeRegistrationOptions will take a kubeadmNodeRegistrationOptions and apply customizations.

Types

type BootstrapTokenDiscoveryOption added in v0.3.0

type BootstrapTokenDiscoveryOption func(*kubeadmv1beta1.BootstrapTokenDiscovery)

BootstrapTokenDiscoveryOption will modify a kubeadm BootstrapTokenDiscovery.

func WithAPIServerEndpoint added in v0.3.0

func WithAPIServerEndpoint(endpoint string) BootstrapTokenDiscoveryOption

WithAPIServerEndpoint will set the kube-apiserver's endpoint for the bootstrap token discovery.

func WithCACertificateHash added in v0.3.0

func WithCACertificateHash(caCertHash string) BootstrapTokenDiscoveryOption

WitCACertificateHash sets the hash of CA for the bootstrap token to use.

func WithToken added in v0.3.0

func WithToken(token string) BootstrapTokenDiscoveryOption

WithToken will set the bootstrap token.

type ClusterConfigurationOption added in v0.3.0

type ClusterConfigurationOption func(*kubeadmv1beta1.ClusterConfiguration)

ClusterConfigurationOption is a type of function that sets options on ak kubeadm ClusterConfiguration.

func WithAPIServerCertificateSANs added in v0.3.0

func WithAPIServerCertificateSANs(names ...string) ClusterConfigurationOption

WithAPIServerCertificateSANs will add the names provided to the kube-apiserver's list of certificate SANs.

func WithAPIServerExtraArgs added in v0.3.0

func WithAPIServerExtraArgs(args map[string]string) ClusterConfigurationOption

WithAPIServerExtraArgs sets the kube-apiserver's extra arguments in the ClusterConfiguration.

func WithClusterName added in v0.3.0

func WithClusterName(name string) ClusterConfigurationOption

WithClusterName sets the cluster name on a ClusterConfiguration.

func WithClusterNetworkFromClusterNetworkingConfig added in v0.3.0

func WithClusterNetworkFromClusterNetworkingConfig(networkingConfig v1alpha1.ClusterNetworkingConfig) ClusterConfigurationOption

WithClusterNetworkFromClusterNetworkingConfig maps a cluster api ClusterNetworkingConfig to a kubeadm Networking object.

func WithControlPlaneEndpoint added in v0.3.0

func WithControlPlaneEndpoint(endpoint string) ClusterConfigurationOption

WithControlPlaneEndpoint sets the control plane endpoint, usually the load balancer in front of the kube-apiserver(s).

func WithControllerManagerExtraArgs added in v0.3.0

func WithControllerManagerExtraArgs(args map[string]string) ClusterConfigurationOption

WithControllerManagerExtraArgs sets the controller manager's extra arguments in the ClusterConfiguration.

func WithKubernetesVersion added in v0.3.0

func WithKubernetesVersion(version string) ClusterConfigurationOption

WithKubernetesVersion sets the kubernetes version on a ClusterConfiguration.

type InitConfigurationOption added in v0.3.0

type InitConfigurationOption func(*kubeadmv1beta1.InitConfiguration)

InitConfigurationOption will set various options on kubeadm's InitConfiguration type.

func WithNodeRegistrationOptions added in v0.3.0

func WithNodeRegistrationOptions(nro kubeadmv1beta1.NodeRegistrationOptions) InitConfigurationOption

WithNodeRegistrationOptions will set the node registration options.

type JoinConfigurationOption added in v0.3.0

type JoinConfigurationOption func(*kubeadmv1beta1.JoinConfiguration)

JoinConfigurationOption is a type of function that sets options on a kubeadm JoinConfiguration.

func WithBootstrapTokenDiscovery added in v0.3.0

func WithBootstrapTokenDiscovery(bootstrapTokenDiscovery *kubeadmv1beta1.BootstrapTokenDiscovery) JoinConfigurationOption

WithBootstrapTokenDiscovery sets the BootstrapToken on the Discovery field to the passed in value.

func WithJoinNodeRegistrationOptions added in v0.3.0

func WithJoinNodeRegistrationOptions(nro kubeadmv1beta1.NodeRegistrationOptions) JoinConfigurationOption

WithJoinNodeRegistrationOptions will set the NodeRegistrationOptions on the JoinConfiguration.

func WithLocalAPIEndpointAndPort added in v0.3.0

func WithLocalAPIEndpointAndPort(endpoint string, port int) JoinConfigurationOption

WithLocalAPIEndpointAndPort sets the local advertise address and port the kube-apiserver will advertise it is listening on.

type NodeRegistrationOption added in v0.3.0

type NodeRegistrationOption func(*kubeadmv1beta1.NodeRegistrationOptions)

NodeRegistrationOption is a function that sets a value on a Kubeadm NodeRegistrationOptions.

func WithCRISocket added in v0.3.0

func WithCRISocket(socket string) NodeRegistrationOption

WithCRISocket sets the location of the container runtime socket.

func WithKubeletExtraArgs added in v0.3.0

func WithKubeletExtraArgs(args map[string]string) NodeRegistrationOption

WithKubeletExtraArgs sets the extra args on the Kubelet. `node-labels` will be appendended to existing node-labels. All other other args will overwrite existing args.

func WithNodeRegistrationName added in v0.3.0

func WithNodeRegistrationName(name string) NodeRegistrationOption

WithNodeRegistrationName sets the name of the provided node registration options struct.

func WithTaints added in v0.3.0

func WithTaints(taints []corev1.Taint) NodeRegistrationOption

WithTaints will set the taints on the NodeRegistration.

Jump to

Keyboard shortcuts

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