(CommandList children: [ (C {(Lit_Other ':')} { (DQ (BracedVarSub token: <VSub_Name KUBE_ROOT> suffix_op: (StringUnary op_id:VTest_QMark arg_word:{('Must set KUBE_ROOT env var')}) spids: [50 54] ) ) } ) (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/kube-util.sh))}) (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/lib/logging.sh))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FEDERATION_NAME) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name FEDERATION_NAME> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(e2e-federation)}) spids: [89 93] ) ) } spids: [87] ) ] spids: [87] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FEDERATION_NAMESPACE) op: Equal rhs: { (BracedVarSub token: <VSub_Name FEDERATION_NAMESPACE> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(federation-system)}) spids: [97 101] ) } spids: [96] ) ] spids: [96] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FEDERATION_KUBE_CONTEXT) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name FEDERATION_KUBE_CONTEXT> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(${ VSub_Name FEDERATION_NAME)} ) spids: [105 111] ) ) } spids: [103] ) ] spids: [103] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FEDERATION_USE_PV_FOR_ETCD) op: Equal rhs: { (BracedVarSub token: <VSub_Name FEDERATION_USE_PV_FOR_ETCD> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(false)}) spids: [115 119] ) } spids: [114] ) ] spids: [114] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:HOST_CLUSTER_ZONE) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name FEDERATION_HOST_CLUSTER_ZONE> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [123 126] ) ) } spids: [121] ) ] spids: [121] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id:BoolUnary_z child:{(DQ (${ VSub_Name HOST_CLUSTER_ZONE))}) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:E2E_ZONES_ARR) op: Equal rhs: { (ArrayLiteralPart words: [ { (BracedVarSub token: <VSub_Name E2E_ZONES> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [155 158] ) } ] ) } spids: [153] ) ] spids: [153] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: Redir_Great left: { (BracedVarSub token: <VSub_Name E2E_ZONES_ARR> prefix_op: VSub_Pound bracket_op: (WholeArray op_id:Lit_At) spids: [166 172] ) } right: {(0)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:HOST_CLUSTER_ZONE) op: Equal rhs: { (BracedVarSub token: <VSub_Name E2E_ZONES_ARR> bracket_op: (ArrayIndex expr: (ArithUnary op_id: Node_UnaryMinus child: (ArithWord w:{(Lit_Digits 1)}) ) ) spids: [185 191] ) } spids: [184] ) ] spids: [184] ) ] spids: [16777215 181] ) ] spids: [16777215 194] ) ] spids: [16777215 150] ) ] spids: [16777215 196] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:HOST_CLUSTER_CONTEXT) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name FEDERATION_HOST_CLUSTER_CONTEXT> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [201 204] ) ) } spids: [199] ) ] spids: [199] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id:BoolUnary_z child:{(DQ (${ VSub_Name HOST_CLUSTER_CONTEXT))}) ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_z child: { (DQ (BracedVarSub token: <VSub_Name HOST_CLUSTER_ZONE> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [236 239] ) ) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ( 'At least one of FEDERATION_HOST_CLUSTER_CONTEXT, FEDERATION_HOST_CLUSTER_ZONE or E2E_ZONES is required.' ) ) } ) (C {(exit)} {(1)}) ] spids: [16777215 245] ) ] spids: [16777215 260] ) (C {(kubeconfig-federation-context)} { (DQ (BracedVarSub token: <VSub_Name HOST_CLUSTER_ZONE> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [266 269] ) ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:HOST_CLUSTER_CONTEXT) op: Equal rhs: {(DQ (${ VSub_Name CLUSTER_CONTEXT))} spids: [273] ) ] spids: [273] ) ] spids: [16777215 222] ) ] spids: [16777215 280] ) (FuncDef name: federation_cluster_contexts body: (BraceGroup children: [ (Assignment keyword: Assign_Local flags: [-r] pairs: [ (assign_pair lhs: (LhsName name:contexts) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/kubectl.sh))} {(config)} {(get-contexts)} {(-o)} {(name)} ) ] ) left_token: <Left_CommandSub '$('> spids: [297 312] ) } spids: [296] ) ] spids: [292] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:federation_contexts) op: Equal rhs: {(ArrayLiteralPart)} spids: [315] ) ] spids: [315] ) (ForEach iter_name: context iter_words: [{(${ VSub_Name contexts)}] do_arg_iter: False body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ (${ VSub_Name context))} right: {(DQ (${ VSub_Name FEDERATION_KUBE_CONTEXT))} ) ) terminator: <Op_Semi ';'> ) ] action: [(ControlFlow token:<ControlFlow_Continue continue>)] spids: [16777215 359] ) ] spids: [16777215 365] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobNEqual left: {(DQ (${ VSub_Name context))} right: {(federation) (Lit_Other '*')} ) ) terminator: <Op_Semi ';'> ) ] action: [(ControlFlow token:<ControlFlow_Continue continue>)] spids: [16777215 390] ) ] spids: [16777215 396] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:federation_contexts) op: PlusEqual rhs: {(ArrayLiteralPart words:[{(DQ (${ VSub_Name context))}])} spids: [399] ) ] spids: [399] ) ] spids: [331 409] ) spids: [325 329] ) (C {(echo)} { (BracedVarSub token: <VSub_Name federation_contexts> bracket_op: (WholeArray op_id:Lit_At) suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [414 420] ) } ) ] spids: [289] ) spids: [283 288] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:host_kubectl) op: Equal rhs: { (DQ (${ VSub_Name KUBE_ROOT) ('/cluster/kubectl.sh --namespace=') (${ VSub_Name FEDERATION_NAMESPACE) ) } spids: [426] ) ] spids: [426] ) (FuncDef name: cleanup-federation-api-objects body: (BraceGroup children: [ (C {(set)} {(Lit_Other '+') (o)} {(errexit)}) (C {(echo)} {(DQ ('Cleaning Federation control plane objects'))}) (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} { (DQ ('Removing namespace ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name FEDERATION_NAMESPACE) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' from ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name FEDERATION_KUBE_CONTEXT) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } ) (While cond: [ (Sentence child: (SimpleCommand words: [ {($ VSub_Name '$host_kubectl')} {(--context) (Lit_Other '=') (DQ (${ VSub_Name FEDERATION_KUBE_CONTEXT))} {(delete)} {(namespace)} {(DQ (${ VSub_Name FEDERATION_NAMESPACE))} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [519] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [522] ) ] ) terminator: <Op_Semi ';'> ) ] body: (DoGroup children:[(C {(sleep)} {(5)})] spids:[526 550]) ) (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} { (DQ ('Removed namespace ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name FEDERATION_NAMESPACE) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' from ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name FEDERATION_KUBE_CONTEXT) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } ) (ForEach iter_name: context iter_words: [ { (CommandSubPart command_list: (CommandList children:[(C {(federation_cluster_contexts)})]) left_token: <Left_CommandSub '$('> spids: [592 594] ) } ] do_arg_iter: False body: (DoGroup children: [ (Sentence child: (Subshell child: (CommandList children: [ (Assignment keyword: Assign_Local flags: [-r] pairs: [ (assign_pair lhs: (LhsName name:role) op: Equal rhs: { (DQ ('federation-controller-manager:') (${ VSub_Name FEDERATION_NAME) (-) (${ VSub_Name context) (-) (${ VSub_Name HOST_CLUSTER_CONTEXT) ) } spids: [607] ) ] spids: [603] ) (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status) } { (DQ ('Removing namespace ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (${ VSub_Name FEDERATION_NAMESPACE) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (', cluster role ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name role) (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (' and cluster role binding ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name role) (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (' from ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name context) (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ) } ) (While cond: [ (Sentence child: (SimpleCommand words: [ {($ VSub_Name '$host_kubectl')} {(--context) (Lit_Other '=') (DQ (${ VSub_Name context))} {(delete)} {(namespace)} {(DQ (${ VSub_Name FEDERATION_NAMESPACE))} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [686] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [689] ) ] ) terminator: <Op_Semi ';'> ) ] body: (DoGroup children:[(C {(sleep)} {(5)})] spids:[693 717]) ) (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status) } { (DQ ('Removed namespace ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (${ VSub_Name FEDERATION_NAMESPACE) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' from ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (${ VSub_Name context) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } ) (While cond: [ (Sentence child: (SimpleCommand words: [ {($ VSub_Name '$host_kubectl')} {(--context) (Lit_Other '=') (DQ (${ VSub_Name context))} {(delete)} {(clusterrole)} {(DQ (${ VSub_Name role))} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [767] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [770] ) ] ) terminator: <Op_Semi ';'> ) ] body: (DoGroup children:[(C {(sleep)} {(2)})] spids:[774 782]) ) (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status) } { (DQ ('Removed cluster role ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (${ VSub_Name role) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' from ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (${ VSub_Name context) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } ) (While cond: [ (Sentence child: (SimpleCommand words: [ {($ VSub_Name '$host_kubectl')} {(--context) (Lit_Other '=') (DQ (${ VSub_Name context))} {(delete)} {(clusterrolebinding)} {(DQ (${ VSub_Name role))} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [832] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [835] ) ] ) terminator: <Op_Semi ';'> ) ] body: (DoGroup children:[(C {(sleep)} {(2)})] spids:[839 847]) ) (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status) } { (DQ ('Removed cluster role binding ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (${ VSub_Name role) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' from ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (${ VSub_Name context) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } ) ] ) spids: [600 874] ) terminator: <Op_Amp '&'> ) ] spids: [597 879] ) spids: [591 595] ) (C {(wait)}) (C {(set)} {(-o)} {(errexit)}) ] spids: [442] ) spids: [438 441] ) ] )