Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to set the --kube-api-qps and --kube-api-burst flags on KubeControllerManager #7153

Merged
merged 2 commits into from
Jun 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@ type KubeControllerManagerConfig struct {
// MinResyncPeriod indicates the resync period in reflectors.
// The resync period will be random between MinResyncPeriod and 2*MinResyncPeriod. (default 12h0m0s)
MinResyncPeriod string `json:"minResyncPeriod,omitempty" flag:"min-resync-period"`
// KubeAPIQPS QPS to use while talking with kubernetes apiserver. (default 20)
KubeAPIQPS *float32 `json:"kubeAPIQPS,omitempty" flag:"kube-api-qps"`
// KubeAPIBurst Burst to use while talking with kubernetes apiserver. (default 30)
KubeAPIBurst *int32 `json:"kubeAPIBurst,omitempty" flag:"kube-api-burst"`
}

// CloudControllerManagerConfig is the configuration of the cloud controller
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/kops/v1alpha1/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@ type KubeControllerManagerConfig struct {
// MinResyncPeriod indicates the resync period in reflectors.
// The resync period will be random between MinResyncPeriod and 2*MinResyncPeriod. (default 12h0m0s)
MinResyncPeriod string `json:"minResyncPeriod,omitempty" flag:"min-resync-period"`
// KubeAPIQPS QPS to use while talking with kubernetes apiserver. (default 20)
KubeAPIQPS *float32 `json:"kubeAPIQPS,omitempty" flag:"kube-api-qps"`
// KubeAPIBurst Burst to use while talking with kubernetes apiserver. (default 30)
KubeAPIBurst *int32 `json:"kubeAPIBurst,omitempty" flag:"kube-api-burst"`
}

// CloudControllerManagerConfig is the configuration of the cloud controller
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.conversion.go

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

10 changes: 10 additions & 0 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.

4 changes: 4 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@ type KubeControllerManagerConfig struct {
// MinResyncPeriod indicates the resync period in reflectors.
// The resync period will be random between MinResyncPeriod and 2*MinResyncPeriod. (default 12h0m0s)
MinResyncPeriod string `json:"minResyncPeriod,omitempty" flag:"min-resync-period"`
// KubeAPIQPS QPS to use while talking with kubernetes apiserver. (default 20)
KubeAPIQPS *float32 `json:"kubeAPIQPS,omitempty" flag:"kube-api-qps"`
// KubeAPIBurst Burst to use while talking with kubernetes apiserver. (default 30)
KubeAPIBurst *int32 `json:"kubeAPIBurst,omitempty" flag:"kube-api-burst"`
}

// CloudControllerManagerConfig is the configuration of the cloud controller
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

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

10 changes: 10 additions & 0 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.

10 changes: 10 additions & 0 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.

12 changes: 12 additions & 0 deletions pkg/flagbuilder/buildflags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ func TestBuildKCMFlags(t *testing.T) {
},
Expected: "--terminated-pod-gc-threshold=1500",
},
{
Config: &kops.KubeControllerManagerConfig{
KubeAPIQPS: fi.Float32(42),
},
Expected: "--kube-api-qps=42",
},
{
Config: &kops.KubeControllerManagerConfig{
KubeAPIBurst: fi.Int32(80),
},
Expected: "--kube-api-burst=80",
},
{
Config: &kops.KubeControllerManagerConfig{},
Expected: "",
Expand Down
1 change: 1 addition & 0 deletions upup/pkg/fi/cloudup/openstack/server_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package openstack

import (
"fmt"

"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"

"github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/servergroups"
Expand Down