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:
Kubernetes Prow Robot 2022-09-15 16:41:26 -07:00 committed by GitHub
commit 4c3a7d767d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,16 +250,7 @@ func CreateKubeAPIServerConfig(s completedServerRunOptions) (
return nil, nil, nil, err return nil, nil, nil, err
} }
capabilities.Initialize(capabilities.Capabilities{ capabilities.Setup(s.AllowPrivileged, s.MaxConnectionBytesPerSec)
AllowPrivileged: s.AllowPrivileged,
// TODO(vmarmol): Implement support for HostNetworkSources.
PrivilegedSources: capabilities.PrivilegedSources{
HostNetworkSources: []string{},
HostPIDSources: []string{},
HostIPCSources: []string{},
},
PerConnectionBandwidthLimitBytesPerSec: s.MaxConnectionBytesPerSec,
})
s.Metrics.Apply() s.Metrics.Apply()
serviceaccount.RegisterMetrics() serviceaccount.RegisterMetrics()