diff --git a/config/v1alpha1/register.go b/config/v1alpha1/register.go index 94710dd..630b45b 100644 --- a/config/v1alpha1/register.go +++ b/config/v1alpha1/register.go @@ -21,20 +21,20 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -// GroupName is the group name use in this package +// GroupName is the group name used in this package const GroupName = "kubecontrollermanager.config.k8s.io" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} var ( - // SchemeBuilder providers the handle of collects functions that add things to a scheme. + // SchemeBuilder is the scheme builder with scheme init functions to run for this API package SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // AddToScheme applies all the stored functions to the scheme. A non-nil error - // indicates that one function failed and the attempt was abandoned. + // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme ) +// addKnownTypes registers known types to the given scheme func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &KubeControllerManagerConfiguration{},