Documentation ¶
Index ¶
- func ConfigurationToYAML(obj runtime.Object) (string, error)
- func GetCodecs() serializer.CodecFactory
- func NewBootstrapTokenDiscovery(opts ...BootstrapTokenDiscoveryOption) *kubeadmv1beta1.BootstrapTokenDiscovery
- func SetClusterConfigurationOptions(base *kubeadmv1beta1.ClusterConfiguration, opts ...ClusterConfigurationOption)
- func SetInitConfigurationOptions(base *kubeadmv1beta1.InitConfiguration, opts ...InitConfigurationOption)
- func SetJoinConfigurationOptions(base *kubeadmv1beta1.JoinConfiguration, opts ...JoinConfigurationOption)
- func SetNodeRegistration(base *kubeadmv1beta1.NodeRegistrationOptions, opts ...NodeRegistrationOption) kubeadmv1beta1.NodeRegistrationOptions
- type BootstrapTokenDiscoveryOption
- type ClusterConfigurationOption
- func WithAPIServerCertificateSANs(names ...string) ClusterConfigurationOption
- func WithAPIServerExtraArgs(args map[string]string) ClusterConfigurationOption
- func WithAPIServerExtraVolumes(name, hostPath, mountPath string) ClusterConfigurationOption
- func WithClusterName(name string) ClusterConfigurationOption
- func WithClusterNetworkFromClusterNetworkingConfig(networkingConfig v1alpha1.ClusterNetworkingConfig) ClusterConfigurationOption
- func WithControlPlaneEndpoint(endpoint string) ClusterConfigurationOption
- func WithControllerManagerExtraArgs(args map[string]string) ClusterConfigurationOption
- func WithControllerManagerExtraVolumes(name, hostPath, mountPath string) ClusterConfigurationOption
- func WithKubernetesVersion(version string) ClusterConfigurationOption
- type InitConfigurationOption
- type JoinConfigurationOption
- func WithBootstrapTokenDiscovery(bootstrapTokenDiscovery *kubeadmv1beta1.BootstrapTokenDiscovery) JoinConfigurationOption
- func WithJoinNodeRegistrationOptions(nro kubeadmv1beta1.NodeRegistrationOptions) JoinConfigurationOption
- func WithLocalAPIEndpointAndPort(endpoint string, port int) JoinConfigurationOption
- type NodeRegistrationOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigurationToYAML ¶
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 ¶
func NewBootstrapTokenDiscovery(opts ...BootstrapTokenDiscoveryOption) *kubeadmv1beta1.BootstrapTokenDiscovery
NewBootstrapTokenDiscovery will create a new kubeadm bootstrap token discovery and run options against it.
func SetClusterConfigurationOptions ¶
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 ¶
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 ¶
func SetJoinConfigurationOptions(base *kubeadmv1beta1.JoinConfiguration, opts ...JoinConfigurationOption)
SetJoinConfigurationOptions runs a set of options against a JoinConfiguration. Use this to customize an existing JoinConfiguration.
func SetNodeRegistration ¶ added in v0.4.0
func SetNodeRegistration(base *kubeadmv1beta1.NodeRegistrationOptions, opts ...NodeRegistrationOption) kubeadmv1beta1.NodeRegistrationOptions
SetNodeRegistration will create a kubeadmNodeRegistrationOptions with some defaults and the ability to provide customizations.
Types ¶
type BootstrapTokenDiscoveryOption ¶
type BootstrapTokenDiscoveryOption func(*kubeadmv1beta1.BootstrapTokenDiscovery)
BootstrapTokenDiscoveryOption will modify a kubeadm BootstrapTokenDiscovery.
func WithAPIServerEndpoint ¶
func WithAPIServerEndpoint(endpoint string) BootstrapTokenDiscoveryOption
WithAPIServerEndpoint will set the kube-apiserver's endpoint for the bootstrap token discovery.
func WithCACertificateHash ¶
func WithCACertificateHash(caCertHash string) BootstrapTokenDiscoveryOption
WithCACertificateHash sets the hash of CA for the bootstrap token to use.
func WithToken ¶
func WithToken(token string) BootstrapTokenDiscoveryOption
WithToken will set the bootstrap token.
type ClusterConfigurationOption ¶
type ClusterConfigurationOption func(*kubeadmv1beta1.ClusterConfiguration)
ClusterConfigurationOption is a type of function that sets options on ak kubeadm ClusterConfiguration.
func WithAPIServerCertificateSANs ¶
func WithAPIServerCertificateSANs(names ...string) ClusterConfigurationOption
WithAPIServerCertificateSANs will add the names provided to the kube-apiserver's list of certificate SANs.
func WithAPIServerExtraArgs ¶
func WithAPIServerExtraArgs(args map[string]string) ClusterConfigurationOption
WithAPIServerExtraArgs sets the kube-apiserver's extra arguments in the ClusterConfiguration.
func WithAPIServerExtraVolumes ¶
func WithAPIServerExtraVolumes(name, hostPath, mountPath string) ClusterConfigurationOption
WithAPIServerExtraVolumes sets extra volume mounts required for the API server
func WithClusterName ¶
func WithClusterName(name string) ClusterConfigurationOption
WithClusterName sets the cluster name on a ClusterConfiguration.
func WithClusterNetworkFromClusterNetworkingConfig ¶
func WithClusterNetworkFromClusterNetworkingConfig(networkingConfig v1alpha1.ClusterNetworkingConfig) ClusterConfigurationOption
WithClusterNetworkFromClusterNetworkingConfig maps a cluster api ClusterNetworkingConfig to a kubeadm Networking object.
func WithControlPlaneEndpoint ¶
func WithControlPlaneEndpoint(endpoint string) ClusterConfigurationOption
WithControlPlaneEndpoint sets the control plane endpoint, usually the load balancer in front of the kube-apiserver(s).
func WithControllerManagerExtraArgs ¶
func WithControllerManagerExtraArgs(args map[string]string) ClusterConfigurationOption
WithControllerManagerExtraArgs sets the controller manager's extra arguments in the ClusterConfiguration.
func WithControllerManagerExtraVolumes ¶
func WithControllerManagerExtraVolumes(name, hostPath, mountPath string) ClusterConfigurationOption
WithControllerManagerExtraVolumes sets the controller manager's extra volumes arguments in the ClusterConfiguration.
func WithKubernetesVersion ¶
func WithKubernetesVersion(version string) ClusterConfigurationOption
WithKubernetesVersion sets the kubernetes version on a ClusterConfiguration.
type InitConfigurationOption ¶
type InitConfigurationOption func(*kubeadmv1beta1.InitConfiguration)
InitConfigurationOption will set various options on kubeadm's InitConfiguration type.
func WithInitLocalAPIEndpointAndPort ¶
func WithInitLocalAPIEndpointAndPort(endpoint string, port int) InitConfigurationOption
WithInitLocalAPIEndpointAndPort sets the local advertise address and port the kube-apiserver will advertise it is listening on.
func WithNodeRegistrationOptions ¶
func WithNodeRegistrationOptions(nro kubeadmv1beta1.NodeRegistrationOptions) InitConfigurationOption
WithNodeRegistrationOptions will set the node registration options.
type JoinConfigurationOption ¶
type JoinConfigurationOption func(*kubeadmv1beta1.JoinConfiguration)
JoinConfigurationOption is a type of function that sets options on a kubeadm JoinConfiguration.
func WithBootstrapTokenDiscovery ¶
func WithBootstrapTokenDiscovery(bootstrapTokenDiscovery *kubeadmv1beta1.BootstrapTokenDiscovery) JoinConfigurationOption
WithBootstrapTokenDiscovery sets the BootstrapToken on the Discovery field to the passed in value.
func WithJoinNodeRegistrationOptions ¶
func WithJoinNodeRegistrationOptions(nro kubeadmv1beta1.NodeRegistrationOptions) JoinConfigurationOption
WithJoinNodeRegistrationOptions will set the NodeRegistrationOptions on the JoinConfiguration.
func WithLocalAPIEndpointAndPort ¶
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 ¶
type NodeRegistrationOption func(*kubeadmv1beta1.NodeRegistrationOptions)
NodeRegistrationOption is a function that sets a value on a Kubeadm NodeRegistrationOptions.
func WithCRISocket ¶
func WithCRISocket(socket string) NodeRegistrationOption
WithCRISocket sets the location of the container runtime socket.
func WithKubeletExtraArgs ¶
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 ¶
func WithNodeRegistrationName(name string) NodeRegistrationOption
WithNodeRegistrationName sets the name of the provided node registration options struct.
func WithTaints ¶
func WithTaints(taints []corev1.Taint) NodeRegistrationOption
WithTaints will set the taints on the NodeRegistration.