Skip to content

Commit

Permalink
Merge pull request #5867 from gambol99/node_mode_controllers
Browse files Browse the repository at this point in the history
Node mode controllers
  • Loading branch information
k8s-ci-robot committed Oct 3, 2018
2 parents 28cb83b + cf67cfd commit 9c851dd
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 33 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/kops/v1alpha1/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 2 additions & 10 deletions pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 2 additions & 10 deletions pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions pkg/apis/kops/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/model/components/kubecontrollermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 9c851dd

Please sign in to comment.