kubernetes: k8s.io/kubernetes/cmd/kubeadm/app/componentconfigs Index | Files

package componentconfigs

import "k8s.io/kubernetes/cmd/kubeadm/app/componentconfigs"

Index

Package Files

checksums.go configset.go kubelet.go kubeproxy.go scheme.go utils.go

Constants

const (
    // KubeProxyGroup is a pointer to the used API group name for the kube-proxy config
    KubeProxyGroup = kubeproxyconfig.GroupName
)
const (
    // KubeletGroup is a pointer to the used API group name for the kubelet config
    KubeletGroup = kubeletconfig.GroupName
)

Variables

var Codecs = serializer.NewCodecFactory(Scheme)

Codecs provides access to encoding and decoding for the scheme.

var Scheme = runtime.NewScheme()

Scheme is the runtime.Scheme to which all supported kubeadm ComponentConfig API types are registered.

func AddToScheme Uses

func AddToScheme(scheme *runtime.Scheme)

AddToScheme builds the kubeadm ComponentConfig scheme using all known ComponentConfig versions.

func ChecksumForConfigMap Uses

func ChecksumForConfigMap(cm *v1.ConfigMap) string

ChecksumForConfigMap calculates a checksum for the supplied config map. The exact algorithm depends on hash and prefix parameters

func Default Uses

func Default(clusterCfg *kubeadmapi.ClusterConfiguration, localAPIEndpoint *kubeadmapi.APIEndpoint, nodeRegOpts *kubeadmapi.NodeRegistrationOptions)

Default sets up defaulted component configs in the supplied ClusterConfiguration

func FetchFromCluster Uses

func FetchFromCluster(clusterCfg *kubeadmapi.ClusterConfiguration, client clientset.Interface) error

FetchFromCluster attempts to fetch all known component configs from their config maps and store them in the supplied ClusterConfiguration

func FetchFromClusterWithLocalOverwrites Uses

func FetchFromClusterWithLocalOverwrites(clusterCfg *kubeadmapi.ClusterConfiguration, client clientset.Interface, docmap kubeadmapi.DocumentMap) error

FetchFromClusterWithLocalOverwrites fetches component configs from a cluster and overwrites them locally with the ones present in the supplied document map. If any UnsupportedConfigVersionError are not handled by the configs in the document map, the function returns them all as a single UnsupportedConfigVersionsErrorMap. This function is normally called only in some specific cases during upgrade.

func FetchFromDocumentMap Uses

func FetchFromDocumentMap(clusterCfg *kubeadmapi.ClusterConfiguration, docmap kubeadmapi.DocumentMap) error

FetchFromDocumentMap attempts to load all known component configs from a document map into the supplied ClusterConfiguration

func GetVersionStates Uses

func GetVersionStates(clusterCfg *kubeadmapi.ClusterConfiguration, client clientset.Interface, docmap kubeadmapi.DocumentMap) ([]output.ComponentConfigVersionState, error)

GetVersionStates returns a slice of ComponentConfigVersionState structs describing all supported component config groups that were identified on the cluster

func SignConfigMap Uses

func SignConfigMap(cm *v1.ConfigMap)

SignConfigMap calculates the supplied config map checksum and annotates it with it

func Validate Uses

func Validate(clusterCfg *kubeadmapi.ClusterConfiguration) field.ErrorList

Validate is a placeholder for performing a validation on an already loaded component configs in a ClusterConfiguration TODO: investigate if the function can be repurposed for validating component config via CLI

func VerifyConfigMapSignature Uses

func VerifyConfigMapSignature(cm *v1.ConfigMap) bool

VerifyConfigMapSignature returns true if the config map has checksum annotation and it matches; false otherwise

type UnsupportedConfigVersionError Uses

type UnsupportedConfigVersionError struct {
    // OldVersion is the config version that is causing the problem
    OldVersion schema.GroupVersion

    // CurrentVersion describes the natively supported config version
    CurrentVersion schema.GroupVersion

    // Document points to the YAML/JSON document that caused the problem
    Document []byte
}

UnsupportedConfigVersionError is a special error type returned whenever we encounter too old config version

func (*UnsupportedConfigVersionError) Error Uses

func (err *UnsupportedConfigVersionError) Error() string

Error implements the standard Golang error interface for UnsupportedConfigVersionError

type UnsupportedConfigVersionsErrorMap Uses

type UnsupportedConfigVersionsErrorMap map[string]*UnsupportedConfigVersionError

UnsupportedConfigVersionsErrorMap is a cumulative version of the UnsupportedConfigVersionError type

func (UnsupportedConfigVersionsErrorMap) Error Uses

func (errs UnsupportedConfigVersionsErrorMap) Error() string

Error implements the standard Golang error interface for UnsupportedConfigVersionsErrorMap

Package componentconfigs imports 30 packages (graph) and is imported by 33 packages. Updated 2020-09-13. Refresh now. Tools for package owners.