(CommandList children: [ (C {(set)} {(-o)} {(errexit)}) (C {(set)} {(-o)} {(nounset)}) (C {(set)} {(-o)} {(pipefail)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBE_ROOT) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(readlink)} {(-m)} { (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ (${ VSub_Name BASH_SOURCE))})] ) left_token: <Left_CommandSub '$('> spids: [69 77] ) (/../../) } ) ] ) left_token: <Left_CommandSub '$('> spids: [64 79] ) } spids: [63] ) ] spids: [63] ) (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/federation/cluster/common.sh))}) (FuncDef name: federation_clusters body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:clusters) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/kubectl.sh))} {(--context) (Lit_Other '=') (DQ (${ VSub_Name FEDERATION_KUBE_CONTEXT)) } {(-o)} {(jsonpath)} {(--template)} {(SQ <'{.items[*].metadata.name}'>)} {(get)} {(clusters)} ) ] ) left_token: <Left_CommandSub '$('> spids: [119 154] ) } spids: [118] ) ] spids: [118] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(${ VSub_Name clusters)}) (ControlFlow token:<ControlFlow_Return return>) ] spids: [16777215 158] ) ] spids: [16777215 171] ) (C {(echo)} {(DQ )}) ] spids: [113] ) spids: [107 112] ) (FuncDef name: unjoin_clusters body: (BraceGroup children: [ (ForEach iter_name: context iter_words: [ { (CommandSubPart command_list: (CommandList children:[(C {(federation_clusters)})]) left_token: <Left_CommandSub '$('> spids: [216 218] ) } ] do_arg_iter: False body: (DoGroup children: [ (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status) } { (DQ ('Unjoining cluster ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name context) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' from federation ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name FEDERATION_NAME) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } ) (C {(DQ (${ VSub_Name KUBE_ROOT) (/federation/develop/kubefed.sh))} {(unjoin)} {(DQ (${ VSub_Name context))} {(--federation-system-namespace) (Lit_Other '=') (${ VSub_Name FEDERATION_NAMESPACE)} {(--context) (Lit_Other '=') (DQ (${ VSub_Name FEDERATION_KUBE_CONTEXT))} {(--host-cluster-context) (Lit_Other '=') (DQ (${ VSub_Name HOST_CLUSTER_CONTEXT))} {(--v) (Lit_Other '=') (4)} ) ] spids: [221 301] ) spids: [215 219] ) ] spids: [191] ) spids: [185 190] ) (C {(unjoin_clusters)}) (If arms: [ (if_arm cond: [(Sentence child:(C {(cleanup-federation-api-objects)}) terminator:<Op_Semi ';'>)] action: [ (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} { (DQ ( 'Waiting for 2 minutes to allow controllers to clean up federation components...' ) ) } ) (C {(sleep)} {(2m)}) ] spids: [16777215 314] ) ] else_action: [(C {(echo)} {(DQ ("Couldn't cleanup federation api objects"))})] spids: [370 379] ) ] )