mirror of https://github.com/k3s-io/k3s
Set all sources so node+agent in the same process doesn't get restricted
parent
bc9b837dbd
commit
9971dee59a
|
@ -30,6 +30,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"k8s.io/kubernetes/pkg/kubelet/types"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
||||
|
@ -260,13 +262,14 @@ func CreateKubeAPIServerConfig(
|
|||
return
|
||||
}
|
||||
|
||||
all, _ := types.GetValidatedSources([]string{types.AllSource})
|
||||
capabilities.Initialize(capabilities.Capabilities{
|
||||
AllowPrivileged: s.AllowPrivileged,
|
||||
// TODO(vmarmol): Implement support for HostNetworkSources.
|
||||
PrivilegedSources: capabilities.PrivilegedSources{
|
||||
HostNetworkSources: []string{},
|
||||
HostPIDSources: []string{},
|
||||
HostIPCSources: []string{},
|
||||
HostNetworkSources: all,
|
||||
HostPIDSources: all,
|
||||
HostIPCSources: all,
|
||||
},
|
||||
PerConnectionBandwidthLimitBytesPerSec: s.MaxConnectionBytesPerSec,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue