Allow the /logs handler on the apiserver to be toggled.

Change-Id: Ibf173b7f85cf7fffe8482eaee74fb77da2b2588b
pull/6/head
CJ Cullen 2017-05-19 15:17:51 -07:00
parent 8d0cce3f91
commit 9dca164ddd
5 changed files with 17 additions and 3 deletions

View File

@ -848,6 +848,10 @@ function start-kube-apiserver {
params+=" --audit-log-maxsize=2000000000"
fi
if [[ "${ENABLE_APISERVER_LOGS_HANDLER:-}" == "false" ]]; then
params+=" --enable-logs-handler=false"
fi
local admission_controller_config_mount=""
local admission_controller_config_volume=""
local image_policy_webhook_config_mount=""

View File

@ -1055,6 +1055,10 @@ function start-kube-apiserver {
params+=" --audit-log-maxsize=2000000000"
fi
if [[ "${ENABLE_APISERVER_LOGS_HANDLER:-}" == "false" ]]; then
params+=" --enable-logs-handler=false"
fi
local admission_controller_config_mount=""
local admission_controller_config_volume=""
local image_policy_webhook_config_mount=""

View File

@ -56,6 +56,7 @@ type ServerRunOptions struct {
APIEnablement *kubeoptions.APIEnablementOptions
AllowPrivileged bool
EnableLogsHandler bool
EventTTL time.Duration
KubeletConfig kubeletclient.KubeletClientConfig
KubernetesServiceNodePort int
@ -86,8 +87,9 @@ func NewServerRunOptions() *ServerRunOptions {
StorageSerialization: kubeoptions.NewStorageSerializationOptions(),
APIEnablement: kubeoptions.NewAPIEnablementOptions(),
EventTTL: 1 * time.Hour,
MasterCount: 1,
EnableLogsHandler: true,
EventTTL: 1 * time.Hour,
MasterCount: 1,
KubeletConfig: kubeletclient.KubeletClientConfig{
Port: ports.KubeletPort,
ReadOnlyPort: ports.KubeletReadOnlyPort,
@ -142,6 +144,9 @@ func (s *ServerRunOptions) AddFlags(fs *pflag.FlagSet) {
fs.BoolVar(&s.AllowPrivileged, "allow-privileged", s.AllowPrivileged,
"If true, allow privileged containers.")
fs.BoolVar(&s.EnableLogsHandler, "enable-logs-handler", s.EnableLogsHandler,
"If true, install a /logs handler for the apiserver logs.")
fs.StringVar(&s.SSHUser, "ssh-user", s.SSHUser,
"If non-empty, use secure SSH proxy to the nodes, using this user name")

View File

@ -263,7 +263,7 @@ func CreateKubeAPIServerConfig(s *options.ServerRunOptions) (*master.Config, inf
EventTTL: s.EventTTL,
KubeletClientConfig: s.KubeletConfig,
EnableUISupport: true,
EnableLogsSupport: true,
EnableLogsSupport: s.EnableLogsHandler,
ProxyTransport: proxyTransport,
Tunneler: nodeTunneler,

View File

@ -198,6 +198,7 @@ enable-garbage-collector
enable-garbage-collector
enable-garbage-collector
enable-hostpath-provisioner
enable-logs-handler
enable-server
enable-swagger-ui
enable-taint-manager