From f4d07083415bc3d247a0e6b36cf61ce7db32e8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= Date: Tue, 15 May 2018 18:43:52 +0100 Subject: [PATCH 1/2] Disable the public cadvisor port by default --- cmd/kubelet/app/options/options.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 1c0e4080cae..ad9a91a169b 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -242,8 +242,8 @@ func NewKubeletFlags() *KubeletFlags { HostNetworkSources: []string{kubetypes.AllSource}, HostPIDSources: []string{kubetypes.AllSource}, HostIPCSources: []string{kubetypes.AllSource}, - // TODO(#56523): default CAdvisorPort to 0 (disabled) and deprecate it - CAdvisorPort: 4194, + // TODO(#56523:v1.12.0): Remove --cadvisor-port, it has been deprecated since v1.10 + CAdvisorPort: 0, // TODO(#58010:v1.13.0): Remove --allow-privileged, it is deprecated AllowPrivileged: true, } @@ -400,7 +400,7 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) { fs.StringVar(&f.BootstrapKubeconfig, "experimental-bootstrap-kubeconfig", f.BootstrapKubeconfig, "") fs.MarkDeprecated("experimental-bootstrap-kubeconfig", "Use --bootstrap-kubeconfig") fs.Int32Var(&f.CAdvisorPort, "cadvisor-port", f.CAdvisorPort, "The port of the localhost cAdvisor endpoint (set to 0 to disable)") - fs.MarkDeprecated("cadvisor-port", "The default will change to 0 (disabled) in 1.12, and the cadvisor port will be removed entirely in 1.13") + fs.MarkDeprecated("cadvisor-port", "The default will change to 0 (disabled) in 1.11, and the cadvisor port will be removed entirely in 1.12") fs.DurationVar(&f.MinimumGCAge.Duration, "minimum-container-ttl-duration", f.MinimumGCAge.Duration, "Minimum age for a finished container before it is garbage collected. Examples: '300ms', '10s' or '2h45m'") fs.MarkDeprecated("minimum-container-ttl-duration", "Use --eviction-hard or --eviction-soft instead. Will be removed in a future version.") fs.Int32Var(&f.MaxPerPodContainerCount, "maximum-dead-containers-per-container", f.MaxPerPodContainerCount, "Maximum number of old instances to retain per container. Each container takes up some disk space.") From 703dc826bf4ebf15e498d47dc74eda598ce2b6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= Date: Wed, 16 May 2018 10:39:07 +0100 Subject: [PATCH 2/2] Remove e2e test for cAdvisor running in the kubelet, as it's deprecated and gonna be removed --- test/e2e/network/proxy.go | 1 - 1 file changed, 1 deletion(-) diff --git a/test/e2e/network/proxy.go b/test/e2e/network/proxy.go index fe2f9f34452..b6be82183d9 100644 --- a/test/e2e/network/proxy.go +++ b/test/e2e/network/proxy.go @@ -73,7 +73,6 @@ var _ = SIGDescribe("Proxy", func() { subresource. */ framework.ConformanceIt("should proxy logs on node using proxy subresource ", func() { nodeProxyTest(f, prefix+"/nodes/", "/proxy/logs/") }) - It("should proxy to cadvisor using proxy subresource", func() { nodeProxyTest(f, prefix+"/nodes/", ":4194/proxy/containers/") }) // using the porter image to serve content, access the content // (of multiple pods?) from multiple (endpoints/services?)