diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 7f1adcc7cba..8065e692026 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -22,6 +22,7 @@ DOCKER_NATIVE=${DOCKER_NATIVE:-""} DOCKER=(docker ${DOCKER_OPTS}) DOCKERIZE_KUBELET=${DOCKERIZE_KUBELET:-""} ALLOW_PRIVILEGED=${ALLOW_PRIVILEGED:-""} +RUNTIME_CONFIG=${RUNTIME_CONFIG:-""} KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. cd "${KUBE_ROOT}" @@ -45,17 +46,17 @@ GO_OUT="" while getopts "o:" OPTION do case $OPTION in - o) + o) echo "skipping build" echo "using source $OPTARG" GO_OUT="$OPTARG" if [ $GO_OUT == "" ]; then echo "You provided an invalid value for the build output directory." - exit + exit fi ;; ?) - usage + usage exit ;; esac @@ -141,7 +142,7 @@ function detect_binary { cleanup_dockerized_kubelet() { - if [[ -e $KUBELET_CIDFILE ]]; then + if [[ -e $KUBELET_CIDFILE ]]; then docker kill $(<$KUBELET_CIDFILE) > /dev/null rm -f $KUBELET_CIDFILE fi @@ -209,16 +210,20 @@ function start_apiserver { if [[ -n "${ALLOW_PRIVILEGED}" ]]; then priv_arg="--allow-privileged " fi + runtime_config="" + if [[ -n "${RUNTIME_CONFIG}" ]]; then + runtime_config="--runtime-config=\"${RUNTIME_CONFIG}\"" + fi APISERVER_LOG=/tmp/kube-apiserver.log - sudo -E "${GO_OUT}/kube-apiserver" ${priv_arg}\ + sudo -E "${GO_OUT}/kube-apiserver" ${priv_arg} ${runtime_config}\ --v=${LOG_LEVEL} \ --cert-dir="${CERT_DIR}" \ --service-account-key-file="${SERVICE_ACCOUNT_KEY}" \ --service-account-lookup="${SERVICE_ACCOUNT_LOOKUP}" \ --admission-control="${ADMISSION_CONTROL}" \ - --address="${API_HOST}" \ - --port="${API_PORT}" \ + --insecure-bind-address="${API_HOST}" \ + --insecure-port="${API_PORT}" \ --etcd-servers="http://127.0.0.1:4001" \ --service-cluster-ip-range="10.0.0.0/24" \ --cors-allowed-origins="${API_CORS_ALLOWED_ORIGINS}" >"${APISERVER_LOG}" 2>&1 & @@ -310,7 +315,7 @@ test_docker test_apiserver_off ### IF the user didn't supply an output/ for the build... Then we detect. -if [ "$GO_OUT" == "" ]; then +if [ "$GO_OUT" == "" ]; then detect_binary fi echo "Detected host and ready to start services. Doing some housekeeping first..." diff --git a/hack/verify-flags-underscore.py b/hack/verify-flags-underscore.py index 008e96dd3ea..850bf3e851c 100755 --- a/hack/verify-flags-underscore.py +++ b/hack/verify-flags-underscore.py @@ -232,7 +232,7 @@ def main(): if len(bad_lines) != 0: if not args.skip_exceptions: - 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.") + 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.") bad_lines.sort() for (relname, line) in bad_lines: print("%s:%s" % (relname, line)) diff --git a/hack/verify-flags/exceptions.txt b/hack/verify-flags/exceptions.txt index 7f55ee626b2..701941273c6 100644 --- a/hack/verify-flags/exceptions.txt +++ b/hack/verify-flags/exceptions.txt @@ -69,6 +69,8 @@ examples/elasticsearch/README.md: "cluster_name" : "mytunes-db", examples/elasticsearch/README.md:"cluster_name" : "mytunes-db", hack/lib/logging.sh: local source_file=${BASH_SOURCE[$frame_no]} hack/lib/logging.sh: local source_file=${BASH_SOURCE[$stack_skip]} +hack/local-up-cluster.sh: runtime_config="--runtime-config=\"${RUNTIME_CONFIG}\"" +hack/local-up-cluster.sh: runtime_config="" 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"}}]}`) 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) pkg/kubelet/qos/memory_policy_test.go: highOomScoreAdj int // The min oom_score_adj score the container should be assigned.