Add sysctl whitelist on the node

This commit is contained in:
Dr. Stefan Schimanski
2016-08-19 10:53:25 +02:00
parent ed36baed20
commit e356e52247
13 changed files with 489 additions and 4 deletions

View File

@@ -290,6 +290,7 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) {
StandaloneMode: (len(s.APIServerList) == 0),
StreamingConnectionIdleTimeout: s.StreamingConnectionIdleTimeout.Duration,
SyncFrequency: s.SyncFrequency.Duration,
AllowedUnsafeSysctls: s.AllowedUnsafeSysctls,
SystemCgroups: s.SystemCgroups,
TLSOptions: tlsOptions,
Writer: writer,
@@ -1098,6 +1099,7 @@ type KubeletConfig struct {
StandaloneMode bool
StreamingConnectionIdleTimeout time.Duration
SyncFrequency time.Duration
AllowedUnsafeSysctls []string
SystemCgroups string
TLSOptions *server.TLSOptions
Writer io.Writer
@@ -1218,6 +1220,7 @@ func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.Pod
kc.MakeIPTablesUtilChains,
kc.iptablesMasqueradeBit,
kc.iptablesDropBit,
kc.AllowedUnsafeSysctls,
)
if err != nil {