utils

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

README

Kubeadm types

These types were copied in from kubernetes/kubernetes.

The types found in kubernetes/kubernetes are incompatible with controller-gen@v0.2.

controller-gen@v0.2 requires that all fields of all embedded types have json struct tags and kubeadm types are missing a few.

If the kubeadm types ever escape kubernetes/kubernetes then we will adopt those assuming the types do all have json struct tags.

Documentation

Overview

Package utils contains Kubeadm utility types.

Package utils contains Kubeadm utility types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KubeVersionToKubeadmAPIGroupVersion

func KubeVersionToKubeadmAPIGroupVersion(v semver.Version) (schema.GroupVersion, error)

KubeVersionToKubeadmAPIGroupVersion maps a Kubernetes version to the correct Kubeadm API Group supported.

func MarshalClusterConfigurationForVersion

func MarshalClusterConfigurationForVersion(clusterConfiguration *bootstrapv1.ClusterConfiguration, version semver.Version) (string, error)

MarshalClusterConfigurationForVersion converts a Cluster API ClusterConfiguration type to the kubeadm API type for the given Kubernetes Version. NOTE: This assumes Kubernetes Version equals to kubeadm version.

func MarshalClusterStatusForVersion

func MarshalClusterStatusForVersion(clusterStatus *bootstrapv1.ClusterStatus, version semver.Version) (string, error)

MarshalClusterStatusForVersion converts a Cluster API ClusterStatus type to the kubeadm API type for the given Kubernetes Version. NOTE: This assumes Kubernetes Version equals to kubeadm version.

func MarshalInitConfigurationForVersion

func MarshalInitConfigurationForVersion(clusterConfiguration *bootstrapv1.ClusterConfiguration, initConfiguration *bootstrapv1.InitConfiguration, version semver.Version) (string, error)

MarshalInitConfigurationForVersion converts a Cluster API InitConfiguration type to the kubeadm API type for the given Kubernetes Version. NOTE: This assumes Kubernetes Version equals to kubeadm version.

func MarshalJoinConfigurationForVersion

func MarshalJoinConfigurationForVersion(clusterConfiguration *bootstrapv1.ClusterConfiguration, joinConfiguration *bootstrapv1.JoinConfiguration, version semver.Version) (string, error)

MarshalJoinConfigurationForVersion converts a Cluster API JoinConfiguration type to the kubeadm API type for the given Kubernetes Version. NOTE: This assumes Kubernetes Version equals to kubeadm version.

func UnmarshalClusterConfiguration

func UnmarshalClusterConfiguration(yaml string) (*bootstrapv1.ClusterConfiguration, error)

UnmarshalClusterConfiguration tries to translate a Kubeadm API yaml back to the Cluster API ClusterConfiguration type. NOTE: The yaml could be any of the known formats for the kubeadm ClusterConfiguration type.

func UnmarshalClusterStatus

func UnmarshalClusterStatus(yaml string) (*bootstrapv1.ClusterStatus, error)

UnmarshalClusterStatus tries to translate a Kubeadm API yaml back to the Cluster API ClusterStatus type. NOTE: The yaml could be any of the known formats for the kubeadm ClusterStatus type.

func UnmarshalInitConfiguration added in v1.4.5

func UnmarshalInitConfiguration(yaml string, clusterConfiguration *bootstrapv1.ClusterConfiguration) (*bootstrapv1.InitConfiguration, error)

UnmarshalInitConfiguration tries to translate a Kubeadm API yaml back to the InitConfiguration type. NOTE: The yaml could be any of the known formats for the kubeadm InitConfiguration type.

func UnmarshalJoinConfiguration added in v1.4.5

func UnmarshalJoinConfiguration(yaml string, clusterConfiguration *bootstrapv1.ClusterConfiguration) (*bootstrapv1.JoinConfiguration, error)

UnmarshalJoinConfiguration tries to translate a Kubeadm API yaml back to the JoinConfiguration type. NOTE: The yaml could be any of the known formats for the kubeadm JoinConfiguration type.

Types

type ConvertibleFromClusterConfiguration added in v1.7.4

type ConvertibleFromClusterConfiguration interface {
	ConvertFromClusterConfiguration(clusterConfiguration *bootstrapv1.ClusterConfiguration) error
}

ConvertibleFromClusterConfiguration defines capabilities of a type that during conversions gets values from ClusterConfiguration. NOTE: this interface is specifically designed to handle fields migrated from ClusterConfiguration to Init and JoinConfiguration in the kubeadm v1beta4 API version.

type ConvertibleToClusterConfiguration added in v1.7.4

type ConvertibleToClusterConfiguration interface {
	ConvertToClusterConfiguration(clusterConfiguration *bootstrapv1.ClusterConfiguration) error
}

ConvertibleToClusterConfiguration defines capabilities of a type that during conversions sets values to ClusterConfiguration. NOTE: this interface is specifically designed to handle fields migrated from ClusterConfiguration to Init and JoinConfiguration in the kubeadm v1beta4 API version.

Directories

Path Synopsis
Package upstreamv1beta1 contains a mirror of kubeadm API v1beta1 API, required because it is not possible to import k/K.
Package upstreamv1beta1 contains a mirror of kubeadm API v1beta1 API, required because it is not possible to import k/K.
Package upstreamv1beta2 contains a mirror of kubeadm API v1beta2 API, required because it is not possible to import k/K.
Package upstreamv1beta2 contains a mirror of kubeadm API v1beta2 API, required because it is not possible to import k/K.
Package upstreamv1beta3 contains a mirror of kubeadm API v1beta3 API, required because it is not possible to import k/K.
Package upstreamv1beta3 contains a mirror of kubeadm API v1beta3 API, required because it is not possible to import k/K.
Package upstreamv1beta4 contains a mirror of kubeadm API v1beta4 API, required because it is not possible to import k/K.
Package upstreamv1beta4 contains a mirror of kubeadm API v1beta4 API, required because it is not possible to import k/K.

Jump to

Keyboard shortcuts

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