(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 {(dirname)} {(DQ (${ VSub_Name BASH_SOURCE))})] ) left_token: <Left_CommandSub '$('> spids: [92 100] ) (/../..) } spids: [91] ) ] spids: [91] ) (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_Readonly pairs: [ (assign_pair lhs: (LhsName name:KUBE_ANYWHERE_FEDERATION_IMAGE) op: Equal rhs: {(DQ (gcr.io/madhusudancs-containers/kubernetes-anywhere-federation))} spids: [131] ) ] spids: [129] ) (Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs: (LhsName name:KUBE_ANYWHERE_FEDERATION_VERSION) op: Equal rhs: {(DQ (v0.9.0))} spids: [138] ) ] spids: [136] ) (Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs: (LhsName name:KUBE_ANYWHERE_FEDERATION_CHARTS_IMAGE) op: Equal rhs: {(DQ (gcr.io/madhusudancs-containers/federation-charts))} spids: [145] ) ] spids: [143] ) (Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs: (LhsName name:KUBE_ANYWHERE_FEDERATION_CHARTS_VERSION) op: Equal rhs: {(DQ (v0.9.1))} spids: [152] ) ] spids: [150] ) (Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs: (LhsName name:GOOGLE_APPLICATION_CREDENTIALS) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name GOOGLE_APPLICATION_CREDENTIALS> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(${ VSub_Name HOME) (Lit_Slash /) (.config) (Lit_Slash /) (gcloud) (Lit_Slash /) (application_default_credentials.json) } ) spids: [162 174] ) ) } spids: [160] ) ] spids: [158] ) (Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs: (LhsName name:KUBE_CONFIG_DIR) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name KUBE_CONFIG_DIR> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(${ VSub_Name HOME) (Lit_Slash /) (.kube)} ) spids: [181 189] ) ) } spids: [179] ) ] spids: [177] ) (Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs: (LhsName name:KUBE_CONFIG) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name KUBE_CONFIG> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(${ VSub_Name HOME) (Lit_Slash /) (.kube) (Lit_Slash /) (config)} ) spids: [196 206] ) ) } spids: [194] ) ] spids: [192] ) (FuncDef name: pull_installer body: (BraceGroup children: [ (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} {(DQ ('Pulling installer images'))} ) (C {(docker)} {(pull)} { (DQ (${ VSub_Name KUBE_ANYWHERE_FEDERATION_IMAGE) (':') (${ VSub_Name KUBE_ANYWHERE_FEDERATION_VERSION) ) } ) (C {(docker)} {(pull)} { (DQ (${ VSub_Name KUBE_ANYWHERE_FEDERATION_CHARTS_IMAGE) (':') (${ VSub_Name KUBE_ANYWHERE_FEDERATION_CHARTS_VERSION) ) } ) ] spids: [216] ) spids: [210 215] ) (FuncDef name: ensure_files body: (BraceGroup children: [ (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} {(DQ ('Ensure provider is supported'))} ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalAnd left: (BoolBinary op_id: BoolBinary_GlobNEqual left: { (DQ (BracedVarSub token: <VSub_Name KUBERNETES_PROVIDER> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [291 294] ) ) } right: {(DQ (gce))} ) right: (BoolBinary op_id: BoolBinary_GlobNEqual left: { (DQ (BracedVarSub token: <VSub_Name KUBERNETES_PROVIDER> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [306 309] ) ) } right: {(DQ (gke))} ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('Supported providers: ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (gce) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (', ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (gke) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } ) (C {(exit)} {(1)}) ] spids: [16777215 321] ) ] spids: [16777215 343] ) (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} {(DQ ('Ensure credential files exist'))} ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalNot child: (BoolUnary op_id: BoolUnary_f child: {(DQ (${ VSub_Name GOOGLE_APPLICATION_CREDENTIALS))} ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('Please ensure Google credentials file ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) (${ VSub_Name GOOGLE_APPLICATION_CREDENTIALS) (DQ (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' exists.')) } ) (C {(exit)} {(1)}) ] spids: [16777215 377] ) ] spids: [16777215 400] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalNot child: (BoolUnary op_id: BoolUnary_f child: {(DQ (${ VSub_Name KUBE_CONFIG))} ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('Please ensure kubeconfig file ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) (${ VSub_Name KUBE_CONFIG) (DQ (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' exists.')) } ) (C {(exit)} {(1)}) ] spids: [16777215 421] ) ] spids: [16777215 444] ) ] spids: [270] ) spids: [264 269] ) (FuncDef name: kube_action body: (BraceGroup children: [ (C {(Lit_Other ':')} { (DQ (BracedVarSub token: <VSub_Name FEDERATION_OUTPUT_ROOT> suffix_op: (StringUnary op_id:VTest_ColonQMark arg_word:{('must be set')}) spids: [461 465] ) ) } ) (Assignment keyword: Assign_Local flags: [-r] pairs: [ (assign_pair lhs: (LhsName name:action) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [476 479] ) ) } spids: [474] ) ] spids: [470] ) (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} {(DQ ('Action: ') (${ VSub_Name action) (' clusters'))} ) (C {(docker)} {(run)} {(--user) (Lit_Other '=') (DQ (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-u)})]) left_token: <Left_CommandSub '$('> spids: [509 513] ) (':') (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-g)})]) left_token: <Left_CommandSub '$('> spids: [515 519] ) ) } {(-m)} {(12G)} {(-v)} { (DQ (${ VSub_Name GOOGLE_APPLICATION_CREDENTIALS) (':/.config/gcloud/application_default_credentials.json:ro') ) } {(-v)} {(DQ (${ VSub_Name KUBE_CONFIG_DIR) (':/.kube'))} {(-v)} {(DQ (${ VSub_Name FEDERATION_OUTPUT_ROOT) (':/_output'))} { (DQ (${ VSub_Name KUBE_ANYWHERE_FEDERATION_IMAGE) (':') (${ VSub_Name KUBE_ANYWHERE_FEDERATION_VERSION) ) } {(DQ (${ VSub_Name action))} ) ] spids: [455] ) spids: [449 454] ) (FuncDef name: federation_action body: (BraceGroup children: [ (C {(Lit_Other ':')} { (DQ (BracedVarSub token: <VSub_Name FEDERATION_OUTPUT_ROOT> suffix_op: (StringUnary op_id:VTest_ColonQMark arg_word:{('must be set')}) spids: [596 600] ) ) } ) (Assignment keyword: Assign_Local flags: [-r] pairs: [ (assign_pair lhs: (LhsName name:action) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [611 614] ) ) } spids: [609] ) ] spids: [605] ) (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} {(DQ ('Action: ') (${ VSub_Name action) (' federation components'))} ) (C {(docker)} {(run)} {(-m)} {(12G)} {(-v)} { (DQ (${ VSub_Name GOOGLE_APPLICATION_CREDENTIALS) (':/root/.config/gcloud/application_default_credentials.json:ro') ) } {(-v)} {(DQ (${ VSub_Name KUBE_CONFIG) (':/root/.kube/config'))} {(-v)} {(DQ (${ VSub_Name FEDERATION_OUTPUT_ROOT) (':/_output'))} { (DQ (${ VSub_Name KUBE_ANYWHERE_FEDERATION_CHARTS_IMAGE) (':') (${ VSub_Name KUBE_ANYWHERE_FEDERATION_CHARTS_VERSION) ) } {(DQ (${ VSub_Name action))} ) ] spids: [590] ) spids: [584 589] ) (FuncDef name: redeploy_federation body: (BraceGroup children: [ (C {(Lit_Other ':')} { (DQ (BracedVarSub token: <VSub_Name FEDERATION_OUTPUT_ROOT> suffix_op: (StringUnary op_id:VTest_ColonQMark arg_word:{('must be set')}) spids: [725 729] ) ) } ) (Assignment keyword: Assign_Local flags: [-r] pairs: [ (assign_pair lhs: (LhsName name:action) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [740 743] ) ) } spids: [738] ) ] spids: [734] ) (C {(kube) (Lit_Other ':') (Lit_Other ':') (log) (Lit_Other ':') (Lit_Other ':') (status)} {(DQ (${ VSub_Name action) (' federation components'))} ) (C {(docker)} {(run)} {(-m)} {(12G)} {(-v)} {(DQ (${ VSub_Name KUBE_CONFIG) (':/root/.kube/config:ro'))} {(-v)} {(DQ (${ VSub_Name FEDERATION_OUTPUT_ROOT) (':/_output'))} { (DQ (${ VSub_Name KUBE_ANYWHERE_FEDERATION_CHARTS_IMAGE) (':') (${ VSub_Name KUBE_ANYWHERE_FEDERATION_CHARTS_VERSION) ) } {(DQ (${ VSub_Name action))} ) ] spids: [719] ) spids: [713 718] ) (Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs: (LhsName name:ACTION) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [822 825] ) ) } spids: [820] ) ] spids: [818] ) (Case to_match: {(DQ (${ VSub_Name ACTION))} arms: [ (case_arm pat_list: [{(DQ )}] action: [ (C {(echo)} { (SQ <'Action must be one of [init, deploy_clusters, deploy_federation, \\\n'> <' destroy_federation, destroy_clusters, redeploy_federation], \\\n'> <' got: '> ) (DQ (${ VSub_Name ACTION)) } ) (C {(exit)} {(1)}) ] spids: [16777215 841 863 16777215] ) (case_arm pat_list: [{(DQ (init))}] action: [(C {(pull_installer)})] spids: [867 869 875 16777215] ) (case_arm pat_list: [{(DQ (deploy_clusters))}] action: [(C {(ensure_files)}) (C {(kube_action)} {(deploy)})] spids: [879 881 892 16777215] ) (case_arm pat_list: [{(DQ (deploy_federation))}] action: [(C {(ensure_files)}) (C {(federation_action)} {(deploy)})] spids: [896 898 909 16777215] ) (case_arm pat_list: [{(DQ (destroy_federation))}] action: [(C {(federation_action)} {(destroy)})] spids: [913 915 923 16777215] ) (case_arm pat_list: [{(DQ (destroy_clusters))}] action: [(C {(kube_action)} {(destroy)})] spids: [927 929 937 16777215] ) (case_arm pat_list: [{(DQ (redeploy_federation))}] action: [(C {(redeploy_federation)})] spids: [941 943 949 16777215] ) ] spids: [828 836 951] ) ] )