Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
0154b244
Commit
0154b244
authored
Dec 28, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19134 from gmarek/logs-salt
Auto commit by PR queue bot
parents
25f5daa0
fc624715
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
94 additions
and
18 deletions
+94
-18
config-test.sh
cluster/gce/config-test.sh
+12
-5
configure-vm.sh
cluster/gce/configure-vm.sh
+26
-0
util.sh
cluster/gce/util.sh
+26
-6
kube-apiserver.manifest
cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest
+6
-1
kube-controller-manager.manifest
.../kube-controller-manager/kube-controller-manager.manifest
+7
-2
kube-proxy.manifest
cluster/saltbase/salt/kube-proxy/kube-proxy.manifest
+6
-1
kube-scheduler.manifest
cluster/saltbase/salt/kube-scheduler/kube-scheduler.manifest
+5
-2
default
cluster/saltbase/salt/kubelet/default
+6
-1
No files found.
cluster/gce/config-test.sh
View file @
0154b244
...
...
@@ -68,14 +68,21 @@ ENABLE_L7_LOADBALANCING="${KUBE_ENABLE_L7_LOADBALANCING:-glbc}"
# standalone - Heapster only. Metrics available via Heapster REST API.
ENABLE_CLUSTER_MONITORING
=
"
${
KUBE_ENABLE_CLUSTER_MONITORING
:-
influxdb
}
"
# Default Log level for all components in test clusters and variables to override it in specific components.
TEST_CLUSTER_LOG_LEVEL
=
"
${
TEST_CLUSTER_LOG_LEVEL
:-
--v=4
}
"
KUBELET_TEST_LOG_LEVEL
=
"
${
KUBELET_TEST_LOG_LEVEL
:-
$TEST_CLUSTER_LOG_LEVEL
}
"
API_SERVER_TEST_LOG_LEVEL
=
"
${
API_SERVER_TEST_LOG_LEVEL
:-
$TEST_CLUSTER_LOG_LEVEL
}
"
CONTROLLER_MANAGER_TEST_LOG_LEVEL
=
"
${
CONTROLLER_MANAGER_TEST_LOG_LEVEL
:-
$TEST_CLUSTER_LOG_LEVEL
}
"
SCHEDULER_TEST_LOG_LEVEL
=
"
${
SCHEDULER_TEST_LOG_LEVEL
:-
$TEST_CLUSTER_LOG_LEVEL
}
"
KUBEPROXY_TEST_LOG_LEVEL
=
"
${
KUBEPROXY_TEST_LOG_LEVEL
:-
$TEST_CLUSTER_LOG_LEVEL
}
"
TEST_CLUSTER_RESYNC_PERIOD
=
"
${
TEST_CLUSTER_RESYNC_PERIOD
:-
--min-resync-period=3m
}
"
KUBELET_TEST_ARGS
=
"--max-pods=110
$TEST_CLUSTER_LOG_LEVEL
"
APISERVER_TEST_ARGS
=
"--runtime-config=extensions/v1beta1
${
TEST_CLUSTER_LOG_LEVEL
}
"
CONTROLLER_MANAGER_TEST_ARGS
=
"
${
TEST_CLUSTER_
LOG_LEVEL
}
${
TEST_CLUSTER_
RESYNC_PERIOD
}
"
SCHEDULER_TEST_ARGS
=
"
${
TEST_CLUSTER_LOG_LEVEL
}
"
KUBEPROXY_TEST_ARGS
=
"
${
TEST_CLUSTER_LOG_LEVEL
}
"
KUBELET_TEST_ARGS
=
"--max-pods=110"
APISERVER_TEST_ARGS
=
"--runtime-config=extensions/v1beta1"
CONTROLLER_MANAGER_TEST_ARGS
=
"
${
TEST_CLUSTER_RESYNC_PERIOD
}
"
SCHEDULER_TEST_ARGS
=
""
KUBEPROXY_TEST_ARGS
=
""
# Optional: Enable node logging.
ENABLE_NODE_LOGGING
=
"
${
KUBE_ENABLE_NODE_LOGGING
:-
true
}
"
...
...
cluster/gce/configure-vm.sh
View file @
0154b244
...
...
@@ -294,31 +294,57 @@ EOF
kubelet_port: '
$(
echo
"
$KUBELET_PORT
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
# Configuration changes for test clusters
if
[
-n
"
${
APISERVER_TEST_ARGS
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
apiserver_test_args: '
$(
echo
"
$APISERVER_TEST_ARGS
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
if
[
-n
"
${
API_SERVER_TEST_LOG_LEVEL
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
api_server_test_log_level: '
$(
echo
"
$API_SERVER_TEST_LOG_LEVEL
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
if
[
-n
"
${
KUBELET_TEST_ARGS
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
kubelet_test_args: '
$(
echo
"
$KUBELET_TEST_ARGS
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
if
[
-n
"
${
KUBELET_TEST_LOG_LEVEL
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
kubelet_test_log_level: '
$(
echo
"
$KUBELET_TEST_LOG_LEVEL
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
if
[
-n
"
${
CONTROLLER_MANAGER_TEST_ARGS
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
controller_manager_test_args: '
$(
echo
"
$CONTROLLER_MANAGER_TEST_ARGS
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
if
[
-n
"
${
CONTROLLER_MANAGER_TEST_LOG_LEVEL
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
controller_manager_test_log_level: '
$(
echo
"
$CONTROLLER_MANAGER_TEST_LOG_LEVEL
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
if
[
-n
"
${
SCHEDULER_TEST_ARGS
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
scheduler_test_args: '
$(
echo
"
$SCHEDULER_TEST_ARGS
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
if
[
-n
"
${
SCHEDULER_TEST_LOG_LEVEL
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
scheduler_test_log_level: '
$(
echo
"
$SCHEDULER_TEST_LOG_LEVEL
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
if
[
-n
"
${
KUBEPROXY_TEST_ARGS
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
kubeproxy_test_args: '
$(
echo
"
$KUBEPROXY_TEST_ARGS
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
if
[
-n
"
${
KUBEPROXY_TEST_LOG_LEVEL
:-}
"
]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
kubeproxy_test_log_level: '
$(
echo
"
$KUBEPROXY_TEST_LOG_LEVEL
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
# TODO: Replace this with a persistent volume (and create it).
if
[[
"
${
ENABLE_CLUSTER_REGISTRY
}
"
==
true
&&
-n
"
${
CLUSTER_REGISTRY_DISK
}
"
]]
;
then
cat
<<
EOF
>>/srv/salt-overlay/pillar/cluster-params.sls
...
...
cluster/gce/util.sh
View file @
0154b244
...
...
@@ -1415,6 +1415,16 @@ EOF
TEST_CLUSTER:
$(
yaml-quote
${
TEST_CLUSTER
})
EOF
fi
if
[
-n
"
${
KUBELET_TEST_ARGS
:-}
"
]
;
then
cat
>>
$file
<<
EOF
KUBELET_TEST_ARGS:
$(
yaml-quote
${
KUBELET_TEST_ARGS
})
EOF
fi
if
[
-n
"
${
KUBELET_TEST_LOG_LEVEL
:-}
"
]
;
then
cat
>>
$file
<<
EOF
KUBELET_TEST_LOG_LEVEL:
$(
yaml-quote
${
KUBELET_TEST_LOG_LEVEL
})
EOF
fi
if
[[
"
${
master
}
"
==
"true"
]]
;
then
# Master-only env vars.
cat
>>
$file
<<
EOF
...
...
@@ -1437,9 +1447,9 @@ EOF
APISERVER_TEST_ARGS:
$(
yaml-quote
${
APISERVER_TEST_ARGS
})
EOF
fi
if
[
-n
"
${
KUBELET_TEST_ARGS
:-}
"
]
;
then
if
[
-n
"
${
APISERVER_TEST_LOG_LEVEL
:-}
"
]
;
then
cat
>>
$file
<<
EOF
KUBELET_TEST_ARGS:
$(
yaml-quote
${
KUBELET_TEST_ARGS
})
APISERVER_TEST_LOG_LEVEL:
$(
yaml-quote
${
APISERVER_TEST_LOG_LEVEL
})
EOF
fi
if
[
-n
"
${
CONTROLLER_MANAGER_TEST_ARGS
:-}
"
]
;
then
...
...
@@ -1447,11 +1457,21 @@ EOF
CONTROLLER_MANAGER_TEST_ARGS:
$(
yaml-quote
${
CONTROLLER_MANAGER_TEST_ARGS
})
EOF
fi
if
[
-n
"
${
CONTROLLER_MANAGER_TEST_LOG_LEVEL
:-}
"
]
;
then
cat
>>
$file
<<
EOF
CONTROLLER_MANAGER_TEST_LOG_LEVEL:
$(
yaml-quote
${
CONTROLLER_MANAGER_TEST_LOG_LEVEL
})
EOF
fi
if
[
-n
"
${
SCHEDULER_TEST_ARGS
:-}
"
]
;
then
cat
>>
$file
<<
EOF
SCHEDULER_TEST_ARGS:
$(
yaml-quote
${
SCHEDULER_TEST_ARGS
})
EOF
fi
if
[
-n
"
${
SCHEDULER_TEST_LOG_LEVEL
:-}
"
]
;
then
cat
>>
$file
<<
EOF
SCHEDULER_TEST_LOG_LEVEL:
$(
yaml-quote
${
SCHEDULER_TEST_LOG_LEVEL
})
EOF
fi
else
# Node-only env vars.
cat
>>
$file
<<
EOF
...
...
@@ -1459,14 +1479,14 @@ KUBERNETES_MASTER: $(yaml-quote "false")
ZONE:
$(
yaml-quote
${
ZONE
})
EXTRA_DOCKER_OPTS:
$(
yaml-quote
${
EXTRA_DOCKER_OPTS
:-})
EOF
if
[
-n
"
${
KUBE
LET
_TEST_ARGS
:-}
"
]
;
then
if
[
-n
"
${
KUBE
PROXY
_TEST_ARGS
:-}
"
]
;
then
cat
>>
$file
<<
EOF
KUBE
LET_TEST_ARGS:
$(
yaml-quote
${
KUBELET
_TEST_ARGS
})
KUBE
PROXY_TEST_ARGS:
$(
yaml-quote
${
KUBEPROXY
_TEST_ARGS
})
EOF
fi
if
[
-n
"
${
KUBEPROXY_TEST_
ARGS
:-}
"
]
;
then
if
[
-n
"
${
KUBEPROXY_TEST_
LOG_LEVEL
:-}
"
]
;
then
cat
>>
$file
<<
EOF
KUBEPROXY_TEST_
ARGS:
$(
yaml-quote
${
KUBEPROXY_TEST_ARGS
})
KUBEPROXY_TEST_
LOG_LEVEL:
$(
yaml-quote
${
KUBEPROXY_TEST_LOG_LEVEL
})
EOF
fi
fi
...
...
cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest
View file @
0154b244
...
...
@@ -90,8 +90,13 @@
{% set runtime_config = "--runtime-config=" + grains.runtime_config -%}
{% endif -%}
{% set log_level = pillar['log_level'] -%}
{% if pillar['api_server_test_log_level'] is defined -%}
{% set log_level = pillar['api_server_test_log_level'] -%}
{% endif -%}
{% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + " " + basic_auth_file + " " + min_request_timeout -%}
{% set params = params + " " + cert_file + " " + key_file + " --secure-port=" + secure_port + " " + token_auth_file + " " + bind_address + " " +
pillar['log_level']
+ " " + advertise_address + " " + proxy_ssh_options -%}
{% set params = params + " " + cert_file + " " + key_file + " --secure-port=" + secure_port + " " + token_auth_file + " " + bind_address + " " +
log_level
+ " " + advertise_address + " " + proxy_ssh_options -%}
# test_args has to be kept at the end, so they'll overwrite any prior configuration
{% if pillar['apiserver_test_args'] is defined -%}
...
...
cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest
View file @
0154b244
...
...
@@ -30,7 +30,7 @@
{% if grains.cloud != 'vagrant' -%}
{% set cloud_provider = "--cloud-provider=" + grains.cloud -%}
{% endif -%}
{% set service_account_key = "
--service-account-private-key-file=/srv/kubernetes/server.key
" -%}
{% set service_account_key = "
--service-account-private-key-file=/srv/kubernetes/server.key
" -%}
{% if grains.cloud in [ 'aws', 'gce' ] and grains.cloud_config is defined -%}
{% set cloud_config = "--cloud-config=" + grains.cloud_config -%}
...
...
@@ -45,7 +45,12 @@
{% set root_ca_file = "--root-ca-file=/srv/kubernetes/ca.crt" -%}
{% endif -%}
{% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + terminated_pod_gc + " " + cloud_provider + " " + cloud_config + service_account_key + pillar['log_level'] + " " + root_ca_file -%}
{% set log_level = pillar['log_level'] -%}
{% if pillar['controller_manager_test_log_level'] is defined -%}
{% set log_level = pillar['controller_manager_test_log_level'] -%}
{% endif -%}
{% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + terminated_pod_gc + " " + cloud_provider + " " + cloud_config + " " + service_account_key + " " + log_level + " " + root_ca_file -%}
# test_args has to be kept at the end, so they'll overwrite any prior configuration
...
...
cluster/saltbase/salt/kube-proxy/kube-proxy.manifest
View file @
0154b244
...
...
@@ -15,6 +15,11 @@
{% set test_args=pillar['kubeproxy_test_args'] %}
{% endif -%}
{% set log_level = pillar['log_level'] -%}
{% if pillar['kubeproxy_test_log_level'] is defined -%}
{% set log_level = pillar['kubeproxy_test_log_level'] -%}
{% endif -%}
# kube-proxy podspec
apiVersion: v1
kind: Pod
...
...
@@ -29,7 +34,7 @@ spec:
command:
- /bin/sh
- -c
- kube-proxy {{api_servers_with_port}} {{kubeconfig}} --resource-container="" {{
pillar['log_level']
}} {{test_args}} 1>>/var/log/kube-proxy.log 2>&1
- kube-proxy {{api_servers_with_port}} {{kubeconfig}} --resource-container="" {{
log_level
}} {{test_args}} 1>>/var/log/kube-proxy.log 2>&1
securityContext:
privileged: true
volumeMounts:
...
...
cluster/saltbase/salt/kube-scheduler/kube-scheduler.manifest
View file @
0154b244
{% set params = "" -%}
{% if pillar['log_level'] is defined -%}
{% set params = params + " " + pillar['log_level'] -%}
{% set log_level = pillar['log_level'] -%}
{% if pillar['scheduler_test_log_level'] is defined -%}
{% set log_level = pillar['scheduler_test_log_level'] -%}
{% endif -%}
{% set params = params + log_level -%}
# test_args has to be kept at the end, so they'll overwrite any prior configuration
{% if pillar['scheduler_test_args'] is defined -%}
{% set params = params + " " + pillar['scheduler_test_args'] -%}
...
...
cluster/saltbase/salt/kubelet/default
View file @
0154b244
...
...
@@ -131,5 +131,10 @@
{% set kubelet_port="--port=" + pillar['kubelet_port'] %}
{% endif -%}
{% set log_level = pillar['log_level'] -%}
{% if pillar['kubelet_test_log_level'] is defined -%}
{% set log_level = pillar['kubelet_test_log_level'] -%}
{% endif -%}
# test_args has to be kept at the end, so they'll overwrite any prior configuration
DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{config}} {{manifest_url}} --allow-privileged={{pillar['allow_privileged']}} {{
pillar['log_level']
}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{ master_kubelet_args }} {{cpu_cfs_quota}} {{network_plugin}} {{kubelet_port}} {{experimental_flannel_overlay}} {{test_args}}"
DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{config}} {{manifest_url}} --allow-privileged={{pillar['allow_privileged']}} {{
log_level
}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{ master_kubelet_args }} {{cpu_cfs_quota}} {{network_plugin}} {{kubelet_port}} {{experimental_flannel_overlay}} {{test_args}}"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment