diff --git a/pkg/apis/kops/componentconfig.go b/pkg/apis/kops/componentconfig.go index 03d659f20d..53e140d980 100644 --- a/pkg/apis/kops/componentconfig.go +++ b/pkg/apis/kops/componentconfig.go @@ -149,13 +149,7 @@ type KubeletConfigSpec struct { //// minimumGCAge is the minimum age for a unused image before it is //// garbage collected. //ImageMinimumGCAge unversioned.Duration `json:"imageMinimumGCAge"` - //// imageGCHighThresholdPercent is the percent of disk usage after which - //// image garbage collection is always run. - //ImageGCHighThresholdPercent int32 `json:"imageGCHighThresholdPercent"` - //// imageGCLowThresholdPercent is the percent of disk usage before which - //// image garbage collection is never run. Lowest disk usage to garbage - //// collect to. - //ImageGCLowThresholdPercent int32 `json:"imageGCLowThresholdPercent"` + //// lowDiskSpaceThresholdMB is the absolute free disk space, in MB, to //// maintain. When disk space falls below this threshold, new pods would //// be rejected. @@ -220,8 +214,10 @@ type KubeletConfigSpec struct { HairpinMode string `json:"hairpinMode,omitempty" flag:"hairpin-mode"` // The node has babysitter process monitoring docker and kubelet. BabysitDaemons *bool `json:"babysitDaemons,omitempty" flag:"babysit-daemons"` - //// maxPods is the number of pods that can run on this Kubelet. - //MaxPods int32 `json:"maxPods"` + + // maxPods is the number of pods that can run on this Kubelet. + MaxPods *int32 `json:"maxPods,omitempty" flag:"max-pods"` + //// nvidiaGPUs is the number of NVIDIA GPU devices on this node. //NvidiaGPUs int32 `json:"nvidiaGPUs"` //// dockerExecHandlerName is the handler to use when executing a command @@ -273,8 +269,10 @@ type KubeletConfigSpec struct { NodeLabels map[string]string `json:"nodeLabels,omitempty" flag:"node-labels"` // nonMasqueradeCIDR configures masquerading: traffic to IPs outside this range will use IP masquerade. NonMasqueradeCIDR string `json:"nonMasqueradeCIDR,omitempty" flag:"non-masquerade-cidr"` - //// enable gathering custom metrics. - //EnableCustomMetrics bool `json:"enableCustomMetrics"` + + // enable gathering custom metrics. + EnableCustomMetrics *bool `json:"enableCustomMetrics,omitempty" flag:"enable-custom-metrics"` + //// Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'. //EvictionHard string `json:"evictionHard,omitempty"` //// Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'. @@ -296,6 +294,19 @@ type KubeletConfigSpec struct { // and overrides the default MTU for cases where it cannot be automatically // computed (such as IPSEC). NetworkPluginMTU *int32 `json:"networkPluginMTU,omitEmpty" flag:"network-plugin-mtu"` + + // imageGCHighThresholdPercent is the percent of disk usage after which + // image garbage collection is always run. + ImageGCHighThresholdPercent *int32 `json:"imageGCHighThresholdPercent,omitempty" flag:"image-gc-high-threshold"` + // imageGCLowThresholdPercent is the percent of disk usage before which + // image garbage collection is never run. Lowest disk usage to garbage + // collect to. + ImageGCLowThresholdPercent *int32 `json:"imageGCLowThresholdPercent,omitempty" flag:"image-gc-low-threshold"` + + // terminatedPodGCThreshold is the number of terminated pods that can exist + // 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"` } type KubeProxyConfig struct { @@ -482,10 +493,6 @@ type KubeControllerManagerConfig struct { //// minResyncPeriod is the resync period in reflectors; will be random between //// minResyncPeriod and 2*minResyncPeriod. //MinResyncPeriod unversioned.Duration `json:"minResyncPeriod"` - //// terminatedPodGCThreshold is the number of terminated pods that can exist - //// before the terminated pod garbage collector starts deleting terminated pods. - //// If <= 0, the terminated pod garbage collector is disabled. - //TerminatedPodGCThreshold int32 `json:"terminatedPodGCThreshold"` //// horizontalPodAutoscalerSyncPeriod is the period for syncing the number of //// pods in horizontal pod autoscaler. //HorizontalPodAutoscalerSyncPeriod unversioned.Duration `json:"horizontalPodAutoscalerSyncPeriod"` diff --git a/pkg/apis/kops/dockerconfig.go b/pkg/apis/kops/dockerconfig.go index 64eceaf398..ccaaa360be 100644 --- a/pkg/apis/kops/dockerconfig.go +++ b/pkg/apis/kops/dockerconfig.go @@ -33,6 +33,9 @@ type DockerConfig struct { InsecureRegistry *string `json:"insecureRegistry,omitempty" flag:"insecure-registry"` MTU *int32 `json:"mtu,omitempty" flag:"mtu"` + // The bridge cidr (--bip) flag + BridgeIP *string `json:"bridgeIP,omitempty" flag:"bip"` + // The version of docker to install // Be careful if changing this; not all docker versions are validated, and they will break in bad ways. Version *string `json:"version,omitempty"` diff --git a/pkg/apis/kops/v1alpha1/componentconfig.go b/pkg/apis/kops/v1alpha1/componentconfig.go index 5c7434fa46..260ec06374 100644 --- a/pkg/apis/kops/v1alpha1/componentconfig.go +++ b/pkg/apis/kops/v1alpha1/componentconfig.go @@ -149,13 +149,6 @@ type KubeletConfigSpec struct { //// minimumGCAge is the minimum age for a unused image before it is //// garbage collected. //ImageMinimumGCAge unversioned.Duration `json:"imageMinimumGCAge"` - //// imageGCHighThresholdPercent is the percent of disk usage after which - //// image garbage collection is always run. - //ImageGCHighThresholdPercent int32 `json:"imageGCHighThresholdPercent"` - //// imageGCLowThresholdPercent is the percent of disk usage before which - //// image garbage collection is never run. Lowest disk usage to garbage - //// collect to. - //ImageGCLowThresholdPercent int32 `json:"imageGCLowThresholdPercent"` //// lowDiskSpaceThresholdMB is the absolute free disk space, in MB, to //// maintain. When disk space falls below this threshold, new pods would //// be rejected. @@ -220,8 +213,10 @@ type KubeletConfigSpec struct { HairpinMode string `json:"hairpinMode,omitempty" flag:"hairpin-mode"` // The node has babysitter process monitoring docker and kubelet. BabysitDaemons *bool `json:"babysitDaemons,omitempty" flag:"babysit-daemons"` - //// maxPods is the number of pods that can run on this Kubelet. - //MaxPods int32 `json:"maxPods"` + + // maxPods is the number of pods that can run on this Kubelet. + MaxPods *int32 `json:"maxPods,omitempty" flag:"max-pods"` + //// nvidiaGPUs is the number of NVIDIA GPU devices on this node. //NvidiaGPUs int32 `json:"nvidiaGPUs"` //// dockerExecHandlerName is the handler to use when executing a command @@ -273,8 +268,10 @@ type KubeletConfigSpec struct { NodeLabels map[string]string `json:"nodeLabels,omitempty" flag:"node-labels"` // nonMasqueradeCIDR configures masquerading: traffic to IPs outside this range will use IP masquerade. NonMasqueradeCIDR string `json:"nonMasqueradeCIDR,omitempty" flag:"non-masquerade-cidr"` - //// enable gathering custom metrics. - //EnableCustomMetrics bool `json:"enableCustomMetrics"` + + // enable gathering custom metrics. + EnableCustomMetrics *bool `json:"enableCustomMetrics,omitempty" flag:"enable-custom-metrics"` + //// Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'. //EvictionHard string `json:"evictionHard,omitempty"` //// Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'. @@ -296,6 +293,19 @@ type KubeletConfigSpec struct { // and overrides the default MTU for cases where it cannot be automatically // computed (such as IPSEC). NetworkPluginMTU *int32 `json:"networkPluginMTU,omitEmpty" flag:"network-plugin-mtu"` + + // imageGCHighThresholdPercent is the percent of disk usage after which + // image garbage collection is always run. + ImageGCHighThresholdPercent *int32 `json:"imageGCHighThresholdPercent,omitempty" flag:"image-gc-high-threshold"` + // imageGCLowThresholdPercent is the percent of disk usage before which + // image garbage collection is never run. Lowest disk usage to garbage + // collect to. + ImageGCLowThresholdPercent *int32 `json:"imageGCLowThresholdPercent,omitempty" flag:"image-gc-low-threshold"` + + // terminatedPodGCThreshold is the number of terminated pods that can exist + // 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"` } type KubeProxyConfig struct { @@ -479,10 +489,6 @@ type KubeControllerManagerConfig struct { //// minResyncPeriod is the resync period in reflectors; will be random between //// minResyncPeriod and 2*minResyncPeriod. //MinResyncPeriod unversioned.Duration `json:"minResyncPeriod"` - //// terminatedPodGCThreshold is the number of terminated pods that can exist - //// before the terminated pod garbage collector starts deleting terminated pods. - //// If <= 0, the terminated pod garbage collector is disabled. - //TerminatedPodGCThreshold int32 `json:"terminatedPodGCThreshold"` //// horizontalPodAutoscalerSyncPeriod is the period for syncing the number of //// pods in horizontal pod autoscaler. //HorizontalPodAutoscalerSyncPeriod unversioned.Duration `json:"horizontalPodAutoscalerSyncPeriod"` diff --git a/pkg/apis/kops/v1alpha1/dockerconfig.go b/pkg/apis/kops/v1alpha1/dockerconfig.go index d58730175c..218c166a69 100644 --- a/pkg/apis/kops/v1alpha1/dockerconfig.go +++ b/pkg/apis/kops/v1alpha1/dockerconfig.go @@ -29,6 +29,9 @@ type DockerConfig struct { InsecureRegistry *string `json:"insecureRegistry,omitempty" flag:"insecure-registry"` MTU *int32 `json:"mtu,omitempty" flag:"mtu"` + // The bridge cidr (--bip) flag + BridgeIP *string `json:"bridgeIP,omitempty" flag:"bip"` + // The version of docker to install // Be careful if changing this; not all docker versions are validated, and they will break in bad ways. Version *string `json:"version,omitempty"` diff --git a/pkg/apis/kops/v1alpha1/zz_generated.conversion.go b/pkg/apis/kops/v1alpha1/zz_generated.conversion.go index 326712f07f..9775801be6 100644 --- a/pkg/apis/kops/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/kops/v1alpha1/zz_generated.conversion.go @@ -598,6 +598,7 @@ func autoConvert_v1alpha1_DockerConfig_To_kops_DockerConfig(in *DockerConfig, ou out.Storage = in.Storage out.InsecureRegistry = in.InsecureRegistry out.MTU = in.MTU + out.BridgeIP = in.BridgeIP out.Version = in.Version return nil } @@ -614,6 +615,7 @@ func autoConvert_kops_DockerConfig_To_v1alpha1_DockerConfig(in *kops.DockerConfi out.Storage = in.Storage out.InsecureRegistry = in.InsecureRegistry out.MTU = in.MTU + out.BridgeIP = in.BridgeIP out.Version = in.Version return nil } @@ -1168,12 +1170,17 @@ func autoConvert_v1alpha1_KubeletConfigSpec_To_kops_KubeletConfigSpec(in *Kubele out.ConfigureCBR0 = in.ConfigureCBR0 out.HairpinMode = in.HairpinMode out.BabysitDaemons = in.BabysitDaemons + out.MaxPods = in.MaxPods out.PodCIDR = in.PodCIDR out.ReconcileCIDR = in.ReconcileCIDR out.RegisterSchedulable = in.RegisterSchedulable out.NodeLabels = in.NodeLabels out.NonMasqueradeCIDR = in.NonMasqueradeCIDR + out.EnableCustomMetrics = in.EnableCustomMetrics out.NetworkPluginMTU = in.NetworkPluginMTU + out.ImageGCHighThresholdPercent = in.ImageGCHighThresholdPercent + out.ImageGCLowThresholdPercent = in.ImageGCLowThresholdPercent + out.TerminatedPodGCThreshold = in.TerminatedPodGCThreshold return nil } @@ -1199,12 +1206,17 @@ func autoConvert_kops_KubeletConfigSpec_To_v1alpha1_KubeletConfigSpec(in *kops.K out.ConfigureCBR0 = in.ConfigureCBR0 out.HairpinMode = in.HairpinMode out.BabysitDaemons = in.BabysitDaemons + out.MaxPods = in.MaxPods out.PodCIDR = in.PodCIDR out.ReconcileCIDR = in.ReconcileCIDR out.RegisterSchedulable = in.RegisterSchedulable out.NodeLabels = in.NodeLabels out.NonMasqueradeCIDR = in.NonMasqueradeCIDR + out.EnableCustomMetrics = in.EnableCustomMetrics out.NetworkPluginMTU = in.NetworkPluginMTU + out.ImageGCHighThresholdPercent = in.ImageGCHighThresholdPercent + out.ImageGCLowThresholdPercent = in.ImageGCLowThresholdPercent + out.TerminatedPodGCThreshold = in.TerminatedPodGCThreshold return nil } diff --git a/pkg/apis/kops/v1alpha2/componentconfig.go b/pkg/apis/kops/v1alpha2/componentconfig.go index 8284d24c9a..fce6369ca5 100644 --- a/pkg/apis/kops/v1alpha2/componentconfig.go +++ b/pkg/apis/kops/v1alpha2/componentconfig.go @@ -77,6 +77,10 @@ type KubeletConfigSpec struct { HairpinMode string `json:"hairpinMode,omitempty" flag:"hairpin-mode"` // The node has babysitter process monitoring docker and kubelet. BabysitDaemons *bool `json:"babysitDaemons,omitempty" flag:"babysit-daemons"` + + // maxPods is the number of pods that can run on this Kubelet. + MaxPods *int32 `json:"maxPods,omitempty" flag:"max-pods"` + // The CIDR to use for pod IP addresses, only used in standalone mode. // In cluster mode, this is obtained from the master. PodCIDR string `json:"podCIDR,omitempty" flag:"pod-cidr"` @@ -91,10 +95,26 @@ type KubeletConfigSpec struct { // nonMasqueradeCIDR configures masquerading: traffic to IPs outside this range will use IP masquerade. NonMasqueradeCIDR string `json:"nonMasqueradeCIDR,omitempty" flag:"non-masquerade-cidr"` + // enable gathering custom metrics. + EnableCustomMetrics *bool `json:"enableCustomMetrics,omitempty" flag:"enable-custom-metrics"` + // networkPluginMTU is the MTU to be passed to the network plugin, // and overrides the default MTU for cases where it cannot be automatically // computed (such as IPSEC). NetworkPluginMTU *int32 `json:"networkPluginMTU,omitEmpty" flag:"network-plugin-mtu"` + + // imageGCHighThresholdPercent is the percent of disk usage after which + // image garbage collection is always run. + ImageGCHighThresholdPercent *int32 `json:"imageGCHighThresholdPercent,omitempty" flag:"image-gc-high-threshold"` + // imageGCLowThresholdPercent is the percent of disk usage before which + // image garbage collection is never run. Lowest disk usage to garbage + // collect to. + ImageGCLowThresholdPercent *int32 `json:"imageGCLowThresholdPercent,omitempty" flag:"image-gc-low-threshold"` + + // terminatedPodGCThreshold is the number of terminated pods that can exist + // 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"` } type KubeProxyConfig struct { diff --git a/pkg/apis/kops/v1alpha2/dockerconfig.go b/pkg/apis/kops/v1alpha2/dockerconfig.go index 0c199cb88d..e51e8a25db 100644 --- a/pkg/apis/kops/v1alpha2/dockerconfig.go +++ b/pkg/apis/kops/v1alpha2/dockerconfig.go @@ -29,6 +29,9 @@ type DockerConfig struct { InsecureRegistry *string `json:"insecureRegistry,omitempty" flag:"insecure-registry"` MTU *int32 `json:"mtu,omitempty" flag:"mtu"` + // The bridge cidr (--bip) flag + BridgeIP *string `json:"bridgeIP,omitempty" flag:"bip"` + // The version of docker to install // Be careful if changing this; not all docker versions are validated, and they will break in bad ways. Version *string `json:"version,omitempty"`