(List (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS errexit]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS nounset]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS pipefail]} ) (= scope= flags=0 words=[] bindings=[('KUBE_ROOT', {[DQ [ComSub (Com {[LIT_CHARS dirname]} {[DQ [VarSub BASH_SOURCE]]})][LIT_CHARS /../..]]})]) (= scope= flags=0 words=[] bindings=[('DEPLOY_ROOT', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /federation/deploy]]})]) (= scope= flags=0 words=[] bindings=[('CUR_ROOT', {[DQ [ComSub (Com {[LIT_CHARS pwd]})]]})]) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /build-tools/common.sh]]} ) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /build-tools/util.sh]]} ) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/kube-util.sh]]} ) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/lib/logging.sh]]} ) (= scope= flags=2 words=[] bindings=[('TMP_DIR', {[DQ [ComSub (Com {[LIT_CHARS mktemp]} {[LIT_CHARS -d]})]]})]) (= scope= flags=2 words=[] bindings=[('FEDERATION_OUTPUT_ROOT', {[DQ [VarSub LOCAL_OUTPUT_ROOT][LIT_CHARS /federation]]})]) (= scope= flags=2 words=[] bindings=[('VERSIONS_FILE', {[DQ [VarSub FEDERATION_OUTPUT_ROOT][LIT_CHARS /versions]]})]) (Com {[LIT_CHARS detect-project]} ) (= scope= flags=2 words=[] bindings=[('KUBE_PROJECT', {[DQ [VarSub KUBE_PROJECT test_op=VS_TEST_COLON_HYPHEN {[VarSub PROJECT test_op=VS_TEST_COLON_HYPHEN {}]}]]})]) (= scope= flags=2 words=[] bindings=[('KUBE_REGISTRY', {[DQ [VarSub KUBE_REGISTRY test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS gcr.io] [LIT_SLASH /] [VarSub KUBE_PROJECT]}]]})]) (= scope= flags=0 words=[] bindings=[('KUBE_VERSION', {[DQ [VarSub KUBE_VERSION test_op=VS_TEST_COLON_HYPHEN {}]]})]) (FunctionDef cleanup [] (List (Com {[LIT_CHARS rm]} {[LIT_CHARS -rf]} {[DQ [VarSub TMP_DIR]]} ) (Com {[LIT_CHARS cd]} {[DQ [VarSub CUR_ROOT]]} ) ) ) (Com {[LIT_CHARS trap]} {[LIT_CHARS cleanup]} {[LIT_CHARS EXIT]} ) (FunctionDef dirty_sha [] (List (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('index', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /.git/index]]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('objects_dir', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /.git/objects]]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('tmp_dir', {[DQ [VarSub TMP_DIR][LIT_CHARS /.git]]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('tmp_index', {[DQ [VarSub tmp_dir][LIT_CHARS /index]]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('tmp_objects_dir', {[DQ [VarSub tmp_dir][LIT_CHARS /objects]]})]) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub tmp_objects_dir]]} ) (Com {[LIT_CHARS cp]} {[DQ [VarSub index]]} {[DQ [VarSub tmp_index]]} ) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('files', {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS ls-files]} {[LIT_CHARS -m]} {[LIT_CHARS -o]} {[LIT_CHARS -d]} {[LIT_CHARS --exclude-standard]})]})]) (Com {[LIT_CHARS git]} {[LIT_CHARS add]} {[VarSub files]} more_env=[('GIT_INDEX_FILE', {[DQ [VarSub tmp_index]]})] ) (Com {[LIT_CHARS git]} {[LIT_CHARS write-tree]} more_env=[('GIT_ALTERNATE_OBJECT_DIRECTORIES', {[DQ [VarSub objects_dir]]}), ('GIT_OBJECT_DIRECTORY', {[DQ [VarSub tmp_objects_dir]]}), ('GIT_INDEX_FILE', {[DQ [VarSub tmp_index]]})] ) ) ) (FunctionDef update_config [] (List (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('q', {[DQ [VarSub 1 test_op=VS_TEST_COLON_HYPHEN {}]]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('cfile', {[DQ [VarSub 2 test_op=VS_TEST_COLON_HYPHEN {}]]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('bname', {[DQ [ComSub (Com {[LIT_CHARS basename]} {[VarSub cfile]})]]})]) (Com {[LIT_CHARS jq]} {[DQ [VarSub q]]} {[DQ [VarSub cfile]]} < (FilenameRedirectNode filename={[DQ [VarSub TMP_DIR][LIT_CHARS /][VarSub bname]]} "> 1), > ) (Com {[LIT_CHARS mv]} {[DQ [VarSub TMP_DIR][LIT_CHARS /][VarSub bname]]} {[DQ [VarSub cfile]]} ) ) ) (FunctionDef build_binaries [] (List (Com {[LIT_CHARS cd]} {[DQ [VarSub KUBE_ROOT]]} ) (Com {[LIT_CHARS kube] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS build] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS verify_prereqs]} ) (Com {[LIT_CHARS kube] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS build] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS build_image]} ) (Com {[LIT_CHARS kube] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS build] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS run_build_command]} {[LIT_CHARS make]} {[LIT_VAR_LIKE "WHAT="] [DQ [LIT_CHARS "cmd/kubectl cmd/hyperkube"]] =} ) ) ) (FunctionDef build_image [] (List (= scope= flags=0 words=[] bindings=[('kube_version', {[DQ ]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub KUBE_VERSION test_op=VS_TEST_COLON_HYPHEN {}]]}}) (= scope= flags=0 words=[] bindings=[('kube_version', {[DQ [VarSub KUBE_VERSION]]})]) (ElseTrue) (List (= scope= flags=0 words=[] bindings=[('kube_version', {[DQ [ComSub (Com {[LIT_CHARS kube] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS release] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS semantic_image_tag_version]})]]})]) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub kube_version]]} {[LIT_OTHER "*"] [LIT_CHARS -dirty]}}) (= scope= flags=0 words=[] bindings=[('kube_version+', {[DQ [LIT_CHARS .][ComSub (Com {[LIT_CHARS dirty_sha]})]]})]) ) ) ) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub FEDERATION_OUTPUT_ROOT]]} ) (Com {[LIT_CHARS jq]} {[LIT_CHARS -n]} {[LIT_CHARS --arg]} {[LIT_CHARS ver]} {[DQ [VarSub kube_version]]} {[SQ ]} < (FilenameRedirectNode filename={[DQ [VarSub VERSIONS_FILE]]} "> 1), > ) (Com {[LIT_CHARS kube] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS log] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS status]} {[DQ [LIT_CHARS "Wrote to version file "][VarSub VERSIONS_FILE][LIT_CHARS ": "][VarSub kube_version]]} ) (Com {[LIT_CHARS make]} {[LIT_CHARS -C]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/images/hyperkube]]} {[LIT_CHARS build]} more_env=[('BASEIMAGE', {[DQ [LIT_CHARS "ubuntu:16.04"]]}), ('REGISTRY', {[DQ [VarSub KUBE_REGISTRY]]}), ('VERSION', {[DQ [VarSub kube_version]]})] ) ) ) (FunctionDef push [] (List (= scope= flags=0 words=[] bindings=[('kube_version', {[DQ ]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub KUBE_VERSION test_op=VS_TEST_COLON_HYPHEN {}]]}}) (= scope= flags=0 words=[] bindings=[('kube_version', {[DQ [VarSub KUBE_VERSION]]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('kube_version', {[DQ [ComSub (Com {[LIT_CHARS jq]} {[LIT_CHARS -r]} {[SQ ]} {[VarSub VERSIONS_FILE]})]]})]) ) (Com {[LIT_CHARS kube] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS log] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS status]} {[DQ [LIT_CHARS "Pushing hyperkube image to the registry"]]} ) (Com {[LIT_CHARS gcloud]} {[LIT_CHARS docker]} {[LIT_CHARS --]} {[LIT_CHARS push]} {[DQ [VarSub KUBE_REGISTRY][LIT_CHARS "/hyperkube-amd64:"][VarSub kube_version]]} ) (Com {[LIT_CHARS gen_or_update_config]} {[DQ [VarSub kube_version]]} ) ) ) (FunctionDef gen_or_update_config [] (List (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('kube_version', {[DQ [VarSub 1 test_op=VS_TEST_COLON_HYPHEN {}]]})]) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub FEDERATION_OUTPUT_ROOT]]} ) (Com {[LIT_CHARS cp]} {[DQ [VarSub DEPLOY_ROOT][LIT_CHARS /config.json.sample]]} {[DQ [VarSub FEDERATION_OUTPUT_ROOT][LIT_CHARS /config.json]]} ) (Com {[LIT_CHARS update_config]} {[SQ ] [DQ [VarSub KUBE_PROJECT]] [SQ ]} {[DQ [VarSub FEDERATION_OUTPUT_ROOT][LIT_CHARS /config.json]]} ) (Com {[LIT_CHARS update_config]} {[SQ ] [DQ [VarSub KUBE_REGISTRY]] [SQ ] [DQ [VarSub kube_version]] [SQ ]} {[DQ [VarSub FEDERATION_OUTPUT_ROOT][LIT_CHARS /config.json]]} ) (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "apiserverRegistry: "][RIGHT_D_QUOTE "\""][VarSub KUBE_REGISTRY][RIGHT_D_QUOTE "\""][LIT_CHARS "\n"][LIT_CHARS "apiserverVersion: "][RIGHT_D_QUOTE "\""][VarSub kube_version][RIGHT_D_QUOTE "\""][LIT_CHARS "\n"][LIT_CHARS "controllerManagerRegistry: "][RIGHT_D_QUOTE "\""][VarSub KUBE_REGISTRY][RIGHT_D_QUOTE "\""][LIT_CHARS "\n"][LIT_CHARS "controllerManagerVersion: "][RIGHT_D_QUOTE "\""][VarSub kube_version][RIGHT_D_QUOTE "\""][LIT_CHARS "\n"]]} 0), (FilenameRedirectNode filename={[DQ [VarSub FEDERATION_OUTPUT_ROOT][LIT_CHARS /values.yaml]]} "> 1), > ) ) ) (= scope= flags=2 words=[] bindings=[('ACTION', {[DQ [VarSub 1 test_op=VS_TEST_COLON_HYPHEN {}]]})]) (Case to_match={[DQ [VarSub ACTION]]}, pat_word_list=[[{[DQ ]}], [{[DQ [LIT_CHARS build_binaries]]}], [{[DQ [LIT_CHARS build_image]]}], [{[DQ [LIT_CHARS push]]}], [{[DQ [LIT_CHARS init]]}], [{[DQ [LIT_CHARS deploy_clusters]]}], [{[DQ [LIT_CHARS deploy_federation]]}], [{[DQ [LIT_CHARS destroy_federation]]}], [{[DQ [LIT_CHARS destroy_clusters]]}], [{[DQ [LIT_CHARS redeploy_federation]]}]] (List (Com {[LIT_CHARS echo]} {[SQ ] [DQ [VarSub ACTION]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) (Com {[LIT_CHARS build_binaries]} ) (Com {[LIT_CHARS build_image]} ) (Com {[LIT_CHARS push]} ) (Subshell (Com {[DQ [VarSub DEPLOY_ROOT][LIT_CHARS /deploy.sh]]} {[LIT_CHARS init]} ) ) (Subshell (List (= scope= flags=1 words=[{[LIT_CHARS FEDERATION_OUTPUT_ROOT]}] bindings=[]) (Com {[DQ [VarSub DEPLOY_ROOT][LIT_CHARS /deploy.sh]]} {[LIT_CHARS deploy_clusters]} ) ) ) (Subshell (List (= scope= flags=1 words=[{[LIT_CHARS FEDERATION_OUTPUT_ROOT]}] bindings=[]) (Com {[DQ [VarSub DEPLOY_ROOT][LIT_CHARS /deploy.sh]]} {[LIT_CHARS deploy_federation]} ) ) ) (Subshell (List (= scope= flags=1 words=[{[LIT_CHARS FEDERATION_OUTPUT_ROOT]}] bindings=[]) (Com {[DQ [VarSub DEPLOY_ROOT][LIT_CHARS /deploy.sh]]} {[LIT_CHARS destroy_federation]} ) ) ) (Subshell (List (= scope= flags=1 words=[{[LIT_CHARS FEDERATION_OUTPUT_ROOT]}] bindings=[]) (Com {[DQ [VarSub DEPLOY_ROOT][LIT_CHARS /deploy.sh]]} {[LIT_CHARS destroy_clusters]} ) ) ) (Subshell (List (= scope= flags=1 words=[{[LIT_CHARS FEDERATION_OUTPUT_ROOT]}] bindings=[]) (Com {[DQ [VarSub DEPLOY_ROOT][LIT_CHARS /deploy.sh]]} {[LIT_CHARS redeploy_federation]} ) ) ) ) )