mirror of https://github.com/kubernetes/kops.git
Merge pull request #5867 from gambol99/node_mode_controllers
Node mode controllers
This commit is contained in:
commit
9c851ddcda
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue