(command.CommandList children: [ (command.Simple blame_tok: <set> more_env: [] words: [{<set>} {<-o>} {<errexit>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <set> more_env: [] words: [{<set>} {<-o>} {<nounset>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <set> more_env: [] words: [{<set>} {<-o>} {<pipefail>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'KUBE_ROOT='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'KUBE_ROOT='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'KUBE_ROOT='> name:KUBE_ROOT) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <dirname> more_env: [] words: [{<dirname>} {(DQ (${ Id.VSub_Name BASH_SOURCE))}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) <'/..'> } ) ] redirects: [] ) (command.Simple blame_tok: <source> more_env: [] words: [{<source>} {(DQ (${ Id.VSub_Name KUBE_ROOT) <'/hack/lib/init.sh'>)}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'KUBECTL='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'KUBECTL='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'KUBECTL='> name:KUBECTL) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name KUBE_OUTPUT_HOSTBIN) <'/kubectl'>)} ) ] redirects: [] ) (command.Simple blame_tok: <declare> more_env: [] words: [ {<declare>} {<-a>} {<Id.Lit_VarLike 'resources='> (ShArrayLiteral left: <Id.Op_LParen _> words: [ {(DQ <endpoints>)} {(DQ <events>)} {(DQ <limitranges>)} {(DQ <namespaces>)} {(DQ <nodes>)} {(DQ <pods>)} {(DQ <persistentvolumes>)} {(DQ <persistentvolumeclaims>)} {(DQ <replicationcontrollers>)} {(DQ <resourcequotas>)} {(DQ <secrets>)} {(DQ <services>)} {(DQ <jobs>)} {(DQ <horizontalpodautoscalers>)} {(DQ <storageclasses>)} {(DQ <roles.rbac.authorization.k8s.io>)} {(DQ <rolebindings.rbac.authorization.k8s.io>)} {(DQ <clusterroles.rbac.authorization.k8s.io>)} {(DQ <clusterrolebindings.rbac.authorization.k8s.io>)} ] right: <Id.Right_ShArrayLiteral _> ) } ] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'namespaces='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'namespaces='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'namespaces='> name:namespaces) op: assign_op.Equal rhs: { (ShArrayLiteral left: <Id.Op_LParen _> words: [ { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <Id.Left_DoubleQuote '"'> more_env: [] words: [ {(DQ (${ Id.VSub_Name KUBECTL))} {<get>} {<namespaces>} {<-o>} {<go-template> <Id.Lit_Equals '='> (DQ <'{{range.items}}{{.metadata.name}} {{end}}'>) } ] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) } ] right: <Id.Right_ShArrayLiteral _> ) } ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-z>} { (DQ (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name namespaces> var_name: namespaces suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:(rhs_word__Empty)) right: <Id.Right_DollarBrace '}'> ) ) } {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Unexpected: No namespace found. Nothing to do.'>)}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [254 269] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'all_failed='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'all_failed='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'all_failed='> name:all_failed) op: assign_op.Equal rhs: {<1>} ) ] redirects: [] ) (command.ForEach keyword: <Id.KW_For for> iter_names: [resource] iterable: (for_iter.Words words: [ { (DQ (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name resources> var_name: resources bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) right: <Id.Right_DollarBrace '}'> ) ) } ] ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.ForEach keyword: <Id.KW_For for> iter_names: [namespace] iterable: (for_iter.Words words: [ { (DQ (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name namespaces> var_name: namespaces bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) right: <Id.Right_DollarBrace '}'> ) ) } ] ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.Simple blame_tok: <set> more_env: [] words: [{<set>} {<Id.Lit_Other '+'> <e>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'instances='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'instances='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'instances='> name:instances) op: assign_op.Equal rhs: { (ShArrayLiteral left: <Id.Op_LParen _> words: [ { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <Id.Left_DoubleQuote '"'> more_env: [] words: [ {(DQ (${ Id.VSub_Name KUBECTL))} {<get>} {(DQ (${ Id.VSub_Name resource))} {<--namespace> <Id.Lit_Equals '='> (DQ (${ Id.VSub_Name namespace)) } {<-o>} {<go-template> <Id.Lit_Equals '='> (DQ <'{{range.items}}{{.metadata.name}} {{end}}'>) } ] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) } ] right: <Id.Right_ShArrayLiteral _> ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'result='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'result='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'result='> name:result) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} ) ] redirects: [] ) (command.Simple blame_tok: <set> more_env: [] words: [{<set>} {<-e>}] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket left: <Id.KW_DLeftBracket '[['> expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_eq left: {(DQ (${ Id.VSub_Name all_failed))} right: {<1>} ) right: (bool_expr.Binary op_id: Id.BoolBinary_eq left: {(DQ (${ Id.VSub_Name result))} right: {<0>} ) ) right: <Id.Lit_DRightBracket ']]'> redirects: [] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'all_failed='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'all_failed='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'all_failed='> name: all_failed ) op: assign_op.Equal rhs: {<0>} ) ] redirects: [] ) ] spids: [392 421] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.DBracket left: <Id.KW_DLeftBracket '[['> expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: { (DQ (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name instances> var_name: instances suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:(rhs_word__Empty)) right: <Id.Right_DollarBrace '}'> ) ) } ) right: <Id.Lit_DRightBracket ']]'> redirects: [] ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Continue continue>)] spids: [436 452] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ForEach keyword: <Id.KW_For for> iter_names: [instance] iterable: (for_iter.Words words: [ { (DQ (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name instances> var_name: instances bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) right: <Id.Right_DollarBrace '}'> ) ) } ] ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.ShAssignment left: <Id.Lit_VarLike 'success='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'success='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'success='> name: success ) op: assign_op.Equal rhs: {<0>} ) ] redirects: [] ) (command.ForExpr keyword: <Id.KW_For for> init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: ($ Id.Lit_ArithVarLike tries) right: {<Id.Lit_Digits 0>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: ($ Id.Lit_ArithVarLike tries) right: {<Id.Lit_Digits 5>} ) update: (arith_expr.UnaryAssign op_id: Id.Arith_DPlus child: ($ Id.Lit_ArithVarLike tries) ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.ShAssignment left: <Id.Lit_VarLike 'filename='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'filename='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'filename='> name: filename ) op: assign_op.Equal rhs: { (DQ <'/tmp/k8s-'> (${ Id.VSub_Name namespace) <-> (${ Id.VSub_Name resource) <-> (${ Id.VSub_Name instance) <.json> ) } ) ] redirects: [] ) (command.AndOr children: [ (command.Subshell left: <Id.Op_LParen _> child: (command.Simple blame_tok: <Id.Left_DoubleQuote '"'> more_env: [] words: [ {(DQ (${ Id.VSub_Name KUBECTL))} {<get>} {(DQ (${ Id.VSub_Name resource))} {(DQ (${ Id.VSub_Name instance))} {<--namespace> <Id.Lit_Equals '='> (DQ (${ Id.VSub_Name namespace)) } {<-o>} {<json>} ] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name filename))} ) ] do_fork: T ) right: <Id.Right_Subshell _> redirects: [] ) (command.Simple blame_tok: <true> more_env: [] words: [{<true>}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.DBracket left: <Id.KW_DLeftBracket '[['> expr: (bool_expr.LogicalNot child: (bool_expr.Unary op_id: Id.BoolUnary_s child: {(DQ (${ Id.VSub_Name filename))} ) ) right: <Id.Lit_DRightBracket ']]'> redirects: [] ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Looks like '> (${ Id.VSub_Name instance) <' got deleted. Ignoring it'> ) } ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Continue continue> ) ] spids: [595 612] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.AndOr children: [ (command.ShAssignment left: <Id.Lit_VarLike 'output='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'output='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'output='> name: output ) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <Id.Left_DoubleQuote '"'> more_env: [] words: [ {(DQ (${ Id.VSub_Name KUBECTL))} {<replace>} {<-f>} {(DQ (${ Id.VSub_Name filename))} {<--namespace> <Id.Lit_Equals '='> (DQ (${ Id.VSub_Name namespace)) } ] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) } ) ] redirects: [] ) (command.Simple blame_tok: <true> more_env: [] words: [{<true>}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) (command.Simple blame_tok: <rm> more_env: [] words: [{<rm>} {(DQ (${ Id.VSub_Name filename))}] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-n>} { (DQ (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name output> var_name: output suffix_op: (suffix_op.Unary op: <Id.VTest_ColonHyphen _> arg_word: (rhs_word__Empty) ) right: <Id.Right_DollarBrace '}'> ) ) } {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'success='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'success='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'success='> name: success ) op: assign_op.Equal rhs: {<1>} ) ] redirects: [] ) (command.ControlFlow keyword: <Id.ControlFlow_Break break> ) ] spids: [681 697] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.DBracket left: <Id.KW_DLeftBracket '[['> expr: (bool_expr.Binary op_id: Id.BoolBinary_eq left: {(DQ (${ Id.VSub_Name success))} right: {<0>} ) right: <Id.Lit_DRightBracket ']]'> redirects: [] ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Error: failed to update '> (${ Id.VSub_Name resource) <'/'> (${ Id.VSub_Name instance) <' in '> (${ Id.VSub_Name namespace) <' namespace after 5 tries'> ) } ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [713 730] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.AndOr children: [ (command.DBracket left: <Id.KW_DLeftBracket '[['> expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ (${ Id.VSub_Name resource))} right: {(DQ <namespaces>)} ) right: <Id.Lit_DRightBracket ']]'> redirects: [] ) (command.DBracket left: <Id.KW_DLeftBracket '[['> expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ (${ Id.VSub_Name resource))} right: {(DQ <nodes>)} ) right: <Id.Lit_DRightBracket ']]'> redirects: [] ) ] ops: [<Id.Op_DPipe _>] ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Break break>)] spids: [763 800] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket left: <Id.KW_DLeftBracket '[['> expr: (bool_expr.Binary op_id: Id.BoolBinary_eq left: {(DQ (${ Id.VSub_Name all_failed))} right: {<1>} ) right: <Id.Lit_DRightBracket ']]'> redirects: [] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'kubectl get failed for all resources'>)}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [822 839] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'All objects updated successfully!!'>)}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )