Skip to content

Commit

Permalink
fix watch-cache flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rsafonseca committed Oct 24, 2024
1 parent 6773431 commit be75191
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 4 deletions.
3 changes: 2 additions & 1 deletion nodeup/pkg/model/kube_apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"k8s.io/kops/pkg/flagbuilder"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kops/util/pkg/architectures"
"k8s.io/utils/pointer"
)

func Test_KubeAPIServer_BuildFlags(t *testing.T) {
Expand Down Expand Up @@ -92,7 +93,7 @@ func Test_KubeAPIServer_BuildFlags(t *testing.T) {
},
{
kops.KubeAPIServerConfig{
WatchCache: false,
WatchCache: pointer.Bool(false),
},
"--secure-port=0 --watch-cache=false",
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ type KubeAPIServerConfig struct {
MinRequestTimeout *int32 `json:"minRequestTimeout,omitempty" flag:"min-request-timeout"`

// Used to disable watch caching in the apiserver, defaults to enabling caching by omission
WatchCache bool `json:"watchCache,omitempty" flag:"watch-cache"`
WatchCache *bool `json:"watchCache,omitempty" flag:"watch-cache"`

// Set the watch-cache-sizes parameter for the apiserver
// The only meaningful value is setting to 0, which disable caches for specific object types.
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ type KubeAPIServerConfig struct {
MinRequestTimeout *int32 `json:"minRequestTimeout,omitempty" flag:"min-request-timeout"`

// Used to disable watch caching in the apiserver, defaults to enabling caching by omission
WatchCache bool `json:"watchCache,omitempty" flag:"watch-cache"`
WatchCache *bool `json:"watchCache,omitempty" flag:"watch-cache"`

// Set the watch-cache-sizes parameter for the apiserver
// The only meaningful value is setting to 0, which disable caches for specific object types.
Expand Down
5 changes: 5 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.

2 changes: 1 addition & 1 deletion pkg/apis/kops/v1alpha3/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ type KubeAPIServerConfig struct {
MinRequestTimeout *int32 `json:"minRequestTimeout,omitempty" flag:"min-request-timeout"`

// Used to disable watch caching in the apiserver, defaults to enabling caching by omission
WatchCache bool `json:"watchCache,omitempty" flag:"watch-cache"`
WatchCache *bool `json:"watchCache,omitempty" flag:"watch-cache"`

// Set the watch-cache-sizes parameter for the apiserver
// The only meaningful value is setting to 0, which disable caches for specific object types.
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha3/zz_generated.deepcopy.go

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

5 changes: 5 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.

0 comments on commit be75191

Please sign in to comment.