Skip to content

Commit

Permalink
Merge pull request #7487 from tioxy/add_event_ttl_flag
Browse files Browse the repository at this point in the history
Add event ttl flag
  • Loading branch information
k8s-ci-robot authored Oct 12, 2019
2 parents dfaa39b + 6b8af27 commit c8d9c70
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 0 deletions.
3 changes: 3 additions & 0 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,9 @@ spec:
items:
type: string
type: array
eventTTL:
description: Amount of time to retain Kubernetes events
type: string
experimentalEncryptionProviderConfig:
description: ExperimentalEncryptionProviderConfig enables encryption
at rest for secrets.
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ type KubeAPIServerConfig struct {

// CPURequest, cpu request compute resource for api server. Defaults to "150m"
CPURequest string `json:"cpuRequest,omitempty"`

// Amount of time to retain Kubernetes events
EventTTL *metav1.Duration `json:"eventTTL,omitempty" flag:"event-ttl"`
}

// KubeControllerManagerConfig is the configuration for the controller
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/kops/v1alpha1/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ type KubeAPIServerConfig struct {

// CPURequest, cpu request compute resource for api server. Defaults to "150m"
CPURequest string `json:"cpuRequest,omitempty"`

// Amount of time to retain Kubernetes events
EventTTL *metav1.Duration `json:"eventTTL,omitempty" flag:"event-ttl"`
}

// KubeControllerManagerConfig is the configuration for the controller
Expand Down
2 changes: 2 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.

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

3 changes: 3 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ type KubeAPIServerConfig struct {

// CPURequest, cpu request compute resource for api server. Defaults to "150m"
CPURequest string `json:"cpuRequest,omitempty"`

// Amount of time to retain Kubernetes events
EventTTL *metav1.Duration `json:"eventTTL,omitempty" flag:"event-ttl"`
}

// KubeControllerManagerConfig is the configuration for the controller
Expand Down
2 changes: 2 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.

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.

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.

6 changes: 6 additions & 0 deletions pkg/flagbuilder/buildflags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,12 @@ func TestBuildAPIServerFlags(t *testing.T) {
},
Expected: "--authorization-webhook-cache-unauthorized-ttl=10s --insecure-port=0 --secure-port=0",
},
{
Config: &kops.KubeAPIServerConfig{
EventTTL: &metav1.Duration{Duration: 3 * time.Hour},
},
Expected: "--event-ttl=3h0m0s --insecure-port=0 --secure-port=0",
},
}

for _, test := range grid {
Expand Down

0 comments on commit c8d9c70

Please sign in to comment.