Skip to content

Commit

Permalink
Merge pull request #7786 from justinsb/automated-cherry-pick-of-#7487…
Browse files Browse the repository at this point in the history
…-origin-release-1.15

Automated cherry pick of #7487: Add Event TTL flag
  • Loading branch information
k8s-ci-robot authored Oct 14, 2019
2 parents e83a0ef + b285473 commit d60f665
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_v1alpha2_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,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 @@ -447,6 +447,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 @@ -447,6 +447,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 @@ -447,6 +447,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 @@ -214,6 +214,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 d60f665

Please sign in to comment.