mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 02:11:09 +00:00
Merge pull request #112448 from SataQiu/improve-apiserver-20220914
Using simpler wrapper function capabilities.Setup instead of calling Initialize directly
This commit is contained in:
commit
4c3a7d767d
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user