using simpler wrapper function capabilities.Setup instead of calling Initialize directly

This commit is contained in:
SataQiu 2022-09-14 23:37:32 +08:00
parent c45ca46cdb
commit baade6c730

View File

@ -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()