mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	Merge pull request #17621 from mikedanese/cleanup-kube-proxy-cgroup
Auto commit by PR queue bot
This commit is contained in:
		@@ -29,7 +29,7 @@ spec:
 | 
				
			|||||||
    command:
 | 
					    command:
 | 
				
			||||||
    - /bin/sh
 | 
					    - /bin/sh
 | 
				
			||||||
    - -c
 | 
					    - -c
 | 
				
			||||||
    - kube-proxy {{api_servers_with_port}} {{kubeconfig}} {{pillar['log_level']}} {{test_args}} 1>>/var/log/kube-proxy.log 2>&1
 | 
					    - kube-proxy {{api_servers_with_port}} {{kubeconfig}} --resource-container="" {{pillar['log_level']}} {{test_args}} 1>>/var/log/kube-proxy.log 2>&1
 | 
				
			||||||
    securityContext:
 | 
					    securityContext:
 | 
				
			||||||
      privileged: true
 | 
					      privileged: true
 | 
				
			||||||
    volumeMounts:
 | 
					    volumeMounts:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -88,6 +88,7 @@ func (s *ProxyServerConfig) AddFlags(fs *pflag.FlagSet) {
 | 
				
			|||||||
	fs.IPVar(&s.HealthzBindAddress, "healthz-bind-address", s.HealthzBindAddress, "The IP address for the health check server to serve on, defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)")
 | 
						fs.IPVar(&s.HealthzBindAddress, "healthz-bind-address", s.HealthzBindAddress, "The IP address for the health check server to serve on, defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)")
 | 
				
			||||||
	fs.IntVar(&s.OOMScoreAdj, "oom-score-adj", s.OOMScoreAdj, "The oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]")
 | 
						fs.IntVar(&s.OOMScoreAdj, "oom-score-adj", s.OOMScoreAdj, "The oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]")
 | 
				
			||||||
	fs.StringVar(&s.ResourceContainer, "resource-container", s.ResourceContainer, "Absolute name of the resource-only container to create and run the Kube-proxy in (Default: /kube-proxy).")
 | 
						fs.StringVar(&s.ResourceContainer, "resource-container", s.ResourceContainer, "Absolute name of the resource-only container to create and run the Kube-proxy in (Default: /kube-proxy).")
 | 
				
			||||||
 | 
						fs.MarkDeprecated("resource-container", "This feature will be removed in a later release.")
 | 
				
			||||||
	fs.StringVar(&s.Kubeconfig, "kubeconfig", s.Kubeconfig, "Path to kubeconfig file with authorization information (the master location is set by the master flag).")
 | 
						fs.StringVar(&s.Kubeconfig, "kubeconfig", s.Kubeconfig, "Path to kubeconfig file with authorization information (the master location is set by the master flag).")
 | 
				
			||||||
	fs.Var(&s.PortRange, "proxy-port-range", "Range of host ports (beginPort-endPort, inclusive) that may be consumed in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.")
 | 
						fs.Var(&s.PortRange, "proxy-port-range", "Range of host ports (beginPort-endPort, inclusive) that may be consumed in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.")
 | 
				
			||||||
	fs.StringVar(&s.HostnameOverride, "hostname-override", s.HostnameOverride, "If non-empty, will use this string as identification instead of the actual hostname.")
 | 
						fs.StringVar(&s.HostnameOverride, "hostname-override", s.HostnameOverride, "If non-empty, will use this string as identification instead of the actual hostname.")
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -70,11 +70,10 @@ kube-proxy
 | 
				
			|||||||
      --oom-score-adj=-999: The oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]
 | 
					      --oom-score-adj=-999: The oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]
 | 
				
			||||||
      --proxy-mode="": Which proxy mode to use: 'userspace' (older) or 'iptables' (faster). If blank, look at the Node object on the Kubernetes API and respect the 'net.experimental.kubernetes.io/proxy-mode' annotation if provided.  Otherwise use the best-available proxy (currently iptables).  If the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are insufficient, this always falls back to the userspace proxy.
 | 
					      --proxy-mode="": Which proxy mode to use: 'userspace' (older) or 'iptables' (faster). If blank, look at the Node object on the Kubernetes API and respect the 'net.experimental.kubernetes.io/proxy-mode' annotation if provided.  Otherwise use the best-available proxy (currently iptables).  If the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are insufficient, this always falls back to the userspace proxy.
 | 
				
			||||||
      --proxy-port-range=: Range of host ports (beginPort-endPort, inclusive) that may be consumed in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.
 | 
					      --proxy-port-range=: Range of host ports (beginPort-endPort, inclusive) that may be consumed in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.
 | 
				
			||||||
      --resource-container="/kube-proxy": Absolute name of the resource-only container to create and run the Kube-proxy in (Default: /kube-proxy).
 | 
					 | 
				
			||||||
      --udp-timeout=250ms: How long an idle UDP connection will be kept open (e.g. '250ms', '2s').  Must be greater than 0. Only applicable for proxy-mode=userspace
 | 
					      --udp-timeout=250ms: How long an idle UDP connection will be kept open (e.g. '250ms', '2s').  Must be greater than 0. Only applicable for proxy-mode=userspace
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###### Auto generated by spf13/cobra on 9-Nov-2015
 | 
					###### Auto generated by spf13/cobra on 21-Nov-2015
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
 | 
					<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,9 +37,6 @@ func addDefaultingFuncs() {
 | 
				
			|||||||
				temp := qos.KubeProxyOOMScoreAdj
 | 
									temp := qos.KubeProxyOOMScoreAdj
 | 
				
			||||||
				obj.OOMScoreAdj = &temp
 | 
									obj.OOMScoreAdj = &temp
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			if obj.ResourceContainer == "" {
 | 
					 | 
				
			||||||
				obj.ResourceContainer = "/kube-proxy"
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			if obj.IPTablesSyncePeriodSeconds == 0 {
 | 
								if obj.IPTablesSyncePeriodSeconds == 0 {
 | 
				
			||||||
				obj.IPTablesSyncePeriodSeconds = 5
 | 
									obj.IPTablesSyncePeriodSeconds = 5
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -186,7 +186,6 @@ func targetContainers() []string {
 | 
				
			|||||||
			"/",
 | 
								"/",
 | 
				
			||||||
			"/docker-daemon",
 | 
								"/docker-daemon",
 | 
				
			||||||
			"/kubelet",
 | 
								"/kubelet",
 | 
				
			||||||
			"/kube-proxy",
 | 
					 | 
				
			||||||
			"/system",
 | 
								"/system",
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
@@ -339,7 +338,6 @@ func formatResourceUsageStats(nodeName string, containerStats resourceUsagePerCo
 | 
				
			|||||||
	// "/"              0.363       2942.09
 | 
						// "/"              0.363       2942.09
 | 
				
			||||||
	// "/docker-daemon" 0.088       521.80
 | 
						// "/docker-daemon" 0.088       521.80
 | 
				
			||||||
	// "/kubelet"       0.086       424.37
 | 
						// "/kubelet"       0.086       424.37
 | 
				
			||||||
	// "/kube-proxy"    0.011       4.66
 | 
					 | 
				
			||||||
	// "/system"        0.007       119.88
 | 
						// "/system"        0.007       119.88
 | 
				
			||||||
	buf := &bytes.Buffer{}
 | 
						buf := &bytes.Buffer{}
 | 
				
			||||||
	w := tabwriter.NewWriter(buf, 1, 0, 1, ' ', 0)
 | 
						w := tabwriter.NewWriter(buf, 1, 0, 1, ' ', 0)
 | 
				
			||||||
@@ -690,7 +688,6 @@ func (r *resourceMonitor) LogCPUSummary() {
 | 
				
			|||||||
	// "/"              0.051 0.159 0.387 0.455
 | 
						// "/"              0.051 0.159 0.387 0.455
 | 
				
			||||||
	// "/docker-daemon" 0.000 0.000 0.146 0.166
 | 
						// "/docker-daemon" 0.000 0.000 0.146 0.166
 | 
				
			||||||
	// "/kubelet"       0.036 0.053 0.091 0.154
 | 
						// "/kubelet"       0.036 0.053 0.091 0.154
 | 
				
			||||||
	// "/kube-proxy"    0.017 0.000 0.000 0.000
 | 
					 | 
				
			||||||
	// "/system"        0.001 0.001 0.001 0.002
 | 
						// "/system"        0.001 0.001 0.001 0.002
 | 
				
			||||||
	var header []string
 | 
						var header []string
 | 
				
			||||||
	header = append(header, "container")
 | 
						header = append(header, "container")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user