From baade6c7303038fead959ae763e79d1343aa1460 Mon Sep 17 00:00:00 2001 From: SataQiu Date: Wed, 14 Sep 2022 23:37:32 +0800 Subject: [PATCH] using simpler wrapper function capabilities.Setup instead of calling Initialize directly --- cmd/kube-apiserver/app/server.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index 8084a52dbd2..83000b5911b 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -250,16 +250,7 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) ( return nil, nil, nil, err } - capabilities.Initialize(capabilities.Capabilities{ - AllowPrivileged: s.AllowPrivileged, - // TODO(vmarmol): Implement support for HostNetworkSources. - PrivilegedSources: capabilities.PrivilegedSources{ - HostNetworkSources: []string{}, - HostPIDSources: []string{}, - HostIPCSources: []string{}, - }, - PerConnectionBandwidthLimitBytesPerSec: s.MaxConnectionBytesPerSec, - }) + capabilities.Setup(s.AllowPrivileged, s.MaxConnectionBytesPerSec) s.Metrics.Apply() serviceaccount.RegisterMetrics()