Skip to content

Commit

Permalink
Merge pull request #4239 from wannabesrevenge/master
Browse files Browse the repository at this point in the history
Expose the --fail-swap-on flag for kubelet
  • Loading branch information
k8s-ci-robot authored Jan 10, 2018
2 parents 9626884 + e25ae6f commit 612f8b1
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 0 deletions.
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

0 comments on commit 612f8b1

Please sign in to comment.