Merge pull request #68195 from luxas/consolidate_componentconfig_code_standards

Automatic merge from submit-queue (batch tested with PRs 67950, 68195). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Consolidate componentconfig code standards

**What this PR does / why we need it**:

This PR fixes a bunch of very small misalignments in ComponentConfig packages:
 - Add sane comments to all functions/variables in componentconfig `register.go` files
 - Make the `register.go` files of componentconfig pkgs follow the same pattern and not differ from each other like they do today.
 - Register the `openapi-gen` tag in all `doc.go` files where the pkg contains _external_ types.
 - Add the `groupName` tag where missing
 - Fix cases where `addKnownTypes` was registered twice in the `SchemeBuilder`
 - Add `Readme` and `OWNERS` files to `Godeps` directories if missing.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @sttts @thockin

Kubernetes-commit: a6eb49f0dc9a6d9fecf7ff4a8edeaa382b55ac50
This commit is contained in:
Kubernetes Publisher 2018-09-07 11:19:40 -07:00
commit 481b4013cb
2 changed files with 29 additions and 29 deletions

50
Godeps/Godeps.json generated
View File

@ -60,103 +60,103 @@
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/config",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/config/v1alpha1",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/naming",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "6429050ef506887d121f3e7306e894f8900d8a63"
"Rev": "cdac837abb323d610ee074068a16915651f888dd"
},
{
"ImportPath": "k8s.io/apiserver/pkg/apis/config",
"Rev": "e9312c15296b6c2c923ebd5031ff5d1d5fd022d7"
"Rev": "75a03c2d437ac87229cdc1d43c039a4e7bf7ecf5"
},
{
"ImportPath": "k8s.io/apiserver/pkg/apis/config/v1alpha1",
"Rev": "e9312c15296b6c2c923ebd5031ff5d1d5fd022d7"
"Rev": "75a03c2d437ac87229cdc1d43c039a4e7bf7ecf5"
},
{
"ImportPath": "k8s.io/utils/pointer",

View File

@ -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{},