utils

package
v1.3.10 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 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(obj *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(obj *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(obj *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(obj *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.

Types

This section is empty.

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.

Jump to

Keyboard shortcuts

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