Merge pull request #5867 from gambol99/node_mode_controllers

Node mode controllers
This commit is contained in:
k8s-ci-robot 2018-10-03 06:12:45 -07:00 committed by GitHub
commit 9c851ddcda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 33 deletions

View File

@ -377,7 +377,7 @@ type KubeControllerManagerConfig struct {
// ConfigureCloudRoutes enables CIDRs allocated with to be configured on the cloud provider.
ConfigureCloudRoutes *bool `json:"configureCloudRoutes,omitempty" flag:"configure-cloud-routes"`
// Controllers is a list of controllers to enable on the controller-manager
Controllers *[]string `json:"controllers,omitempty" flag:"controllers"`
Controllers []string `json:"controllers,omitempty" flag:"controllers"`
// CIDRAllocatorType specifies the type of CIDR allocator to use.
CIDRAllocatorType *string `json:"cidrAllocatorType,omitempty" flag:"cidr-allocator-type"`
// rootCAFile is the root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.

View File

@ -377,7 +377,7 @@ type KubeControllerManagerConfig struct {
// ConfigureCloudRoutes enables CIDRs allocated with to be configured on the cloud provider.
ConfigureCloudRoutes *bool `json:"configureCloudRoutes,omitempty" flag:"configure-cloud-routes"`
// Controllers is a list of controllers to enable on the controller-manager
Controllers *[]string `json:"controllers,omitempty" flag:"controllers"`
Controllers []string `json:"controllers,omitempty" flag:"controllers"`
// CIDRAllocatorType specifies the type of CIDR allocator to use.
CIDRAllocatorType *string `json:"cidrAllocatorType,omitempty" flag:"cidr-allocator-type"`
// rootCAFile is the root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.

View File

@ -2208,16 +2208,8 @@ func (in *KubeControllerManagerConfig) DeepCopyInto(out *KubeControllerManagerCo
}
if in.Controllers != nil {
in, out := &in.Controllers, &out.Controllers
if *in == nil {
*out = nil
} else {
*out = new([]string)
if **in != nil {
in, out := *in, *out
*out = make([]string, len(*in))
copy(*out, *in)
}
}
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.CIDRAllocatorType != nil {
in, out := &in.CIDRAllocatorType, &out.CIDRAllocatorType

View File

@ -377,7 +377,7 @@ type KubeControllerManagerConfig struct {
// ConfigureCloudRoutes enables CIDRs allocated with to be configured on the cloud provider.
ConfigureCloudRoutes *bool `json:"configureCloudRoutes,omitempty" flag:"configure-cloud-routes"`
// Controllers is a list of controllers to enable on the controller-manager
Controllers *[]string `json:"controllers,omitempty" flag:"controllers"`
Controllers []string `json:"controllers,omitempty" flag:"controllers"`
// CIDRAllocatorType specifies the type of CIDR allocator to use.
CIDRAllocatorType *string `json:"cidrAllocatorType,omitempty" flag:"cidr-allocator-type"`
// rootCAFile is the root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.

View File

@ -2289,16 +2289,8 @@ func (in *KubeControllerManagerConfig) DeepCopyInto(out *KubeControllerManagerCo
}
if in.Controllers != nil {
in, out := &in.Controllers, &out.Controllers
if *in == nil {
*out = nil
} else {
*out = new([]string)
if **in != nil {
in, out := *in, *out
*out = make([]string, len(*in))
copy(*out, *in)
}
}
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.CIDRAllocatorType != nil {
in, out := &in.CIDRAllocatorType, &out.CIDRAllocatorType

View File

@ -2477,16 +2477,8 @@ func (in *KubeControllerManagerConfig) DeepCopyInto(out *KubeControllerManagerCo
}
if in.Controllers != nil {
in, out := &in.Controllers, &out.Controllers
if *in == nil {
*out = nil
} else {
*out = new([]string)
if **in != nil {
in, out := *in, *out
*out = make([]string, len(*in))
copy(*out, *in)
}
}
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.CIDRAllocatorType != nil {
in, out := &in.CIDRAllocatorType, &out.CIDRAllocatorType

View File

@ -167,5 +167,13 @@ func (b *KubeControllerManagerOptionsBuilder) BuildOptions(o interface{}) error
}
}
// @check if the node authorization is enabled and if so enable the tokencleaner controller (disabled by default)
// This is responsible for cleaning up bootstrap tokens which have expired
if b.Context.IsKubernetesGTE("1.10") {
if fi.BoolValue(clusterSpec.KubeAPIServer.EnableBootstrapAuthToken) && len(kcm.Controllers) <= 0 {
kcm.Controllers = []string{"*", "tokencleaner"}
}
}
return nil
}