Set all sources so node+agent in the same process doesn't get restricted

k3s-v1.14.6
Darren Shepherd 2019-02-07 20:52:26 -07:00 committed by Erik Wilson
parent bc9b837dbd
commit 9971dee59a
1 changed files with 6 additions and 3 deletions

View File

@ -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,
})