(List (= scope= flags=0 words=[] bindings=[('DOCKER_OPTS', {[VarSub DOCKER_OPTS test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('DOCKER', {[Array {[LIT_CHARS docker]} {[VarSub DOCKER_OPTS]}]})]) (= scope= flags=0 words=[] bindings=[('DOCKERIZE_KUBELET', {[VarSub DOCKERIZE_KUBELET test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('ALLOW_PRIVILEGED', {[VarSub ALLOW_PRIVILEGED test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('ALLOW_SECURITY_CONTEXT', {[VarSub ALLOW_SECURITY_CONTEXT test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('RUNTIME_CONFIG', {[VarSub RUNTIME_CONFIG test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('NET_PLUGIN', {[VarSub NET_PLUGIN test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('NET_PLUGIN_DIR', {[VarSub NET_PLUGIN_DIR test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('KUBE_ROOT', {[ComSub (Com {[LIT_CHARS dirname]} {[DQ [VarSub BASH_SOURCE]]})] [LIT_CHARS /..]})]) (= scope= flags=0 words=[] bindings=[('SERVICE_CLUSTER_IP_RANGE', {[VarSub SERVICE_CLUSTER_IP_RANGE test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS 10.0.0.0] [LIT_SLASH /] [LIT_CHARS 24]}]})]) (= scope= flags=0 words=[] bindings=[('ENABLE_CLUSTER_DNS', {[VarSub KUBE_ENABLE_CLUSTER_DNS test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS false]}]})]) (= scope= flags=0 words=[] bindings=[('DNS_SERVER_IP', {[VarSub KUBE_DNS_SERVER_IP test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS 10.0.0.10]}]})]) (= scope= flags=0 words=[] bindings=[('DNS_DOMAIN', {[VarSub KUBE_DNS_NAME test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS cluster.local]]}]})]) (= scope= flags=0 words=[] bindings=[('DNS_REPLICAS', {[VarSub KUBE_DNS_REPLICAS test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS 1]}]})]) (= scope= flags=0 words=[] bindings=[('KUBECTL', {[VarSub KUBECTL test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS cluster] [LIT_SLASH /] [LIT_CHARS kubectl.sh]}]})]) (= scope= flags=0 words=[] bindings=[('WAIT_FOR_URL_API_SERVER', {[VarSub WAIT_FOR_URL_API_SERVER test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS 10]}]})]) (= scope= flags=0 words=[] bindings=[('ENABLE_DAEMON', {[VarSub ENABLE_DAEMON test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS false]}]})]) (= scope= flags=0 words=[] bindings=[('HOSTNAME_OVERRIDE', {[VarSub HOSTNAME_OVERRIDE test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS 127.0.0.1]]}]})]) (= scope= flags=0 words=[] bindings=[('CLOUD_PROVIDER', {[VarSub CLOUD_PROVIDER test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('CLOUD_CONFIG', {[VarSub CLOUD_CONFIG test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('FEATURE_GATES', {[VarSub FEATURE_GATES test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS "AllAlpha=true"]]}]})]) (= scope= flags=0 words=[] bindings=[('KUBE_CACHE_MUTATION_DETECTOR', {[DQ [VarSub KUBE_CACHE_MUTATION_DETECTOR test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS true]}]]})]) (= scope= flags=1 words=[{[LIT_CHARS KUBE_CACHE_MUTATION_DETECTOR]}] bindings=[]) (= scope= flags=0 words=[] bindings=[('START_MODE', {[VarSub START_MODE test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS all]]}]})]) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub CLOUD_PROVIDER]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS openstack]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub CLOUD_CONFIG]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ ]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Missing CLOUD_CONFIG env for OpenStack provider!"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_OTHER "!"]} {[LIT_CHARS -f]} {[DQ [VarSub CLOUD_CONFIG]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cloud config "][VarSub CLOUD_CONFIG][LIT_CHARS " doesn't exit"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [ComSub (Com {[LIT_CHARS id]} {[LIT_CHARS -u]})]]} {[LIT_NEQUAL "!="]} {[DQ [LIT_CHARS 0]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "WARNING : This script MAY be run as root for docker socket / iptables functionality; if failures occur, retry as root."]]} < (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) ) (Com {[LIT_CHARS set]} {[LIT_CHARS -e]} ) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /hack/lib/init.sh]]} ) (FunctionDef usage [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "This script starts a local kube cluster. "]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Example 1: hack/local-up-cluster.sh -o _output/dockerized/bin/linux/amd64/ (run from docker output)"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Example 2: hack/local-up-cluster.sh -O (auto-guess the bin path for your platform)"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Example 3: hack/local-up-cluster.sh (build a local copy of the source)"]]} ) ) ) (FunctionDef guess_built_binary_path [] (List (= scope= flags=0 words=[] bindings=[('hyperkube_path', {[ComSub (Com {[LIT_CHARS kube] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS util] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS find-binary]} {[DQ [LIT_CHARS hyperkube]]})]})]) (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub hyperkube_path]]}}) (Com {[LIT_CHARS return]} ) ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[DQ [ComSub (Com {[LIT_CHARS dirname]} {[DQ [VarSub hyperkube_path]]})]]} ) ) ) (= scope= flags=0 words=[] bindings=[('GO_OUT', {[DQ ]})]) (While (Com {[LIT_CHARS getopts]} {[DQ [LIT_CHARS "o:O"]]} {[LIT_CHARS OPTION]} ) (Case to_match={[VarSub OPTION]}, pat_word_list=[[{[LIT_CHARS o]}], [{[LIT_CHARS O]}], [{[LIT_OTHER "?"]}]] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "skipping build"]]} ) (= scope= flags=0 words=[] bindings=[('GO_OUT', {[DQ [VarSub OPTARG]]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "using source "][VarSub GO_OUT]]} ) ) (List (= scope= flags=0 words=[] bindings=[('GO_OUT', {[ComSub (Com {[LIT_CHARS guess_built_binary_path]})]})]) (If (Com {[LIT_DBRACKET_LIKE "["]} {[VarSub GO_OUT]} {[LIT_DBRACKET_LIKE "=="]} {[DQ ]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Could not guess the correct output directory to use."]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) (List (Com {[LIT_CHARS usage]} ) (Com {[LIT_CHARS exit]} ) ) ) ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [LIT_CHARS x][VarSub GO_OUT]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS x]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS make]} {[LIT_CHARS -C]} {[DQ [VarSub KUBE_ROOT]]} {[LIT_VAR_LIKE "WHAT="] [DQ [LIT_CHARS "cmd/kubectl cmd/hyperkube"]] =} ) (ElseTrue) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "skipped the build."]]} ) ) (FunctionDef test_docker [] (List (Com {[VarSub DOCKER bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]} {[LIT_CHARS ps]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2), (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), > ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub ?]]} {[LIT_NEQUAL "!="]} {[DQ [LIT_CHARS 0]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Failed to successfully run 'docker ps', please verify that docker is installed and "][\ LIT_ESCAPED_CHAR "\\$"][LIT_CHARS "DOCKER_HOST is set correctly."]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef test_openssl_installed [] (List (Com {[LIT_CHARS openssl]} {[LIT_CHARS version]} < (DescriptorRedirectNode target={[LIT_CHARS /dev/null]} &"> 1), > ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub ?]]} {[LIT_NEQUAL "!="]} {[DQ [LIT_CHARS 0]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Failed to run openssl. Please ensure openssl is installed"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (Com {[LIT_CHARS set]} {[LIT_OTHER "+"] [LIT_CHARS e]} ) (= scope= flags=0 words=[] bindings=[('API_PORT', {[VarSub API_PORT test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS 8080]}]})]) (= scope= flags=0 words=[] bindings=[('API_SECURE_PORT', {[VarSub API_SECURE_PORT test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS 6443]}]})]) (= scope= flags=0 words=[] bindings=[('API_HOST', {[VarSub API_HOST test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS localhost]}]})]) (= scope= flags=0 words=[] bindings=[('API_HOST_IP', {[VarSub API_HOST_IP test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS 127.0.0.1]]}]})]) (= scope= flags=0 words=[] bindings=[('API_BIND_ADDR', {[VarSub API_BIND_ADDR test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS 0.0.0.0]]}]})]) (= scope= flags=0 words=[] bindings=[('KUBELET_HOST', {[VarSub KUBELET_HOST test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS 127.0.0.1]]}]})]) (= scope= flags=0 words=[] bindings=[('API_CORS_ALLOWED_ORIGINS', {[VarSub API_CORS_ALLOWED_ORIGINS test_op=VS_TEST_COLON_HYPHEN {[LIT_SLASH /] [LIT_CHARS "127.0.0.1(:[0-9]+)?"] [LIT_OTHER "$"] [LIT_CHARS ","] [LIT_SLASH /] [LIT_CHARS "localhost(:[0-9]+)?"] [LIT_OTHER "$"]}]})]) (= scope= flags=0 words=[] bindings=[('KUBELET_PORT', {[VarSub KUBELET_PORT test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS 10250]}]})]) (= scope= flags=0 words=[] bindings=[('LOG_LEVEL', {[VarSub LOG_LEVEL test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS 3]}]})]) (= scope= flags=0 words=[] bindings=[('CONTAINER_RUNTIME', {[VarSub CONTAINER_RUNTIME test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS docker]]}]})]) (= scope= flags=0 words=[] bindings=[('CONTAINER_RUNTIME_ENDPOINT', {[VarSub CONTAINER_RUNTIME_ENDPOINT test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('IMAGE_SERVICE_ENDPOINT', {[VarSub IMAGE_SERVICE_ENDPOINT test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('RKT_PATH', {[VarSub RKT_PATH test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('RKT_STAGE1_IMAGE', {[VarSub RKT_STAGE1_IMAGE test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (= scope= flags=0 words=[] bindings=[('CHAOS_CHANCE', {[VarSub CHAOS_CHANCE test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS 0.0]}]})]) (= scope= flags=0 words=[] bindings=[('CPU_CFS_QUOTA', {[VarSub CPU_CFS_QUOTA test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS true]}]})]) (= scope= flags=0 words=[] bindings=[('ENABLE_HOSTPATH_PROVISIONER', {[VarSub ENABLE_HOSTPATH_PROVISIONER test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS false]]}]})]) (= scope= flags=0 words=[] bindings=[('CLAIM_BINDER_SYNC_PERIOD', {[VarSub CLAIM_BINDER_SYNC_PERIOD test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS 15s]]}]})]) (= scope= flags=0 words=[] bindings=[('ENABLE_CONTROLLER_ATTACH_DETACH', {[VarSub ENABLE_CONTROLLER_ATTACH_DETACH test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS true]]}]})]) (= scope= flags=0 words=[] bindings=[('CERT_DIR', {[VarSub CERT_DIR test_op=VS_TEST_COLON_HYPHEN {[DQ [LIT_CHARS /var/run/kubernetes]]}]})]) (= scope= flags=0 words=[] bindings=[('ROOT_CA_FILE', {[VarSub CERT_DIR] [LIT_CHARS /apiserver.crt]})]) (= scope= flags=0 words=[] bindings=[('EXPERIMENTAL_RUNTIME_INTEGRATION_TYPE', {[VarSub EXPERIMENTAL_RUNTIME_INTEGRATION_TYPE test_op=VS_TEST_COLON_HYPHEN {[DQ ]}]})]) (FunctionDef test_apiserver_off [] (List (If (DBracket {B2 BINARY_INT_GT {[DQ [VarSub API_PORT]]} {[DQ [LIT_CHARS 0]]}}) (List (Com {[LIT_CHARS curl]} {[LIT_CHARS --silent]} {[LIT_CHARS -g]} {[VarSub API_HOST] [LIT_OTHER ":"] [VarSub API_PORT]} ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_OTHER "!"]} {[VarSub ?]} {[LIT_CHARS -eq]} {[LIT_CHARS 0]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "API SERVER insecure port is free, proceeding..."]]} ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "ERROR starting API SERVER, exiting. Some process on "][VarSub API_HOST][LIT_CHARS " is serving already on "][VarSub API_PORT]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (Com {[LIT_CHARS curl]} {[LIT_CHARS --silent]} {[LIT_CHARS -k]} {[LIT_CHARS -g]} {[VarSub API_HOST] [LIT_OTHER ":"] [VarSub API_SECURE_PORT]} ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_OTHER "!"]} {[VarSub ?]} {[LIT_CHARS -eq]} {[LIT_CHARS 0]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "API SERVER secure port is free, proceeding..."]]} ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "ERROR starting API SERVER, exiting. Some process on "][VarSub API_HOST][LIT_CHARS " is serving already on "][VarSub API_SECURE_PORT]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef detect_binary [] (List (Case to_match={[DQ [ComSub (Com {[LIT_CHARS uname]} {[LIT_CHARS -s]})]]}, pat_word_list=[[{[LIT_CHARS Darwin]}], [{[LIT_CHARS Linux]}], [{[LIT_OTHER "*"]}]] (= scope= flags=0 words=[] bindings=[('host_os', {[LIT_CHARS darwin]})]) (= scope= flags=0 words=[] bindings=[('host_os', {[LIT_CHARS linux]})]) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Unsupported host OS. Must be Linux or Mac OS X."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (Case to_match={[DQ [ComSub (Com {[LIT_CHARS uname]} {[LIT_CHARS -m]})]]}, pat_word_list=[[{[LIT_CHARS x86_64] [LIT_OTHER "*"]}], [{[LIT_CHARS i] [LIT_OTHER "?"] [LIT_CHARS 86_64] [LIT_OTHER "*"]}], [{[LIT_CHARS amd64] [LIT_OTHER "*"]}], [{[LIT_CHARS aarch64] [LIT_OTHER "*"]}], [{[LIT_CHARS arm64] [LIT_OTHER "*"]}], [{[LIT_CHARS arm] [LIT_OTHER "*"]}], [{[LIT_CHARS i] [LIT_OTHER "?"] [LIT_CHARS 86] [LIT_OTHER "*"]}], [{[LIT_CHARS s390x] [LIT_OTHER "*"]}], [{[LIT_CHARS ppc64le] [LIT_OTHER "*"]}], [{[LIT_OTHER "*"]}]] (= scope= flags=0 words=[] bindings=[('host_arch', {[LIT_CHARS amd64]})]) (= scope= flags=0 words=[] bindings=[('host_arch', {[LIT_CHARS amd64]})]) (= scope= flags=0 words=[] bindings=[('host_arch', {[LIT_CHARS amd64]})]) (= scope= flags=0 words=[] bindings=[('host_arch', {[LIT_CHARS arm64]})]) (= scope= flags=0 words=[] bindings=[('host_arch', {[LIT_CHARS arm64]})]) (= scope= flags=0 words=[] bindings=[('host_arch', {[LIT_CHARS arm]})]) (= scope= flags=0 words=[] bindings=[('host_arch', {[LIT_CHARS x86]})]) (= scope= flags=0 words=[] bindings=[('host_arch', {[LIT_CHARS s390x]})]) (= scope= flags=0 words=[] bindings=[('host_arch', {[LIT_CHARS ppc64le]})]) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (= scope= flags=0 words=[] bindings=[('GO_OUT', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /_output/local/bin/][VarSub host_os][LIT_CHARS /][VarSub host_arch]]})]) ) ) (FunctionDef cleanup_dockerized_kubelet [] (If (DBracket {B1 UNARY_FILE_e {[VarSub KUBELET_CIDFILE]}}) (List (Com {[LIT_CHARS docker]} {[LIT_CHARS kill]} {[ComSub (Com redirects=[(FilenameRedirectNode filename={[VarSub KUBELET_CIDFILE]} 0)])]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), > ) (Com {[LIT_CHARS rm]} {[LIT_CHARS -f]} {[VarSub KUBELET_CIDFILE]} ) ) ) ) (FunctionDef cleanup [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning up..."]]} ) (AndOr OP_AND_IF (DBracket {B1 UNARY_STRING_n {[DQ [VarSub APISERVER_PID test_op=VS_TEST_HYPHEN {}]]}}) (= scope= flags=0 words=[] bindings=[('APISERVER_PIDS', {[ComSub (List (Com {[LIT_CHARS pgrep]} {[LIT_CHARS -P]} {[VarSub APISERVER_PID]}) (Com {[LIT_CHARS ps]} {[LIT_CHARS -o]} {[LIT_VAR_LIKE "pid="] =} {[LIT_CHARS -p]} {[VarSub APISERVER_PID]}) )]})]) ) (AndOr OP_AND_IF (DBracket {B1 UNARY_STRING_n {[DQ [VarSub APISERVER_PIDS test_op=VS_TEST_HYPHEN {}]]}}) (Com {[LIT_CHARS sudo]} {[LIT_CHARS kill]} {[VarSub APISERVER_PIDS]} ) ) (AndOr OP_AND_IF (DBracket {B1 UNARY_STRING_n {[DQ [VarSub CTLRMGR_PID test_op=VS_TEST_HYPHEN {}]]}}) (= scope= flags=0 words=[] bindings=[('CTLRMGR_PIDS', {[ComSub (List (Com {[LIT_CHARS pgrep]} {[LIT_CHARS -P]} {[VarSub CTLRMGR_PID]}) (Com {[LIT_CHARS ps]} {[LIT_CHARS -o]} {[LIT_VAR_LIKE "pid="] =} {[LIT_CHARS -p]} {[VarSub CTLRMGR_PID]}) )]})]) ) (AndOr OP_AND_IF (DBracket {B1 UNARY_STRING_n {[DQ [VarSub CTLRMGR_PIDS test_op=VS_TEST_HYPHEN {}]]}}) (Com {[LIT_CHARS sudo]} {[LIT_CHARS kill]} {[VarSub CTLRMGR_PIDS]} ) ) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub DOCKERIZE_KUBELET]]}}) (Com {[LIT_CHARS cleanup_dockerized_kubelet]} ) (ElseTrue) (List (AndOr OP_AND_IF (DBracket {B1 UNARY_STRING_n {[DQ [VarSub KUBELET_PID test_op=VS_TEST_HYPHEN {}]]}}) (= scope= flags=0 words=[] bindings=[('KUBELET_PIDS', {[ComSub (List (Com {[LIT_CHARS pgrep]} {[LIT_CHARS -P]} {[VarSub KUBELET_PID]}) (Com {[LIT_CHARS ps]} {[LIT_CHARS -o]} {[LIT_VAR_LIKE "pid="] =} {[LIT_CHARS -p]} {[VarSub KUBELET_PID]}) )]})]) ) (AndOr OP_AND_IF (DBracket {B1 UNARY_STRING_n {[DQ [VarSub KUBELET_PIDS test_op=VS_TEST_HYPHEN {}]]}}) (Com {[LIT_CHARS sudo]} {[LIT_CHARS kill]} {[VarSub KUBELET_PIDS]} ) ) ) ) (AndOr OP_AND_IF (DBracket {B1 UNARY_STRING_n {[DQ [VarSub PROXY_PID test_op=VS_TEST_HYPHEN {}]]}}) (= scope= flags=0 words=[] bindings=[('PROXY_PIDS', {[ComSub (List (Com {[LIT_CHARS pgrep]} {[LIT_CHARS -P]} {[VarSub PROXY_PID]}) (Com {[LIT_CHARS ps]} {[LIT_CHARS -o]} {[LIT_VAR_LIKE "pid="] =} {[LIT_CHARS -p]} {[VarSub PROXY_PID]}) )]})]) ) (AndOr OP_AND_IF (DBracket {B1 UNARY_STRING_n {[DQ [VarSub PROXY_PIDS test_op=VS_TEST_HYPHEN {}]]}}) (Com {[LIT_CHARS sudo]} {[LIT_CHARS kill]} {[VarSub PROXY_PIDS]} ) ) (AndOr OP_AND_IF (DBracket {B1 UNARY_STRING_n {[DQ [VarSub SCHEDULER_PID test_op=VS_TEST_HYPHEN {}]]}}) (= scope= flags=0 words=[] bindings=[('SCHEDULER_PIDS', {[ComSub (List (Com {[LIT_CHARS pgrep]} {[LIT_CHARS -P]} {[VarSub SCHEDULER_PID]}) (Com {[LIT_CHARS ps]} {[LIT_CHARS -o]} {[LIT_VAR_LIKE "pid="] =} {[LIT_CHARS -p]} {[VarSub SCHEDULER_PID]}) )]})]) ) (AndOr OP_AND_IF (DBracket {B1 UNARY_STRING_n {[DQ [VarSub SCHEDULER_PIDS test_op=VS_TEST_HYPHEN {}]]}}) (Com {[LIT_CHARS sudo]} {[LIT_CHARS kill]} {[VarSub SCHEDULER_PIDS]} ) ) (AndOr OP_AND_IF (DBracket {B1 UNARY_STRING_n {[DQ [VarSub ETCD_PID test_op=VS_TEST_HYPHEN {}]]}}) (Com {[LIT_CHARS kube] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS etcd] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS stop]} ) ) (AndOr OP_AND_IF (DBracket {B1 UNARY_STRING_n {[DQ [VarSub ETCD_DIR test_op=VS_TEST_HYPHEN {}]]}}) (Com {[LIT_CHARS kube] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS etcd] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS clean_etcd_dir]} ) ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 0]} ) ) ) (FunctionDef start_etcd [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Starting etcd"]]} ) (Com {[LIT_CHARS kube] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS etcd] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS start]} ) ) ) (FunctionDef set_service_accounts [] (List (= scope= flags=0 words=[] bindings=[('SERVICE_ACCOUNT_LOOKUP', {[VarSub SERVICE_ACCOUNT_LOOKUP test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS false]}]})]) (= scope= flags=0 words=[] bindings=[('SERVICE_ACCOUNT_KEY', {[VarSub SERVICE_ACCOUNT_KEY test_op=VS_TEST_COLON_HYPHEN {[LIT_SLASH /] [LIT_CHARS tmp] [LIT_SLASH /] [LIT_CHARS kube-serviceaccount.key]}]})]) (If (DBracket {B! {B1 UNARY_FILE_f {[DQ [VarSub SERVICE_ACCOUNT_KEY]]}}}) (List (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [ComSub (Com {[LIT_CHARS dirname]} {[VarSub SERVICE_ACCOUNT_KEY]})]]} ) (Com {[LIT_CHARS openssl]} {[LIT_CHARS genrsa]} {[LIT_CHARS -out]} {[DQ [VarSub SERVICE_ACCOUNT_KEY]]} {[LIT_CHARS 2048]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2), > ) ) ) ) ) (FunctionDef start_apiserver [] (List (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub ALLOW_SECURITY_CONTEXT]]}}) (= scope= flags=0 words=[] bindings=[('ADMISSION_CONTROL', {[LIT_CHARS NamespaceLifecycle] [LIT_COMMA ","] [LIT_CHARS LimitRanger] [LIT_COMMA ","] [LIT_CHARS SecurityContextDeny] [LIT_COMMA ","] [LIT_CHARS ServiceAccount] [LIT_COMMA ","] [LIT_CHARS ResourceQuota] [LIT_COMMA ","] [LIT_CHARS DefaultStorageClass]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('ADMISSION_CONTROL', {[LIT_CHARS NamespaceLifecycle] [LIT_COMMA ","] [LIT_CHARS LimitRanger] [LIT_COMMA ","] [LIT_CHARS ServiceAccount] [LIT_COMMA ","] [LIT_CHARS ResourceQuota] [LIT_COMMA ","] [LIT_CHARS DefaultStorageClass]})]) ) (= scope= flags=0 words=[] bindings=[('anytoken_arg', {[DQ ]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub ALLOW_ANY_TOKEN test_op=VS_TEST_COLON_HYPHEN {}]]}}) (= scope= flags=0 words=[] bindings=[('anytoken_arg', {[DQ [LIT_CHARS "--insecure-allow-any-token "]]})]) ) (= scope= flags=0 words=[] bindings=[('authorizer_arg', {[DQ ]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub ENABLE_RBAC test_op=VS_TEST_COLON_HYPHEN {}]]}}) (= scope= flags=0 words=[] bindings=[('authorizer_arg', {[DQ [LIT_CHARS "--authorization-mode=RBAC "]]})]) ) (= scope= flags=0 words=[] bindings=[('priv_arg', {[DQ ]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub ALLOW_PRIVILEGED]]}}) (= scope= flags=0 words=[] bindings=[('priv_arg', {[DQ [LIT_CHARS "--allow-privileged "]]})]) ) (= scope= flags=0 words=[] bindings=[('runtime_config', {[DQ ]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub RUNTIME_CONFIG]]}}) (= scope= flags=0 words=[] bindings=[('runtime_config', {[DQ [LIT_CHARS "--runtime-config="][VarSub RUNTIME_CONFIG]]})]) ) (= scope= flags=0 words=[] bindings=[('advertise_address', {[DQ ]})]) (If (DBracket {B2 BINARY_STRING_NOT_EQUAL {[DQ [VarSub API_HOST]]} {[DQ [LIT_CHARS 127.0.0.1]]}}) (= scope= flags=0 words=[] bindings=[('advertise_address', {[DQ [LIT_CHARS "--advertise_address="][VarSub API_HOST_IP]]})]) ) (Com {[LIT_CHARS sudo]} {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub CERT_DIR]]} ) (= scope= flags=0 words=[] bindings=[('APISERVER_LOG', {[LIT_CHARS /tmp/kube-apiserver.log]})]) (Fork (Com {[LIT_CHARS sudo]} {[LIT_CHARS -E]} {[DQ [VarSub GO_OUT][LIT_CHARS /hyperkube]]} {[LIT_CHARS apiserver]} {[VarSub anytoken_arg]} {[VarSub authorizer_arg]} {[VarSub priv_arg]} {[VarSub runtime_config]} {[VarSub advertise_address]} {[LIT_CHARS --v] [LIT_DBRACKET_LIKE "="] [VarSub LOG_LEVEL]} {[LIT_CHARS --cert-dir] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CERT_DIR]]} {[LIT_CHARS --service-account-key-file] [LIT_DBRACKET_LIKE "="] [DQ [VarSub SERVICE_ACCOUNT_KEY]]} {[LIT_CHARS --service-account-lookup] [LIT_DBRACKET_LIKE "="] [DQ [VarSub SERVICE_ACCOUNT_LOOKUP]]} {[LIT_CHARS --admission-control] [LIT_DBRACKET_LIKE "="] [DQ [VarSub ADMISSION_CONTROL]]} {[LIT_CHARS --bind-address] [LIT_DBRACKET_LIKE "="] [DQ [VarSub API_BIND_ADDR]]} {[LIT_CHARS --secure-port] [LIT_DBRACKET_LIKE "="] [DQ [VarSub API_SECURE_PORT]]} {[LIT_CHARS --tls-ca-file] [LIT_DBRACKET_LIKE "="] [DQ [VarSub ROOT_CA_FILE]]} {[LIT_CHARS --insecure-bind-address] [LIT_DBRACKET_LIKE "="] [DQ [VarSub API_HOST_IP]]} {[LIT_CHARS --insecure-port] [LIT_DBRACKET_LIKE "="] [DQ [VarSub API_PORT]]} {[LIT_CHARS --etcd-servers] [LIT_DBRACKET_LIKE "="] [DQ [LIT_CHARS "http://"][VarSub ETCD_HOST][LIT_CHARS ":"][VarSub ETCD_PORT]]} {[LIT_CHARS --service-cluster-ip-range] [LIT_DBRACKET_LIKE "="] [DQ [VarSub SERVICE_CLUSTER_IP_RANGE]]} {[LIT_CHARS --feature-gates] [LIT_DBRACKET_LIKE "="] [DQ [VarSub FEATURE_GATES]]} {[LIT_CHARS --cloud-provider] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CLOUD_PROVIDER]]} {[LIT_CHARS --cloud-config] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CLOUD_CONFIG]]} {[LIT_CHARS --cors-allowed-origins] [LIT_DBRACKET_LIKE "="] [DQ [VarSub API_CORS_ALLOWED_ORIGINS]]} < (FilenameRedirectNode filename={[DQ [VarSub APISERVER_LOG]]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) ) (= scope= flags=0 words=[] bindings=[('APISERVER_PID', {[VarSub !]})]) (Pipeline (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "apiVersion: v1\n"][LIT_CHARS "kind: Config\n"][LIT_CHARS "clusters:\n"][LIT_CHARS " - cluster:\n"][LIT_CHARS " certificate-authority: "][VarSub ROOT_CA_FILE][LIT_CHARS "\n"][LIT_CHARS " server: https://"][VarSub API_HOST][LIT_CHARS ":"][VarSub API_SECURE_PORT][LIT_CHARS "/\n"][LIT_CHARS " name: local-up-cluster\n"][LIT_CHARS "contexts:\n"][LIT_CHARS " - context:\n"][LIT_CHARS " cluster: local-up-cluster\n"][LIT_CHARS " name: service-to-apiserver\n"][LIT_CHARS "current-context: service-to-apiserver\n"]]} 0), > ) (Com {[LIT_CHARS sudo]} {[LIT_CHARS tee]} {[DQ [VarSub CERT_DIR]] [LIT_CHARS /kubeconfig]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), > ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Waiting for apiserver to come up"]]} ) (AndOr OP_OR_IF (Com {[LIT_CHARS kube] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS util] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS wait_for_url]} {[DQ [LIT_CHARS "https://"][VarSub API_HOST][LIT_CHARS ":"][VarSub API_SECURE_PORT][LIT_CHARS /api/v1/pods]]} {[DQ [LIT_CHARS "apiserver: "]]} {[LIT_CHARS 1]} {[VarSub WAIT_FOR_URL_API_SERVER]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) (FunctionDef start_controller_manager [] (List (= scope= flags=0 words=[] bindings=[('node_cidr_args', {[DQ ]})]) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub NET_PLUGIN]]} {[DQ [LIT_CHARS kubenet]]}}) (= scope= flags=0 words=[] bindings=[('node_cidr_args', {[DQ [LIT_CHARS "--allocate-node-cidrs=true --cluster-cidr=10.1.0.0/16 "]]})]) ) (= scope= flags=0 words=[] bindings=[('CTLRMGR_LOG', {[LIT_CHARS /tmp/kube-controller-manager.log]})]) (Fork (Com {[LIT_CHARS sudo]} {[LIT_CHARS -E]} {[DQ [VarSub GO_OUT][LIT_CHARS /hyperkube]]} {[LIT_CHARS controller-manager]} {[LIT_CHARS --v] [LIT_DBRACKET_LIKE "="] [VarSub LOG_LEVEL]} {[LIT_CHARS --service-account-private-key-file] [LIT_DBRACKET_LIKE "="] [DQ [VarSub SERVICE_ACCOUNT_KEY]]} {[LIT_CHARS --root-ca-file] [LIT_DBRACKET_LIKE "="] [DQ [VarSub ROOT_CA_FILE]]} {[LIT_CHARS --enable-hostpath-provisioner] [LIT_DBRACKET_LIKE "="] [DQ [VarSub ENABLE_HOSTPATH_PROVISIONER]]} {[VarSub node_cidr_args]} {[LIT_CHARS --pvclaimbinder-sync-period] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CLAIM_BINDER_SYNC_PERIOD]]} {[LIT_CHARS --feature-gates] [LIT_DBRACKET_LIKE "="] [DQ [VarSub FEATURE_GATES]]} {[LIT_CHARS --cloud-provider] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CLOUD_PROVIDER]]} {[LIT_CHARS --cloud-config] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CLOUD_CONFIG]]} {[LIT_CHARS --kubeconfig]} {[DQ [VarSub CERT_DIR]] [LIT_CHARS /kubeconfig]} {[LIT_CHARS --master] [LIT_DBRACKET_LIKE "="] [DQ [LIT_CHARS "https://"][VarSub API_HOST][LIT_CHARS ":"][VarSub API_SECURE_PORT]]} < (FilenameRedirectNode filename={[DQ [VarSub CTLRMGR_LOG]]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) ) (= scope= flags=0 words=[] bindings=[('CTLRMGR_PID', {[VarSub !]})]) ) ) (FunctionDef start_kubelet [] (List (= scope= flags=0 words=[] bindings=[('KUBELET_LOG', {[LIT_CHARS /tmp/kubelet.log]})]) (= scope= flags=0 words=[] bindings=[('priv_arg', {[DQ ]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub ALLOW_PRIVILEGED]]}}) (= scope= flags=0 words=[] bindings=[('priv_arg', {[DQ [LIT_CHARS "--allow-privileged "]]})]) ) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[LIT_CHARS /var/lib/kubelet]} ) (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub DOCKERIZE_KUBELET]]}}) (List (If (List (Fork (Com {[LIT_CHARS which]} {[LIT_CHARS selinuxenabled]} ) ) (AndOr OP_AND_IF (Com < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), > ) (AndOr OP_AND_IF (Com {[LIT_CHARS selinuxenabled]} ) (Com {[LIT_CHARS which]} {[LIT_CHARS chcon]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), > ) ) ) ) (If (DBracket {B! {B2 BINARY_STRING_TILDE_EQUAL {[ComSub (Com {[LIT_CHARS ls]} {[LIT_CHARS -Zd]} {[LIT_CHARS /var/lib/kubelet]})]} {[LIT_CHARS system_u] [LIT_OTHER ":"] [LIT_CHARS object_r] [LIT_OTHER ":"] [LIT_CHARS svirt_sandbox_file_t] [LIT_OTHER ":"] [LIT_CHARS s0]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Applying SELinux label to /var/lib/kubelet directory."]]} ) (If (Pipeline! (Com {[LIT_CHARS sudo]} {[LIT_CHARS chcon]} {[LIT_CHARS -Rt]} {[LIT_CHARS svirt_sandbox_file_t]} {[LIT_CHARS /var/lib/kubelet]} ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Failed to apply selinux label to /var/lib/kubelet."]]} ) ) ) ) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub ENABLE_CLUSTER_DNS]]} {[LIT_CHARS true]}}) (= scope= flags=0 words=[] bindings=[('dns_args', {[DQ [LIT_CHARS "--cluster-dns="][VarSub DNS_SERVER_IP][LIT_CHARS " --cluster-domain="][VarSub DNS_DOMAIN]]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('dns_args', {[DQ [LIT_CHARS "--cluster-dns=8.8.8.8"]]})]) ) (= scope= flags=0 words=[] bindings=[('net_plugin_args', {[DQ ]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub NET_PLUGIN]]}}) (= scope= flags=0 words=[] bindings=[('net_plugin_args', {[DQ [LIT_CHARS "--network-plugin="][VarSub NET_PLUGIN]]})]) ) (= scope= flags=0 words=[] bindings=[('net_plugin_dir_args', {[DQ ]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub NET_PLUGIN_DIR]]}}) (= scope= flags=0 words=[] bindings=[('net_plugin_dir_args', {[DQ [LIT_CHARS "--network-plugin-dir="][VarSub NET_PLUGIN_DIR]]})]) ) (= scope= flags=0 words=[] bindings=[('container_runtime_endpoint_args', {[DQ ]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub CONTAINER_RUNTIME_ENDPOINT]]}}) (= scope= flags=0 words=[] bindings=[('container_runtime_endpoint_args', {[DQ [LIT_CHARS "--container-runtime-endpoint="][VarSub CONTAINER_RUNTIME_ENDPOINT]]})]) ) (= scope= flags=0 words=[] bindings=[('image_service_endpoint_args', {[DQ ]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub IMAGE_SERVICE_ENDPOINT]]}}) (= scope= flags=0 words=[] bindings=[('image_service_endpoint_args', {[DQ [LIT_CHARS "--image-service-endpoint="][VarSub IMAGE_SERVICE_ENDPOINT]]})]) ) (Fork (Com {[LIT_CHARS sudo]} {[LIT_CHARS -E]} {[DQ [VarSub GO_OUT][LIT_CHARS /hyperkube]]} {[LIT_CHARS kubelet]} {[VarSub priv_arg]} {[LIT_CHARS --v] [LIT_DBRACKET_LIKE "="] [VarSub LOG_LEVEL]} {[LIT_CHARS --chaos-chance] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CHAOS_CHANCE]]} {[LIT_CHARS --container-runtime] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CONTAINER_RUNTIME]]} {[LIT_CHARS --experimental-runtime-integration-type] [LIT_DBRACKET_LIKE "="] [DQ [VarSub EXPERIMENTAL_RUNTIME_INTEGRATION_TYPE]]} {[LIT_CHARS --rkt-path] [LIT_DBRACKET_LIKE "="] [DQ [VarSub RKT_PATH]]} {[LIT_CHARS --rkt-stage1-image] [LIT_DBRACKET_LIKE "="] [DQ [VarSub RKT_STAGE1_IMAGE]]} {[LIT_CHARS --hostname-override] [LIT_DBRACKET_LIKE "="] [DQ [VarSub HOSTNAME_OVERRIDE]]} {[LIT_CHARS --cloud-provider] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CLOUD_PROVIDER]]} {[LIT_CHARS --cloud-config] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CLOUD_CONFIG]]} {[LIT_CHARS --address] [LIT_DBRACKET_LIKE "="] [DQ [VarSub KUBELET_HOST]]} {[LIT_CHARS --require-kubeconfig]} {[LIT_CHARS --kubeconfig]} {[DQ [VarSub CERT_DIR]] [LIT_CHARS /kubeconfig]} {[LIT_CHARS --feature-gates] [LIT_DBRACKET_LIKE "="] [DQ [VarSub FEATURE_GATES]]} {[LIT_CHARS --cpu-cfs-quota] [LIT_DBRACKET_LIKE "="] [VarSub CPU_CFS_QUOTA]} {[LIT_CHARS --enable-controller-attach-detach] [LIT_DBRACKET_LIKE "="] [DQ [VarSub ENABLE_CONTROLLER_ATTACH_DETACH]]} {[VarSub dns_args]} {[VarSub net_plugin_dir_args]} {[VarSub net_plugin_args]} {[VarSub container_runtime_endpoint_args]} {[VarSub image_service_endpoint_args]} {[LIT_CHARS --port] [LIT_DBRACKET_LIKE "="] [DQ [VarSub KUBELET_PORT]]} < (FilenameRedirectNode filename={[DQ [VarSub KUBELET_LOG]]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) ) (= scope= flags=0 words=[] bindings=[('KUBELET_PID', {[VarSub !]})]) ) (ElseTrue) (List (Com {[LIT_CHARS cleanup_dockerized_kubelet]} ) (= scope= flags=0 words=[] bindings=[('cred_bind', {[DQ ]})]) (= scope= flags=0 words=[] bindings=[('cloud_cred', {[DQ ]})]) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub CLOUD_PROVIDER]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS aws]]} {[LIT_DBRACKET_LIKE "]"]} ) (= scope= flags=0 words=[] bindings=[('cloud_cred', {[DQ [VarSub HOME][LIT_CHARS /.aws/credentials]]})]) ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub CLOUD_PROVIDER]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS gce]]} {[LIT_DBRACKET_LIKE "]"]} ) (= scope= flags=0 words=[] bindings=[('cloud_cred', {[DQ [VarSub HOME][LIT_CHARS /.config/gcloud]]})]) ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub CLOUD_PROVIDER]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS openstack]]} {[LIT_DBRACKET_LIKE "]"]} ) (= scope= flags=0 words=[] bindings=[('cloud_cred', {[DQ [VarSub CLOUD_CONFIG]]})]) ) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub cloud_cred]]}}) (= scope= flags=0 words=[] bindings=[('cred_bind', {[DQ [LIT_CHARS "--volume="][VarSub cloud_cred][LIT_CHARS ":"][VarSub cloud_cred][LIT_CHARS ":ro"]]})]) ) (Fork (Com {[LIT_CHARS docker]} {[LIT_CHARS run]} {[LIT_CHARS --volume] [LIT_DBRACKET_LIKE "="] [LIT_CHARS /] [LIT_OTHER ":"] [LIT_CHARS /rootfs] [LIT_OTHER ":"] [LIT_CHARS ro]} {[LIT_CHARS --volume] [LIT_DBRACKET_LIKE "="] [LIT_CHARS /var/run] [LIT_OTHER ":"] [LIT_CHARS /var/run] [LIT_OTHER ":"] [LIT_CHARS rw]} {[LIT_CHARS --volume] [LIT_DBRACKET_LIKE "="] [LIT_CHARS /sys] [LIT_OTHER ":"] [LIT_CHARS /sys] [LIT_OTHER ":"] [LIT_CHARS ro]} {[LIT_CHARS --volume] [LIT_DBRACKET_LIKE "="] [LIT_CHARS /var/lib/docker/] [LIT_OTHER ":"] [LIT_CHARS /var/lib/docker] [LIT_OTHER ":"] [LIT_CHARS ro]} {[LIT_CHARS --volume] [LIT_DBRACKET_LIKE "="] [LIT_CHARS /var/lib/kubelet/] [LIT_OTHER ":"] [LIT_CHARS /var/lib/kubelet] [LIT_OTHER ":"] [LIT_CHARS rw] [LIT_COMMA ","] [LIT_CHARS z]} {[LIT_CHARS --volume] [LIT_DBRACKET_LIKE "="] [LIT_CHARS /dev] [LIT_OTHER ":"] [LIT_CHARS /dev]} {[VarSub cred_bind]} {[LIT_CHARS --net] [LIT_DBRACKET_LIKE "="] [LIT_CHARS host]} {[LIT_CHARS --privileged] [LIT_DBRACKET_LIKE "="] [LIT_CHARS true]} {[LIT_CHARS -i]} {[LIT_CHARS --cidfile] [LIT_DBRACKET_LIKE "="] [VarSub KUBELET_CIDFILE]} {[LIT_CHARS gcr.io/google_containers/kubelet]} {[LIT_CHARS /kubelet]} {[LIT_CHARS --v] [LIT_DBRACKET_LIKE "="] [VarSub LOG_LEVEL]} {[LIT_CHARS --containerized]} {[VarSub priv_arg] [LIT_CHARS --chaos-chance] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CHAOS_CHANCE]]} {[LIT_CHARS --hostname-override] [LIT_DBRACKET_LIKE "="] [DQ [VarSub HOSTNAME_OVERRIDE]]} {[LIT_CHARS --cloud-provider] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CLOUD_PROVIDER]]} {[LIT_CHARS --cloud-config] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CLOUD_CONFIG]]} {[\ LIT_ESCAPED_CHAR "\\ "] [LIT_CHARS --address] [LIT_DBRACKET_LIKE "="] [DQ [LIT_CHARS 127.0.0.1]]} {[LIT_CHARS --require-kubeconfig]} {[LIT_CHARS --kubeconfig]} {[DQ [VarSub CERT_DIR]] [LIT_CHARS /kubeconfig]} {[LIT_CHARS --api-servers] [LIT_DBRACKET_LIKE "="] [DQ [LIT_CHARS "https://"][VarSub API_HOST][LIT_CHARS ":"][VarSub API_SECURE_PORT]]} {[LIT_CHARS --port] [LIT_DBRACKET_LIKE "="] [DQ [VarSub KUBELET_PORT]]} {[LIT_CHARS --enable-controller-attach-detach] [LIT_DBRACKET_LIKE "="] [DQ [VarSub ENABLE_CONTROLLER_ATTACH_DETACH]]} ) ) (Fork (Com < (FilenameRedirectNode filename={[VarSub KUBELET_LOG]} "> 1), > ) ) ) ) ) ) (FunctionDef start_kubeproxy [] (List (= scope= flags=0 words=[] bindings=[('PROXY_LOG', {[LIT_CHARS /tmp/kube-proxy.log]})]) (Fork (Com {[LIT_CHARS sudo]} {[LIT_CHARS -E]} {[DQ [VarSub GO_OUT][LIT_CHARS /hyperkube]]} {[LIT_CHARS proxy]} {[LIT_CHARS --v] [LIT_DBRACKET_LIKE "="] [VarSub LOG_LEVEL]} {[LIT_CHARS --hostname-override] [LIT_DBRACKET_LIKE "="] [DQ [VarSub HOSTNAME_OVERRIDE]]} {[LIT_CHARS --feature-gates] [LIT_DBRACKET_LIKE "="] [DQ [VarSub FEATURE_GATES]]} {[LIT_CHARS --kubeconfig]} {[DQ [VarSub CERT_DIR]] [LIT_CHARS /kubeconfig]} {[LIT_CHARS --master] [LIT_DBRACKET_LIKE "="] [DQ [LIT_CHARS "https://"][VarSub API_HOST][LIT_CHARS ":"][VarSub API_SECURE_PORT]]} < (FilenameRedirectNode filename={[DQ [VarSub PROXY_LOG]]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) ) (= scope= flags=0 words=[] bindings=[('PROXY_PID', {[VarSub !]})]) (= scope= flags=0 words=[] bindings=[('SCHEDULER_LOG', {[LIT_CHARS /tmp/kube-scheduler.log]})]) (Fork (Com {[LIT_CHARS sudo]} {[LIT_CHARS -E]} {[DQ [VarSub GO_OUT][LIT_CHARS /hyperkube]]} {[LIT_CHARS scheduler]} {[LIT_CHARS --v] [LIT_DBRACKET_LIKE "="] [VarSub LOG_LEVEL]} {[LIT_CHARS --kubeconfig]} {[DQ [VarSub CERT_DIR]] [LIT_CHARS /kubeconfig]} {[LIT_CHARS --master] [LIT_DBRACKET_LIKE "="] [DQ [LIT_CHARS "https://"][VarSub API_HOST][LIT_CHARS ":"][VarSub API_SECURE_PORT]]} < (FilenameRedirectNode filename={[DQ [VarSub SCHEDULER_LOG]]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) ) (= scope= flags=0 words=[] bindings=[('SCHEDULER_PID', {[VarSub !]})]) ) ) (FunctionDef start_kubedns [] (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub ENABLE_CLUSTER_DNS]]} {[LIT_CHARS true]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Creating kube-system namespace"]]} ) (Com {[LIT_CHARS sed]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s/{{ pillar"][\ LIT_ESCAPED_CHAR "\\["][LIT_CHARS "'dns_replicas'"][\ LIT_ESCAPED_CHAR "\\]"][LIT_CHARS " }}/"][VarSub DNS_REPLICAS][LIT_CHARS "/g;s/{{ pillar"][\ LIT_ESCAPED_CHAR "\\["][LIT_CHARS "'dns_domain'"][\ LIT_ESCAPED_CHAR "\\]"][LIT_CHARS " }}/"][VarSub DNS_DOMAIN][LIT_CHARS "/g;"]]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/addons/dns/skydns-rc.yaml.in]]} < (FilenameRedirectNode filename={[LIT_CHARS skydns-rc.yaml]} |"> 1), > ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub FEDERATION test_op=VS_TEST_COLON_HYPHEN {}]]} {[DQ [LIT_CHARS true]]}}) (List (= scope= flags=0 words=[] bindings=[('FEDERATIONS_DOMAIN_MAP', {[DQ [VarSub FEDERATIONS_DOMAIN_MAP test_op=VS_TEST_COLON_HYPHEN {}]]})]) (If (DBracket {B? LOGICAL_BINARY_AND {B1 UNARY_STRING_z {[DQ [VarSub FEDERATIONS_DOMAIN_MAP]]}} {B? LOGICAL_BINARY_AND {B1 UNARY_STRING_n {[DQ [VarSub FEDERATION_NAME test_op=VS_TEST_COLON_HYPHEN {}]]}} {B1 UNARY_STRING_n {[DQ [VarSub DNS_ZONE_NAME test_op=VS_TEST_COLON_HYPHEN {}]]}}}}) (= scope= flags=0 words=[] bindings=[('FEDERATIONS_DOMAIN_MAP', {[DQ [VarSub FEDERATION_NAME][LIT_CHARS "="][VarSub DNS_ZONE_NAME]]})]) ) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub FEDERATIONS_DOMAIN_MAP]]}}) (Com {[LIT_CHARS sed]} {[LIT_CHARS -i]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s/{{ pillar"][\ LIT_ESCAPED_CHAR "\\["][LIT_CHARS "'federations_domain_map'"][\ LIT_ESCAPED_CHAR "\\]"][LIT_CHARS " }}/- --federations="][VarSub FEDERATIONS_DOMAIN_MAP][LIT_CHARS /g]]} {[LIT_CHARS skydns-rc.yaml]} ) (ElseTrue) (Com {[LIT_CHARS sed]} {[LIT_CHARS -i]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "/{{ pillar"][\ LIT_ESCAPED_CHAR "\\["][LIT_CHARS "'federations_domain_map'"][\ LIT_ESCAPED_CHAR "\\]"][LIT_CHARS " }}/d"]]} {[LIT_CHARS skydns-rc.yaml]} ) ) ) (ElseTrue) (Com {[LIT_CHARS sed]} {[LIT_CHARS -i]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "/{{ pillar"][\ LIT_ESCAPED_CHAR "\\["][LIT_CHARS "'federations_domain_map'"][\ LIT_ESCAPED_CHAR "\\]"][LIT_CHARS " }}/d"]]} {[LIT_CHARS skydns-rc.yaml]} ) ) (Com {[LIT_CHARS sed]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s/{{ pillar"][\ LIT_ESCAPED_CHAR "\\["][LIT_CHARS "'dns_server'"][\ LIT_ESCAPED_CHAR "\\]"][LIT_CHARS " }}/"][VarSub DNS_SERVER_IP][LIT_CHARS /g]]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/addons/dns/skydns-svc.yaml.in]]} < (FilenameRedirectNode filename={[LIT_CHARS skydns-svc.yaml]} |"> 1), > ) (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "apiVersion: v1\n"][LIT_CHARS "kind: Namespace\n"][LIT_CHARS "metadata:\n"][LIT_CHARS " name: kube-system\n"]]} 0), (FilenameRedirectNode filename={[LIT_CHARS namespace.yaml]} "> 1), > ) (Com {[VarSub KUBECTL]} {[LIT_CHARS config]} {[LIT_CHARS set-cluster]} {[LIT_CHARS local]} {[LIT_CHARS --server] [LIT_DBRACKET_LIKE "="] [LIT_CHARS https] [LIT_OTHER ":"] [LIT_CHARS //] [VarSub API_HOST] [LIT_OTHER ":"] [VarSub API_SECURE_PORT]} {[LIT_CHARS --certificate-authority] [LIT_DBRACKET_LIKE "="] [ComSub (Com {[LIT_CHARS ROOT_CA_FILE]})]} ) (Com {[VarSub KUBECTL]} {[LIT_CHARS config]} {[LIT_CHARS set-context]} {[LIT_CHARS local]} {[LIT_CHARS --cluster] [LIT_DBRACKET_LIKE "="] [LIT_CHARS local]} ) (Com {[VarSub KUBECTL]} {[LIT_CHARS config]} {[LIT_CHARS use-context]} {[LIT_CHARS local]} ) (Com {[VarSub KUBECTL]} {[LIT_CHARS create]} {[LIT_CHARS -f]} {[LIT_CHARS namespace.yaml]} ) (Com {[VarSub KUBECTL]} {[LIT_CHARS --namespace] [LIT_DBRACKET_LIKE "="] [LIT_CHARS kube-system]} {[LIT_CHARS create]} {[LIT_CHARS -f]} {[LIT_CHARS skydns-rc.yaml]} ) (Com {[VarSub KUBECTL]} {[LIT_CHARS --namespace] [LIT_DBRACKET_LIKE "="] [LIT_CHARS kube-system]} {[LIT_CHARS create]} {[LIT_CHARS -f]} {[LIT_CHARS skydns-svc.yaml]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Kube-dns rc and service successfully deployed."]]} ) ) ) ) (FunctionDef print_success [] (List (If (DBracket {B2 BINARY_STRING_NOT_EQUAL {[DQ [VarSub START_MODE]]} {[DQ [LIT_CHARS kubeletonly]]}}) (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "Local Kubernetes cluster is running. Press Ctrl-C to shut it down.\n"][LIT_CHARS "\n"][LIT_CHARS "Logs:\n"][LIT_CHARS " "][VarSub APISERVER_LOG test_op=VS_TEST_COLON_HYPHEN {}][LIT_CHARS "\n"][LIT_CHARS " "][VarSub CTLRMGR_LOG test_op=VS_TEST_COLON_HYPHEN {}][LIT_CHARS "\n"][LIT_CHARS " "][VarSub PROXY_LOG test_op=VS_TEST_COLON_HYPHEN {}][LIT_CHARS "\n"][LIT_CHARS " "][VarSub SCHEDULER_LOG test_op=VS_TEST_COLON_HYPHEN {}][LIT_CHARS "\n"]]} 0), > ) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub START_MODE]]} {[DQ [LIT_CHARS all]]}}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " "][VarSub KUBELET_LOG]]} ) (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub START_MODE]]} {[DQ [LIT_CHARS nokubelet]]}}) (List (Com {[LIT_CHARS echo]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "No kubelet was started because you set START_MODE=nokubelet"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Run this script again with START_MODE=kubeletonly to run a kubelet"]]} ) ) ) (If (DBracket {B2 BINARY_STRING_NOT_EQUAL {[DQ [VarSub START_MODE]]} {[DQ [LIT_CHARS kubeletonly]]}}) (List (Com {[LIT_CHARS echo]} ) (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "To start using your cluster, open up another terminal/tab and run:\n"][LIT_CHARS "\n"][LIT_CHARS " export KUBERNETES_PROVIDER=local\n"][LIT_CHARS "\n"][LIT_CHARS " cluster/kubectl.sh config set-cluster local --server=https://"][VarSub API_HOST][LIT_CHARS ":"][VarSub API_SECURE_PORT][LIT_CHARS " --certificate-authority="][VarSub ROOT_CA_FILE][LIT_CHARS "\n"][LIT_CHARS " cluster/kubectl.sh config set-credentials myself --username=admin --password=admin\n"][LIT_CHARS " cluster/kubectl.sh config set-context local --cluster=local --user=myself\n"][LIT_CHARS " cluster/kubectl.sh config use-context local\n"][LIT_CHARS " cluster/kubectl.sh\n"]]} 0), > ) ) (ElseTrue) (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "The kubelet was started.\n"][LIT_CHARS "\n"][LIT_CHARS "Logs:\n"][LIT_CHARS " "][VarSub KUBELET_LOG][LIT_CHARS "\n"]]} 0), > ) ) ) ) (Com {[LIT_CHARS test_docker]} ) (If (DBracket {B2 BINARY_STRING_NOT_EQUAL {[DQ [VarSub START_MODE]]} {[DQ [LIT_CHARS kubeletonly]]}}) (Com {[LIT_CHARS test_apiserver_off]} ) ) (Com {[LIT_CHARS test_openssl_installed]} ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub GO_OUT]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ ]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS detect_binary]} ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Detected host and ready to start services. Doing some housekeeping first..."]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Using GO_OUT "][VarSub GO_OUT]]} ) (= scope= flags=0 words=[] bindings=[('KUBELET_CIDFILE', {[LIT_CHARS /tmp/kubelet.cid]})]) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub ENABLE_DAEMON]]} {[LIT_CHARS false]}}) (Com {[LIT_CHARS trap]} {[LIT_CHARS cleanup]} {[LIT_CHARS EXIT]} ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Starting services now!"]]} ) (If (DBracket {B2 BINARY_STRING_NOT_EQUAL {[DQ [VarSub START_MODE]]} {[DQ [LIT_CHARS kubeletonly]]}}) (List (Com {[LIT_CHARS start_etcd]} ) (Com {[LIT_CHARS set_service_accounts]} ) (Com {[LIT_CHARS start_apiserver]} ) (Com {[LIT_CHARS start_controller_manager]} ) (Com {[LIT_CHARS start_kubeproxy]} ) (Com {[LIT_CHARS start_kubedns]} ) ) ) (If (DBracket {B2 BINARY_STRING_NOT_EQUAL {[DQ [VarSub START_MODE]]} {[DQ [LIT_CHARS nokubelet]]}}) (Com {[LIT_CHARS start_kubelet]} ) ) (Com {[LIT_CHARS print_success]} ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub ENABLE_DAEMON]]} {[LIT_CHARS false]}}) (While (Com {[LIT_CHARS true]} ) (Com {[LIT_CHARS sleep]} {[LIT_CHARS 1]} ) ) ) )