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

Expose the --fail-swap-on flag for kubelet #4239

Merged
merged 3 commits into from
Jan 10, 2018
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
2 changes: 2 additions & 0 deletions pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ type KubeletConfigSpec struct {
RuntimeRequestTimeout *metav1.Duration `json:"runtimeRequestTimeout,omitempty" flag:"runtime-request-timeout"`
// VolumeStatsAggPeriod is the interval for kubelet to calculate and cache the volume disk usage for all pods and volumes
VolumeStatsAggPeriod *metav1.Duration `json:"volumeStatsAggPeriod,omitempty" flag:"volume-stats-agg-period"`
// Tells the Kubelet to fail to start if swap is enabled on the node.
FailSwapOn *bool `json:"failSwapOn,omitempty" flag:"fail-swap-on"`
}

// KubeProxyConfig defined the configuration for a proxy
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ type KubeletConfigSpec struct {
RuntimeRequestTimeout *metav1.Duration `json:"runtimeRequestTimeout,omitempty" flag:"runtime-request-timeout"`
// VolumeStatsAggPeriod is the interval for kubelet to calculate and cache the volume disk usage for all pods and volumes
VolumeStatsAggPeriod *metav1.Duration `json:"volumeStatsAggPeriod,omitempty" flag:"volume-stats-agg-period"`
// Tells the Kubelet to fail to start if swap is enabled on the node.
FailSwapOn *bool `json:"failSwapOn,omitempty" flag:"fail-swap-on"`
}

// KubeProxyConfig defined the configuration for a proxy
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -2180,6 +2180,7 @@ func autoConvert_v1alpha1_KubeletConfigSpec_To_kops_KubeletConfigSpec(in *Kubele
out.EnforceNodeAllocatable = in.EnforceNodeAllocatable
out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
out.VolumeStatsAggPeriod = in.VolumeStatsAggPeriod
out.FailSwapOn = in.FailSwapOn
return nil
}

Expand Down Expand Up @@ -2244,6 +2245,7 @@ func autoConvert_kops_KubeletConfigSpec_To_v1alpha1_KubeletConfigSpec(in *kops.K
out.EnforceNodeAllocatable = in.EnforceNodeAllocatable
out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
out.VolumeStatsAggPeriod = in.VolumeStatsAggPeriod
out.FailSwapOn = in.FailSwapOn
return nil
}

Expand Down
9 changes: 9 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2596,6 +2596,15 @@ func (in *KubeletConfigSpec) DeepCopyInto(out *KubeletConfigSpec) {
**out = **in
}
}
if in.FailSwapOn != nil {
in, out := &in.FailSwapOn, &out.FailSwapOn
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
}
return
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ type KubeletConfigSpec struct {
RuntimeRequestTimeout *metav1.Duration `json:"runtimeRequestTimeout,omitempty" flag:"runtime-request-timeout"`
// VolumeStatsAggPeriod is the interval for kubelet to calculate and cache the volume disk usage for all pods and volumes
VolumeStatsAggPeriod *metav1.Duration `json:"volumeStatsAggPeriod,omitempty" flag:"volume-stats-agg-period"`
// Tells the Kubelet to fail to start if swap is enabled on the node.
FailSwapOn *bool `json:"failSwapOn,omitempty" flag:"fail-swap-on"`
}

// KubeProxyConfig defined the configuration for a proxy
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -2442,6 +2442,7 @@ func autoConvert_v1alpha2_KubeletConfigSpec_To_kops_KubeletConfigSpec(in *Kubele
out.EnforceNodeAllocatable = in.EnforceNodeAllocatable
out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
out.VolumeStatsAggPeriod = in.VolumeStatsAggPeriod
out.FailSwapOn = in.FailSwapOn
return nil
}

Expand Down Expand Up @@ -2506,6 +2507,7 @@ func autoConvert_kops_KubeletConfigSpec_To_v1alpha2_KubeletConfigSpec(in *kops.K
out.EnforceNodeAllocatable = in.EnforceNodeAllocatable
out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
out.VolumeStatsAggPeriod = in.VolumeStatsAggPeriod
out.FailSwapOn = in.FailSwapOn
return nil
}

Expand Down
9 changes: 9 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2722,6 +2722,15 @@ func (in *KubeletConfigSpec) DeepCopyInto(out *KubeletConfigSpec) {
**out = **in
}
}
if in.FailSwapOn != nil {
in, out := &in.FailSwapOn, &out.FailSwapOn
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
}
return
}

Expand Down
9 changes: 9 additions & 0 deletions pkg/apis/kops/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2941,6 +2941,15 @@ func (in *KubeletConfigSpec) DeepCopyInto(out *KubeletConfigSpec) {
**out = **in
}
}
if in.FailSwapOn != nil {
in, out := &in.FailSwapOn, &out.FailSwapOn
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
}
return
}

Expand Down