(CommandList children: [ (C {(set)} {(-o)} {(errexit)}) (C {(set)} {(-o)} {(nounset)}) (C {(set)} {(-o)} {(pipefail)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBERNETES_CI_RELEASE_URL) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name KUBERNETES_CI_RELEASE_URL> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: { (BracedVarSub token: <VSub_Name KUBERNETES_RELEASE_URL> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {('https:') (Lit_Slash /) (Lit_Slash /) (dl.k8s.io) (Lit_Slash /) (ci)} ) spids: [201 210] ) } ) spids: [198 211] ) ) } spids: [196] ) ] spids: [196] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBERNETES_RELEASE_URL) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name KUBERNETES_RELEASE_URL> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {('https:') (Lit_Slash /) (Lit_Slash /) (dl.k8s.io)} ) spids: [216 223] ) ) } spids: [214] ) ] spids: [214] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBE_RELEASE_VERSION_REGEX) op: Equal rhs: { (DQ ('^v(0|[1-9][0-9]*)') (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) ('.(0|[1-9][0-9]*)') (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) ('.(0|[1-9][0-9]*)(-([a-zA-Z0-9]+)') (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) ('.(0|[1-9][0-9]*))?') (Lit_Other '$') ) } spids: [227] ) ] spids: [227] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBE_CI_VERSION_REGEX) op: Equal rhs: { (DQ ('^v(0|[1-9][0-9]*)') (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) ('.(0|[1-9][0-9]*)') (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) ('.(0|[1-9][0-9]*)-([a-zA-Z0-9]+)') (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) ('.(0|[1-9][0-9]*)(') (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) ('.(0|[1-9][0-9]*)') (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) ('+[-0-9a-z]*)?') (Lit_Other '$') ) } spids: [239] ) ] spids: [239] ) (FuncDef name: set_binary_version body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ (${ VSub_Number 1))} right: {(DQ (/))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(export)} {(Lit_VarLike 'KUBE_VERSION=') (CommandSubPart command_list: (CommandList children: [ (C {(curl)} {(-fsSL)} {(--retry)} {(5)} {(DQ ('https://dl.k8s.io/') (${ VSub_Number 1) (.txt))} ) ] ) left_token: <Left_CommandSub '$('> spids: [323 339] ) } ) ] spids: [16777215 317] ) ] else_action: [(C {(export)} {(Lit_VarLike 'KUBE_VERSION=') (${ VSub_Number 1)})] spids: [342 353] ) ] spids: [295] ) spids: [289 294] ) (FuncDef name: download_kube_binaries body: (BraceGroup children: [ (Subshell child: (CommandList children: [ (C {(cd)} {(kubernetes)}) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_x child: {(./cluster/get-kube-binaries.sh)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(./cluster/get-kube-binaries.sh)}] more_env: [ (env_pair name: KUBERNETES_RELEASE_URL val: {(DQ (${ VSub_Name KUBERNETES_RELEASE_URL))} spids: [397] ) ] ) ] spids: [16777215 390] ) ] spids: [16777215 409] ) ] ) spids: [371 412] ) ] spids: [368] ) spids: [364 367] ) (FuncDef name: create_cluster body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_n child: { (DQ (BracedVarSub token: <VSub_Name KUBERNETES_SKIP_CREATE_CLUSTER> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(EmptyPart)}) spids: [431 434] ) ) } ) ) terminator: <Op_Semi ';'> ) ] action: [(ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})] spids: [16777215 440] ) ] spids: [16777215 448] ) (C {(echo)} { (DQ ('Creating a kubernetes on ') (BracedVarSub token: <VSub_Name KUBERNETES_PROVIDER> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(gce)}) spids: [455 459] ) (...) ) } ) (Subshell child: (CommandList children: [ (C {(cd)} {(kubernetes)}) (C {(./cluster/kube-up.sh)}) (C {(echo)} {(DQ ('Kubernetes binaries at ') (${ VSub_Name PWD) (/cluster/))}) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobNEqual left: {(DQ (':') ($ VSub_Name '$PATH') (':'))} right: {(Lit_Other '*') (DQ (':') (${ VSub_Name PWD) ('/cluster:')) (Lit_Other '*') } ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('You may want to add this directory to your PATH in ') (EscapedLiteralPart token: <Lit_EscapedChar '\\$'> ) (HOME/.profile) ) } ) ] spids: [16777215 511] ) ] spids: [16777215 523] ) (C {(echo)} {(DQ ('Installation successful!'))}) ] ) spids: [464 534] ) ] spids: [421] ) spids: [417 420] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_n child: { (DQ (BracedVarSub token: <VSub_Name KUBERNETES_SKIP_DOWNLOAD> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(EmptyPart)}) spids: [546 549] ) ) } ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(create_cluster)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})] spids: [16777215 555] ) ] spids: [16777215 565] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr:(BoolUnary op_id:BoolUnary_d child:{(DQ (./kubernetes))})) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_z child: { (DQ (BracedVarSub token: <VSub_Name KUBERNETES_SKIP_CONFIRM> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(EmptyPart)}) spids: [591 594] ) ) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ( "'kubernetes' directory already exist. Should we skip download step and start to create cluster based on it? [Y]/n" ) ) } ) (C {(read)} {(confirm)}) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalNot child: (BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ (${ VSub_Name confirm))} right: {(Lit_Other '^') (Lit_Other '[') (nN) (Lit_Other ']') (Lit_Other '$') } ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('Skipping download step.'))}) (C {(create_cluster)}) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(0)} ) ] spids: [16777215 638] ) ] spids: [16777215 656] ) ] spids: [16777215 600] ) ] spids: [16777215 659] ) ] spids: [16777215 581] ) ] spids: [16777215 661] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:kernel) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(uname)} {(-s)})]) left_token: <Left_CommandSub '$('> spids: [671 675] ) } spids: [670] ) ] spids: [670] ) (Case to_match: {(DQ (${ VSub_Name kernel))} arms: [ (case_arm pat_list: [{(Darwin)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:platform) op: Equal rhs: {(DQ (darwin))} spids: [692] ) ] spids: [692] ) ] spids: [688 689 698 16777215] ) (case_arm pat_list: [{(Linux)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:platform) op: Equal rhs: {(DQ (linux))} spids: [705] ) ] spids: [705] ) ] spids: [701 702 711 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (SimpleCommand words: [{(echo)} {(DQ ('Unknown, unsupported platform: ') (${ VSub_Name kernel) (.))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[728])] ) (SimpleCommand words: [{(echo)} {(DQ ('Supported platforms: Linux, Darwin.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[738])] ) (SimpleCommand words: [{(echo)} {(DQ ('Bailing out.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[748])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(2)}) ] spids: [714 715 16777215 756] ) ] spids: [677 685 756] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:machine) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(uname)} {(-m)})]) left_token: <Left_CommandSub '$('> spids: [760 764] ) } spids: [759] ) ] spids: [759] ) (Case to_match: {(DQ (${ VSub_Name machine))} arms: [ (case_arm pat_list: [ {(x86_64) (Lit_Other '*')} {(i) (Lit_Other '?') (86_64) (Lit_Other '*')} {(amd64) (Lit_Other '*')} ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (amd64))} spids:[790])] spids: [790] ) ] spids: [777 787 796 16777215] ) (case_arm pat_list: [{(aarch64) (Lit_Other '*')} {(arm64) (Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (arm64))} spids:[807])] spids: [807] ) ] spids: [799 804 813 16777215] ) (case_arm pat_list: [{(arm) (Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (arm))} spids:[821])] spids: [821] ) ] spids: [816 818 827 16777215] ) (case_arm pat_list: [{(i) (Lit_Other '?') (86) (Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (386))} spids:[837])] spids: [837] ) ] spids: [830 834 843 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (SimpleCommand words: [ {(echo)} {(DQ ('Unknown, unsupported architecture (') (${ VSub_Name machine) (').'))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[860])] ) (SimpleCommand words: [{(echo)} {(DQ ('Supported architectures x86_64, i686, arm, arm64.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[870])] ) (SimpleCommand words: [{(echo)} {(DQ ('Bailing out.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[880])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)}) ] spids: [846 847 889 16777215] ) ] spids: [766 774 891] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:file) op:Equal rhs:{(kubernetes.tar.gz)} spids:[894])] spids: [894] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:release) op: Equal rhs: { (BracedVarSub token: <VSub_Name KUBERNETES_RELEASE> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ (release/stable))}) spids: [898 904] ) } spids: [897] ) ] spids: [897] ) (C {(set_binary_version)} {(DQ (${ VSub_Name release))}) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_z child: { (DQ (BracedVarSub token: <VSub_Name KUBERNETES_SKIP_RELEASE_VALIDATION> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(EmptyPart)}) spids: [928 931] ) ) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: {(${ VSub_Name KUBE_VERSION)} right: {(${ VSub_Name KUBE_CI_VERSION_REGEX)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBERNETES_RELEASE_URL) op: Equal rhs: {(DQ (${ VSub_Name KUBERNETES_CI_RELEASE_URL))} spids: [968] ) ] spids: [968] ) ] spids: [16777215 957] ) (if_arm cond: [ (Sentence child: (Pipeline children: [ (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: {(${ VSub_Name KUBE_VERSION)} right: {(${ VSub_Name KUBE_RELEASE_VERSION_REGEX)} ) ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Version doesn't match regexp"))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [1004] ) ] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [976 995] ) ] spids: [16777215 1013] ) ] spids: [16777215 937] ) ] spids: [16777215 1015] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:kubernetes_tar_url) op: Equal rhs: { (DQ (${ VSub_Name KUBERNETES_RELEASE_URL) (/) (${ VSub_Name KUBE_VERSION) (/) (${ VSub_Name file) ) } spids: [1017] ) ] spids: [1017] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:need_download) op:Equal rhs:{(true)} spids:[1033])] spids: [1033] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_r child: {(DQ (${ VSub_Name PWD) (/) (${ VSub_Name file))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:downloaded_version) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (AndOr ops: [Op_DPipe] children: [ (SimpleCommand words: [ {(tar)} {(-xzOf)} {(DQ (${ VSub_Name PWD) (/) (${ VSub_Name file))} {(kubernetes/version)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [1076] ) ] ) (C {(true)}) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [1059 1082] ) } spids: [1058] ) ] spids: [1058] ) (C {(echo)} { (DQ ('Found preexisting ') (${ VSub_Name file) (', release ') (${ VSub_Name downloaded_version) ) } ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ (${ VSub_Name downloaded_version))} right: {(DQ (${ VSub_Name KUBE_VERSION))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('Using preexisting kubernetes.tar.gz'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:need_download) op: Equal rhs: {(false)} spids: [1130] ) ] spids: [1130] ) ] spids: [16777215 1120] ) ] spids: [16777215 1134] ) ] spids: [16777215 1055] ) ] spids: [16777215 1136] ) (If arms: [ (if_arm cond: [(Sentence child:(C {(DQ (${ VSub_Name need_download))}) terminator:<Op_Semi ';'>)] action: [ (C {(echo)} {(DQ ('Downloading kubernetes release ') (${ VSub_Name KUBE_VERSION))}) (C {(echo)} {(DQ (' from ') (${ VSub_Name kubernetes_tar_url))}) (C {(echo)} {(DQ (' to ') (${ VSub_Name PWD) (/) (${ VSub_Name file))}) ] spids: [16777215 1148] ) ] spids: [16777215 1184] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id:BoolUnary_e child:{(DQ (${ VSub_Name PWD) (/kubernetes))}) ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalNot child: (BoolUnary op_id: BoolUnary_f child: {(DQ (${ VSub_Name PWD) (/kubernetes/version))} ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ (${ VSub_Name PWD) ('/kubernetes exists but does not look like a Kubernetes release.') ) } ) (C {(echo)} {(DQ ('Aborting!'))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(5)}) ] spids: [16777215 1232] ) ] spids: [16777215 1257] ) (C {(echo)} {(DQ ("Will also delete preexisting 'kubernetes' directory."))}) ] spids: [16777215 1203] ) ] spids: [16777215 1266] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_z child: { (DQ (BracedVarSub token: <VSub_Name KUBERNETES_SKIP_CONFIRM> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(EmptyPart)}) spids: [1276 1279] ) ) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('Is this ok? [Y]/n'))}) (C {(read)} {(confirm)}) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ (${ VSub_Name confirm))} right: {(Lit_Other '^') (Lit_Other '[') (nN) (Lit_Other ']') (Lit_Other '$')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ (Aborting.))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] spids: [16777215 1321] ) ] spids: [16777215 1336] ) ] spids: [16777215 1285] ) ] spids: [16777215 1338] ) (If arms: [ (if_arm cond: [(Sentence child:(C {(DQ (${ VSub_Name need_download))}) terminator:<Op_Semi ';'>)] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (WordTest w: { (CommandSubPart command_list: (CommandList children:[(C {(which)} {(curl)})]) left_token: <Left_CommandSub '$('> spids: [1357 1361] ) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(curl)} {(-fL)} {(--retry)} {(5)} {(--keepalive-time)} {(2)} {(DQ (${ VSub_Name kubernetes_tar_url))} {(-o)} {(DQ (${ VSub_Name file))} ) ] spids: [16777215 1366] ) (if_arm cond: [ (Sentence child: (DBracket expr: (WordTest w: { (CommandSubPart command_list: (CommandList children:[(C {(which)} {(wget)})]) left_token: <Left_CommandSub '$('> spids: [1400 1404] ) } ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(wget)} {(DQ (${ VSub_Name kubernetes_tar_url))})] spids: [1396 1409] ) ] else_action: [ (C {(echo)} {(DQ ("Couldn't find curl or wget. Bailing out."))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [1421 1436] ) ] spids: [16777215 1350] ) ] spids: [16777215 1438] ) (C {(echo)} {(DQ ('Unpacking kubernetes release ') (${ VSub_Name KUBE_VERSION))}) (C {(rm)} {(-rf)} {(DQ (${ VSub_Name PWD) (/kubernetes))}) (C {(tar)} {(-xzf)} {(${ VSub_Name file)}) (C {(download_kube_binaries)}) (C {(create_cluster)}) ] )