Skip to content

Commit 721afd6

Browse files
author
k8s-merge-robot
committed
Merge pull request kubernetes#13197 from soltysh/fix_local_up2
Auto commit by PR queue bot
2 parents 282bf64 + 7edb1af commit 721afd6

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

hack/local-up-cluster.sh

+13-8
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ DOCKER_NATIVE=${DOCKER_NATIVE:-""}
2222
DOCKER=(docker ${DOCKER_OPTS})
2323
DOCKERIZE_KUBELET=${DOCKERIZE_KUBELET:-""}
2424
ALLOW_PRIVILEGED=${ALLOW_PRIVILEGED:-""}
25+
RUNTIME_CONFIG=${RUNTIME_CONFIG:-""}
2526
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
2627
cd "${KUBE_ROOT}"
2728

@@ -45,17 +46,17 @@ GO_OUT=""
4546
while getopts "o:" OPTION
4647
do
4748
case $OPTION in
48-
o)
49+
o)
4950
echo "skipping build"
5051
echo "using source $OPTARG"
5152
GO_OUT="$OPTARG"
5253
if [ $GO_OUT == "" ]; then
5354
echo "You provided an invalid value for the build output directory."
54-
exit
55+
exit
5556
fi
5657
;;
5758
?)
58-
usage
59+
usage
5960
exit
6061
;;
6162
esac
@@ -141,7 +142,7 @@ function detect_binary {
141142

142143
cleanup_dockerized_kubelet()
143144
{
144-
if [[ -e $KUBELET_CIDFILE ]]; then
145+
if [[ -e $KUBELET_CIDFILE ]]; then
145146
docker kill $(<$KUBELET_CIDFILE) > /dev/null
146147
rm -f $KUBELET_CIDFILE
147148
fi
@@ -209,16 +210,20 @@ function start_apiserver {
209210
if [[ -n "${ALLOW_PRIVILEGED}" ]]; then
210211
priv_arg="--allow-privileged "
211212
fi
213+
runtime_config=""
214+
if [[ -n "${RUNTIME_CONFIG}" ]]; then
215+
runtime_config="--runtime-config=\"${RUNTIME_CONFIG}\""
216+
fi
212217

213218
APISERVER_LOG=/tmp/kube-apiserver.log
214-
sudo -E "${GO_OUT}/kube-apiserver" ${priv_arg}\
219+
sudo -E "${GO_OUT}/kube-apiserver" ${priv_arg} ${runtime_config}\
215220
--v=${LOG_LEVEL} \
216221
--cert-dir="${CERT_DIR}" \
217222
--service-account-key-file="${SERVICE_ACCOUNT_KEY}" \
218223
--service-account-lookup="${SERVICE_ACCOUNT_LOOKUP}" \
219224
--admission-control="${ADMISSION_CONTROL}" \
220-
--address="${API_HOST}" \
221-
--port="${API_PORT}" \
225+
--insecure-bind-address="${API_HOST}" \
226+
--insecure-port="${API_PORT}" \
222227
--etcd-servers="http://127.0.0.1:4001" \
223228
--service-cluster-ip-range="10.0.0.0/24" \
224229
--cors-allowed-origins="${API_CORS_ALLOWED_ORIGINS}" >"${APISERVER_LOG}" 2>&1 &
@@ -310,7 +315,7 @@ test_docker
310315
test_apiserver_off
311316

312317
### IF the user didn't supply an output/ for the build... Then we detect.
313-
if [ "$GO_OUT" == "" ]; then
318+
if [ "$GO_OUT" == "" ]; then
314319
detect_binary
315320
fi
316321
echo "Detected host and ready to start services. Doing some housekeeping first..."

hack/verify-flags-underscore.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def main():
232232

233233
if len(bad_lines) != 0:
234234
if not args.skip_exceptions:
235-
print("Found illegal 'flag' usage. If these are false positives you should running `hack/verify-flags-underscore.py -e > hack/verify-flags/exceptions.txt` to update the list.")
235+
print("Found illegal 'flag' usage. If these are false positives you should run `hack/verify-flags-underscore.py -e > hack/verify-flags/exceptions.txt` to update the list.")
236236
bad_lines.sort()
237237
for (relname, line) in bad_lines:
238238
print("%s:%s" % (relname, line))

hack/verify-flags/exceptions.txt

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ examples/elasticsearch/README.md: "cluster_name" : "mytunes-db",
6969
examples/elasticsearch/README.md:"cluster_name" : "mytunes-db",
7070
hack/lib/logging.sh: local source_file=${BASH_SOURCE[$frame_no]}
7171
hack/lib/logging.sh: local source_file=${BASH_SOURCE[$stack_skip]}
72+
hack/local-up-cluster.sh: runtime_config="--runtime-config=\"${RUNTIME_CONFIG}\""
73+
hack/local-up-cluster.sh: runtime_config=""
7274
pkg/cloudprovider/providers/vagrant/vagrant_test.go: testSaltMinionsResponse = []byte(`{ "return": [{"kubernetes-minion-1": {"kernel": "Linux", "domain": "", "zmqversion": "3.2.4", "kernelrelease": "3.11.10-301.fc20.x86_64", "pythonpath": ["/usr/bin", "/usr/lib64/python27.zip", "/usr/lib64/python2.7", "/usr/lib64/python2.7/plat-linux2", "/usr/lib64/python2.7/lib-tk", "/usr/lib64/python2.7/lib-old", "/usr/lib64/python2.7/lib-dynload", "/usr/lib64/python2.7/site-packages", "/usr/lib/python2.7/site-packages"], "etcd_servers": "10.245.1.2", "ip_interfaces": {"lo": ["127.0.0.1"], "docker0": ["172.17.42.1"], "enp0s8": ["10.245.2.2"], "p2p1": ["10.0.2.15"]}, "shell": "/bin/sh", "mem_total": 491, "saltversioninfo": [2014, 1, 7], "osmajorrelease": ["20"], "node_ip": "10.245.2.2", "id": "kubernetes-minion-1", "osrelease": "20", "ps": "ps -efH", "server_id": 1005530826, "num_cpus": 1, "hwaddr_interfaces": {"lo": "00:00:00:00:00:00", "docker0": "56:84:7a:fe:97:99", "enp0s8": "08:00:27:17:c5:0f", "p2p1": "08:00:27:96:96:e1"}, "virtual": "VirtualBox", "osfullname": "Fedora", "master": "kubernetes-master", "ipv4": ["10.0.2.15", "10.245.2.2", "127.0.0.1", "172.17.42.1"], "ipv6": ["::1", "fe80::a00:27ff:fe17:c50f", "fe80::a00:27ff:fe96:96e1"], "cpu_flags": ["fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", "cx8", "apic", "sep", "mtrr", "pge", "mca", "cmov", "pat", "pse36", "clflush", "mmx", "fxsr", "sse", "sse2", "syscall", "nx", "rdtscp", "lm", "constant_tsc", "rep_good", "nopl", "pni", "monitor", "ssse3", "lahf_lm"], "localhost": "kubernetes-minion-1", "lsb_distrib_id": "Fedora", "fqdn_ip4": ["127.0.0.1"], "fqdn_ip6": [], "nodename": "kubernetes-minion-1", "saltversion": "2014.1.7", "saltpath": "/usr/lib/python2.7/site-packages/salt", "pythonversion": [2, 7, 5, "final", 0], "host": "kubernetes-minion-1", "os_family": "RedHat", "oscodename": "Heisenbug", "defaultencoding": "UTF-8", "osfinger": "Fedora-20", "roles": ["kubernetes-pool"], "num_gpus": 1, "cpu_model": "Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz", "fqdn": "kubernetes-minion-1", "osarch": "x86_64", "cpuarch": "x86_64", "gpus": [{"model": "VirtualBox Graphics Adapter", "vendor": "unknown"}], "path": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin", "os": "Fedora", "defaultlanguage": "en_US"}}]}`)
7375
pkg/kubelet/qos/memory_policy_test.go: t.Errorf("oom_score_adj should be between %d and %d, but was %d", test.lowOomScoreAdj, test.highOomScoreAdj, oomScoreAdj)
7476
pkg/kubelet/qos/memory_policy_test.go: highOomScoreAdj int // The min oom_score_adj score the container should be assigned.

0 commit comments

Comments
 (0)