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

Add node monitor flags #4525

Merged
merged 3 commits into from
Feb 28, 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
10 changes: 10 additions & 0 deletions pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ type KubeletConfigSpec struct {
EnableDebuggingHandlers *bool `json:"enableDebuggingHandlers,omitempty" flag:"enable-debugging-handlers"`
// RegisterNode enables automatic registration with the apiserver.
RegisterNode *bool `json:"registerNode,omitempty" flag:"register-node"`
// NodeStatusUpdateFrequency Specifies how often kubelet posts node status to master (default 10s)
// must work with nodeMonitorGracePeriod in KubeControllerManagerConfig.
NodeStatusUpdateFrequency *metav1.Duration `json:"nodeStatusUpdateFrequency,omitempty" flag:"node-status-update-frequency"`
// ClusterDomain is the DNS domain for this cluster
ClusterDomain string `json:"clusterDomain,omitempty" flag:"cluster-domain"`
// ClusterDNS is the IP address for a cluster DNS server
Expand Down Expand Up @@ -331,6 +334,13 @@ type KubeControllerManagerConfig struct {
// before the terminated pod garbage collector starts deleting terminated pods.
// If <= 0, the terminated pod garbage collector is disabled.
TerminatedPodGCThreshold *int32 `json:"terminatedPodGCThreshold,omitempty" flag:"terminated-pod-gc-threshold"`
// NodeMonitorPeriod is the period for syncing NodeStatus in NodeController. (default 5s)
NodeMonitorPeriod *metav1.Duration `json:"nodeMonitorPeriod,omitempty" flag:"node-monitor-period"`
// NodeMonitorGracePeriod is the amount of time which we allow running Node to be unresponsive before marking it unhealthy. (default 40s)
// Must be N-1 times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status.
NodeMonitorGracePeriod *metav1.Duration `json:"nodeMonitorGracePeriod,omitempty" flag:"node-monitor-grace-period"`
// PodEvictionTimeout is the grace period for deleting pods on failed nodes. (default 5m0s)
PodEvictionTimeout *metav1.Duration `json:"podEvictionTimeout,omitempty" flag:"pod-eviction-timeout"`
// UseServiceAccountCredentials controls whether we use individual service account credentials for each controller.
UseServiceAccountCredentials *bool `json:"useServiceAccountCredentials,omitempty" flag:"use-service-account-credentials"`
// HorizontalPodAutoscalerSyncPeriod is the amount of time between syncs
Expand Down
10 changes: 10 additions & 0 deletions pkg/apis/kops/v1alpha1/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ type KubeletConfigSpec struct {
EnableDebuggingHandlers *bool `json:"enableDebuggingHandlers,omitempty" flag:"enable-debugging-handlers"`
// RegisterNode enables automatic registration with the apiserver.
RegisterNode *bool `json:"registerNode,omitempty" flag:"register-node"`
// NodeStatusUpdateFrequency Specifies how often kubelet posts node status to master (default 10s)
// must work with nodeMonitorGracePeriod in KubeControllerManagerConfig.
NodeStatusUpdateFrequency *metav1.Duration `json:"nodeStatusUpdateFrequency,omitempty" flag:"node-status-update-frequency"`
// ClusterDomain is the DNS domain for this cluster
ClusterDomain string `json:"clusterDomain,omitempty" flag:"cluster-domain"`
// ClusterDNS is the IP address for a cluster DNS server
Expand Down Expand Up @@ -331,6 +334,13 @@ type KubeControllerManagerConfig struct {
// before the terminated pod garbage collector starts deleting terminated pods.
// If <= 0, the terminated pod garbage collector is disabled.
TerminatedPodGCThreshold *int32 `json:"terminatedPodGCThreshold,omitempty" flag:"terminated-pod-gc-threshold"`
// NodeMonitorPeriod is the period for syncing NodeStatus in NodeController. (default 5s)
NodeMonitorPeriod *metav1.Duration `json:"nodeMonitorPeriod,omitempty" flag:"node-monitor-period"`
// NodeMonitorGracePeriod is the amount of time which we allow running Node to be unresponsive before marking it unhealthy. (default 40s)
// Must be N-1 times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status.
NodeMonitorGracePeriod *metav1.Duration `json:"nodeMonitorGracePeriod,omitempty" flag:"node-monitor-grace-period"`
// PodEvictionTimeout is the grace period for deleting pods on failed nodes. (default 5m0s)
PodEvictionTimeout *metav1.Duration `json:"podEvictionTimeout,omitempty" flag:"pod-eviction-timeout"`
// UseServiceAccountCredentials controls whether we use individual service account credentials for each controller.
UseServiceAccountCredentials *bool `json:"useServiceAccountCredentials,omitempty" flag:"use-service-account-credentials"`
// HorizontalPodAutoscalerSyncPeriod is the amount of time between syncs
Expand Down
8 changes: 8 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -1947,6 +1947,9 @@ func autoConvert_v1alpha1_KubeControllerManagerConfig_To_kops_KubeControllerMana
}
out.AttachDetachReconcileSyncPeriod = in.AttachDetachReconcileSyncPeriod
out.TerminatedPodGCThreshold = in.TerminatedPodGCThreshold
out.NodeMonitorPeriod = in.NodeMonitorPeriod
out.NodeMonitorGracePeriod = in.NodeMonitorGracePeriod
out.PodEvictionTimeout = in.PodEvictionTimeout
out.UseServiceAccountCredentials = in.UseServiceAccountCredentials
out.HorizontalPodAutoscalerSyncPeriod = in.HorizontalPodAutoscalerSyncPeriod
out.HorizontalPodAutoscalerDownscaleDelay = in.HorizontalPodAutoscalerDownscaleDelay
Expand Down Expand Up @@ -1984,6 +1987,9 @@ func autoConvert_kops_KubeControllerManagerConfig_To_v1alpha1_KubeControllerMana
}
out.AttachDetachReconcileSyncPeriod = in.AttachDetachReconcileSyncPeriod
out.TerminatedPodGCThreshold = in.TerminatedPodGCThreshold
out.NodeMonitorPeriod = in.NodeMonitorPeriod
out.NodeMonitorGracePeriod = in.NodeMonitorGracePeriod
out.PodEvictionTimeout = in.PodEvictionTimeout
out.UseServiceAccountCredentials = in.UseServiceAccountCredentials
out.HorizontalPodAutoscalerSyncPeriod = in.HorizontalPodAutoscalerSyncPeriod
out.HorizontalPodAutoscalerDownscaleDelay = in.HorizontalPodAutoscalerDownscaleDelay
Expand Down Expand Up @@ -2118,6 +2124,7 @@ func autoConvert_v1alpha1_KubeletConfigSpec_To_kops_KubeletConfigSpec(in *Kubele
out.AllowPrivileged = in.AllowPrivileged
out.EnableDebuggingHandlers = in.EnableDebuggingHandlers
out.RegisterNode = in.RegisterNode
out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency
out.ClusterDomain = in.ClusterDomain
out.ClusterDNS = in.ClusterDNS
out.NetworkPluginName = in.NetworkPluginName
Expand Down Expand Up @@ -2183,6 +2190,7 @@ func autoConvert_kops_KubeletConfigSpec_To_v1alpha1_KubeletConfigSpec(in *kops.K
out.AllowPrivileged = in.AllowPrivileged
out.EnableDebuggingHandlers = in.EnableDebuggingHandlers
out.RegisterNode = in.RegisterNode
out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency
out.ClusterDomain = in.ClusterDomain
out.ClusterDNS = in.ClusterDNS
out.NetworkPluginName = in.NetworkPluginName
Expand Down
36 changes: 36 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -1921,6 +1921,33 @@ func (in *KubeControllerManagerConfig) DeepCopyInto(out *KubeControllerManagerCo
**out = **in
}
}
if in.NodeMonitorPeriod != nil {
in, out := &in.NodeMonitorPeriod, &out.NodeMonitorPeriod
if *in == nil {
*out = nil
} else {
*out = new(v1.Duration)
**out = **in
}
}
if in.NodeMonitorGracePeriod != nil {
in, out := &in.NodeMonitorGracePeriod, &out.NodeMonitorGracePeriod
if *in == nil {
*out = nil
} else {
*out = new(v1.Duration)
**out = **in
}
}
if in.PodEvictionTimeout != nil {
in, out := &in.PodEvictionTimeout, &out.PodEvictionTimeout
if *in == nil {
*out = nil
} else {
*out = new(v1.Duration)
**out = **in
}
}
if in.UseServiceAccountCredentials != nil {
in, out := &in.UseServiceAccountCredentials, &out.UseServiceAccountCredentials
if *in == nil {
Expand Down Expand Up @@ -2141,6 +2168,15 @@ func (in *KubeletConfigSpec) DeepCopyInto(out *KubeletConfigSpec) {
**out = **in
}
}
if in.NodeStatusUpdateFrequency != nil {
in, out := &in.NodeStatusUpdateFrequency, &out.NodeStatusUpdateFrequency
if *in == nil {
*out = nil
} else {
*out = new(v1.Duration)
**out = **in
}
}
if in.ReadOnlyPort != nil {
in, out := &in.ReadOnlyPort, &out.ReadOnlyPort
if *in == nil {
Expand Down
10 changes: 10 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ type KubeletConfigSpec struct {
EnableDebuggingHandlers *bool `json:"enableDebuggingHandlers,omitempty" flag:"enable-debugging-handlers"`
// RegisterNode enables automatic registration with the apiserver.
RegisterNode *bool `json:"registerNode,omitempty" flag:"register-node"`
// NodeStatusUpdateFrequency Specifies how often kubelet posts node status to master (default 10s)
// must work with nodeMonitorGracePeriod in KubeControllerManagerConfig.
NodeStatusUpdateFrequency *metav1.Duration `json:"nodeStatusUpdateFrequency,omitempty" flag:"node-status-update-frequency"`
// ClusterDomain is the DNS domain for this cluster
ClusterDomain string `json:"clusterDomain,omitempty" flag:"cluster-domain"`
// ClusterDNS is the IP address for a cluster DNS server
Expand Down Expand Up @@ -331,6 +334,13 @@ type KubeControllerManagerConfig struct {
// before the terminated pod garbage collector starts deleting terminated pods.
// If <= 0, the terminated pod garbage collector is disabled.
TerminatedPodGCThreshold *int32 `json:"terminatedPodGCThreshold,omitempty" flag:"terminated-pod-gc-threshold"`
// NodeMonitorPeriod is the period for syncing NodeStatus in NodeController. (default 5s)
NodeMonitorPeriod *metav1.Duration `json:"nodeMonitorPeriod,omitempty" flag:"node-monitor-period"`
// NodeMonitorGracePeriod is the amount of time which we allow running Node to be unresponsive before marking it unhealthy. (default 40s)
// Must be N-1 times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status.
NodeMonitorGracePeriod *metav1.Duration `json:"nodeMonitorGracePeriod,omitempty" flag:"node-monitor-grace-period"`
// PodEvictionTimeout is the grace period for deleting pods on failed nodes. (default 5m0s)
PodEvictionTimeout *metav1.Duration `json:"podEvictionTimeout,omitempty" flag:"pod-eviction-timeout"`
// UseServiceAccountCredentials controls whether we use individual service account credentials for each controller.
UseServiceAccountCredentials *bool `json:"useServiceAccountCredentials,omitempty" flag:"use-service-account-credentials"`
// HorizontalPodAutoscalerSyncPeriod is the amount of time between syncs
Expand Down
8 changes: 8 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -2209,6 +2209,9 @@ func autoConvert_v1alpha2_KubeControllerManagerConfig_To_kops_KubeControllerMana
}
out.AttachDetachReconcileSyncPeriod = in.AttachDetachReconcileSyncPeriod
out.TerminatedPodGCThreshold = in.TerminatedPodGCThreshold
out.NodeMonitorPeriod = in.NodeMonitorPeriod
out.NodeMonitorGracePeriod = in.NodeMonitorGracePeriod
out.PodEvictionTimeout = in.PodEvictionTimeout
out.UseServiceAccountCredentials = in.UseServiceAccountCredentials
out.HorizontalPodAutoscalerSyncPeriod = in.HorizontalPodAutoscalerSyncPeriod
out.HorizontalPodAutoscalerDownscaleDelay = in.HorizontalPodAutoscalerDownscaleDelay
Expand Down Expand Up @@ -2246,6 +2249,9 @@ func autoConvert_kops_KubeControllerManagerConfig_To_v1alpha2_KubeControllerMana
}
out.AttachDetachReconcileSyncPeriod = in.AttachDetachReconcileSyncPeriod
out.TerminatedPodGCThreshold = in.TerminatedPodGCThreshold
out.NodeMonitorPeriod = in.NodeMonitorPeriod
out.NodeMonitorGracePeriod = in.NodeMonitorGracePeriod
out.PodEvictionTimeout = in.PodEvictionTimeout
out.UseServiceAccountCredentials = in.UseServiceAccountCredentials
out.HorizontalPodAutoscalerSyncPeriod = in.HorizontalPodAutoscalerSyncPeriod
out.HorizontalPodAutoscalerDownscaleDelay = in.HorizontalPodAutoscalerDownscaleDelay
Expand Down Expand Up @@ -2380,6 +2386,7 @@ func autoConvert_v1alpha2_KubeletConfigSpec_To_kops_KubeletConfigSpec(in *Kubele
out.AllowPrivileged = in.AllowPrivileged
out.EnableDebuggingHandlers = in.EnableDebuggingHandlers
out.RegisterNode = in.RegisterNode
out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency
out.ClusterDomain = in.ClusterDomain
out.ClusterDNS = in.ClusterDNS
out.NetworkPluginName = in.NetworkPluginName
Expand Down Expand Up @@ -2445,6 +2452,7 @@ func autoConvert_kops_KubeletConfigSpec_To_v1alpha2_KubeletConfigSpec(in *kops.K
out.AllowPrivileged = in.AllowPrivileged
out.EnableDebuggingHandlers = in.EnableDebuggingHandlers
out.RegisterNode = in.RegisterNode
out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency
out.ClusterDomain = in.ClusterDomain
out.ClusterDNS = in.ClusterDNS
out.NetworkPluginName = in.NetworkPluginName
Expand Down
36 changes: 36 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2029,6 +2029,33 @@ func (in *KubeControllerManagerConfig) DeepCopyInto(out *KubeControllerManagerCo
**out = **in
}
}
if in.NodeMonitorPeriod != nil {
in, out := &in.NodeMonitorPeriod, &out.NodeMonitorPeriod
if *in == nil {
*out = nil
} else {
*out = new(v1.Duration)
**out = **in
}
}
if in.NodeMonitorGracePeriod != nil {
in, out := &in.NodeMonitorGracePeriod, &out.NodeMonitorGracePeriod
if *in == nil {
*out = nil
} else {
*out = new(v1.Duration)
**out = **in
}
}
if in.PodEvictionTimeout != nil {
in, out := &in.PodEvictionTimeout, &out.PodEvictionTimeout
if *in == nil {
*out = nil
} else {
*out = new(v1.Duration)
**out = **in
}
}
if in.UseServiceAccountCredentials != nil {
in, out := &in.UseServiceAccountCredentials, &out.UseServiceAccountCredentials
if *in == nil {
Expand Down Expand Up @@ -2249,6 +2276,15 @@ func (in *KubeletConfigSpec) DeepCopyInto(out *KubeletConfigSpec) {
**out = **in
}
}
if in.NodeStatusUpdateFrequency != nil {
in, out := &in.NodeStatusUpdateFrequency, &out.NodeStatusUpdateFrequency
if *in == nil {
*out = nil
} else {
*out = new(v1.Duration)
**out = **in
}
}
if in.ReadOnlyPort != nil {
in, out := &in.ReadOnlyPort, &out.ReadOnlyPort
if *in == nil {
Expand Down
36 changes: 36 additions & 0 deletions pkg/apis/kops/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2208,6 +2208,33 @@ func (in *KubeControllerManagerConfig) DeepCopyInto(out *KubeControllerManagerCo
**out = **in
}
}
if in.NodeMonitorPeriod != nil {
in, out := &in.NodeMonitorPeriod, &out.NodeMonitorPeriod
if *in == nil {
*out = nil
} else {
*out = new(v1.Duration)
**out = **in
}
}
if in.NodeMonitorGracePeriod != nil {
in, out := &in.NodeMonitorGracePeriod, &out.NodeMonitorGracePeriod
if *in == nil {
*out = nil
} else {
*out = new(v1.Duration)
**out = **in
}
}
if in.PodEvictionTimeout != nil {
in, out := &in.PodEvictionTimeout, &out.PodEvictionTimeout
if *in == nil {
*out = nil
} else {
*out = new(v1.Duration)
**out = **in
}
}
if in.UseServiceAccountCredentials != nil {
in, out := &in.UseServiceAccountCredentials, &out.UseServiceAccountCredentials
if *in == nil {
Expand Down Expand Up @@ -2428,6 +2455,15 @@ func (in *KubeletConfigSpec) DeepCopyInto(out *KubeletConfigSpec) {
**out = **in
}
}
if in.NodeStatusUpdateFrequency != nil {
in, out := &in.NodeStatusUpdateFrequency, &out.NodeStatusUpdateFrequency
if *in == nil {
*out = nil
} else {
*out = new(v1.Duration)
**out = **in
}
}
if in.ReadOnlyPort != nil {
in, out := &in.ReadOnlyPort, &out.ReadOnlyPort
if *in == nil {
Expand Down