type handler … // FromDocumentMap looks in the document map for documents with this handler's group. // If such are found a new component config is instantiated and the documents are loaded into it. // No error is returned if no documents are found. func (h *handler) FromDocumentMap(docmap kubeadmapi.DocumentMap) (kubeadmapi.ComponentConfig, error) { … } // fromConfigMap is an utility function, which will load the value of a key of a config map and use h.FromDocumentMap() to perform the parsing // This is an utility func. Used by the component config support implementations. Don't use it outside of that context. func (h *handler) fromConfigMap(client clientset.Interface, cmName, cmKey string, mustExist bool) (kubeadmapi.ComponentConfig, error) { … } // FromCluster loads a component from a config map in the cluster func (h *handler) FromCluster(clientset clientset.Interface, clusterCfg *kubeadmapi.ClusterConfiguration) (kubeadmapi.ComponentConfig, error) { … } var known … type configBase … func (cb *configBase) IsUserSupplied() bool { … } func (cb *configBase) SetUserSupplied(userSupplied bool) { … } func (cb *configBase) DeepCopyInto(other *configBase) { … } func cloneBytes(in []byte) []byte { … } // Marshal is an utility function, used by the component config support implementations to marshal a runtime.Object to YAML with the // correct group and version func (cb *configBase) Marshal(object runtime.Object) ([]byte, error) { … } // Unmarshal attempts to unmarshal a runtime.Object from a document map. If no object is found, no error is returned. // If a matching group is found, but no matching version an error is returned indicating that users should do manual conversion. func (cb *configBase) Unmarshal(from kubeadmapi.DocumentMap, into runtime.Object) error { … } // ensureInitializedComponentConfigs is an utility func to initialize the ComponentConfigMap in ClusterConfiguration prior to possible writes to it func ensureInitializedComponentConfigs(clusterCfg *kubeadmapi.ClusterConfiguration) { … } // Default sets up defaulted component configs in the supplied ClusterConfiguration func Default(clusterCfg *kubeadmapi.ClusterConfiguration, localAPIEndpoint *kubeadmapi.APIEndpoint, nodeRegOpts *kubeadmapi.NodeRegistrationOptions) { … } // FetchFromCluster attempts to fetch all known component configs from their config maps and store them in the supplied ClusterConfiguration func FetchFromCluster(clusterCfg *kubeadmapi.ClusterConfiguration, client clientset.Interface) error { … } // FetchFromDocumentMap attempts to load all known component configs from a document map into the supplied ClusterConfiguration func FetchFromDocumentMap(clusterCfg *kubeadmapi.ClusterConfiguration, docmap kubeadmapi.DocumentMap) error { … } // GetVersionStates returns a slice of ComponentConfigVersionState structs // describing all supported component config groups that were identified on the cluster func GetVersionStates(clusterCfg *kubeadmapi.ClusterConfiguration, client clientset.Interface) ([]outputapiv1alpha3.ComponentConfigVersionState, error) { … } // 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 Validate(clusterCfg *kubeadmapi.ClusterConfiguration) field.ErrorList { … }