Commit a26238f4 authored by Darren Shepherd's avatar Darren Shepherd

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

parent 7468ff95
...@@ -30,6 +30,8 @@ import ( ...@@ -30,6 +30,8 @@ import (
"strings" "strings"
"time" "time"
"k8s.io/kubernetes/pkg/kubelet/types"
"github.com/spf13/cobra" "github.com/spf13/cobra"
utilerrors "k8s.io/apimachinery/pkg/util/errors" utilerrors "k8s.io/apimachinery/pkg/util/errors"
...@@ -259,13 +261,14 @@ func CreateKubeAPIServerConfig( ...@@ -259,13 +261,14 @@ func CreateKubeAPIServerConfig(
return return
} }
all, _ := types.GetValidatedSources([]string{types.AllSource})
capabilities.Initialize(capabilities.Capabilities{ capabilities.Initialize(capabilities.Capabilities{
AllowPrivileged: s.AllowPrivileged, AllowPrivileged: s.AllowPrivileged,
// TODO(vmarmol): Implement support for HostNetworkSources. // TODO(vmarmol): Implement support for HostNetworkSources.
PrivilegedSources: capabilities.PrivilegedSources{ PrivilegedSources: capabilities.PrivilegedSources{
HostNetworkSources: []string{}, HostNetworkSources: all,
HostPIDSources: []string{}, HostPIDSources: all,
HostIPCSources: []string{}, HostIPCSources: all,
}, },
PerConnectionBandwidthLimitBytesPerSec: s.MaxConnectionBytesPerSec, PerConnectionBandwidthLimitBytesPerSec: s.MaxConnectionBytesPerSec,
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment