(command.CommandList
  children: [
    (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.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <docker_monitoring>
      name: docker_monitoring
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          blame_tok: <Id.Lit_LBracket '['>
                          more_env: []
                          words: [{<Id.Lit_LBracket '['>} {<1>} {<Id.Lit_RBracket ']'>}]
                          redirects: []
                          do_fork: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      negated: <Id.KW_Bang '!'>
                                      children: [
                                        (command.Simple
                                          blame_tok: <timeout>
                                          more_env: []
                                          words: [{<timeout>} {<60>} {<docker>} {<ps>}]
                                          redirects: [
                                            (Redir
                                              op: <Id.Redir_Great '>'>
                                              loc: (redir_loc.Fd fd:1)
                                              arg: {<'/dev/null'>}
                                            )
                                          ]
                                          do_fork: T
                                        )
                                      ]
                                      ops: []
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.Simple
                              blame_tok: <echo>
                              more_env: []
                              words: [{<echo>} {(DQ <'Docker daemon failed!'>)}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <pkill>
                              more_env: []
                              words: [{<pkill>} {<docker>}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <sleep>
                              more_env: []
                              words: [{<sleep>} {<30>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          spids: [95 112]
                        )
                      ]
                      else_kw: <Id.KW_Else else>
                      else_action: [
                        (command.Simple
                          blame_tok: <sleep>
                          more_env: []
                          words: [{<sleep>} {(DQ (${ Id.VSub_Name SLEEP_SECONDS))}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <kubelet_monitoring>
      name: kubelet_monitoring
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'Wait for 2 minutes for kubelet to be functional'>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <sleep>
              more_env: []
              words: [{<sleep>} {<120>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<-r>} {<Id.Lit_VarLike 'max_seconds='> <10>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'output='> (DQ )}]
              redirects: []
              do_fork: T
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          blame_tok: <Id.Lit_LBracket '['>
                          more_env: []
                          words: [{<Id.Lit_LBracket '['>} {<1>} {<Id.Lit_RBracket ']'>}]
                          redirects: []
                          do_fork: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Pipeline
                                      negated: <Id.KW_Bang '!'>
                                      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: <curl>
                                                        more_env: []
                                                        words: [
                                                          {<curl>}
                                                          {<-m>}
                                                          {(DQ (${ Id.VSub_Name max_seconds))}
                                                          {<-f>}
                                                          {<-s>}
                                                          {<-S>}
                                                          {<http> <Id.Lit_Colon ':'> <'//127.0.0.1'> 
                                                            <Id.Lit_Colon ':'> <'10255/healthz'>
                                                          }
                                                        ]
                                                        redirects: [
                                                          (Redir
                                                            op: <Id.Redir_GreatAnd '2>&'>
                                                            loc: (redir_loc.Fd fd:2)
                                                            arg: {<1>}
                                                          )
                                                        ]
                                                        do_fork: T
                                                      )
                                                    right: <Id.Eof_RParen _>
                                                  )
                                                }
                                            )
                                          ]
                                          redirects: []
                                        )
                                      ]
                                      ops: []
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.Simple
                              blame_tok: <echo>
                              more_env: []
                              words: [{<echo>} {($ Id.VSub_DollarName output)}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <echo>
                              more_env: []
                              words: [{<echo>} {(DQ <'Kubelet is unhealthy!'>)}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <pkill>
                              more_env: []
                              words: [{<pkill>} {<kubelet>}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <sleep>
                              more_env: []
                              words: [{<sleep>} {<60>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          spids: [206 239]
                        )
                      ]
                      else_kw: <Id.KW_Else else>
                      else_action: [
                        (command.Simple
                          blame_tok: <sleep>
                          more_env: []
                          words: [{<sleep>} {(DQ (${ Id.VSub_Name SLEEP_SECONDS))}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (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_ne
                          left: {(DQ ($ Id.VSub_Pound '#'))}
                          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 <'Usage: health-monitor.sh <docker/kubelet>'>)}]
              redirects: []
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [296 311]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'KUBE_ENV='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'KUBE_ENV='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'KUBE_ENV='> name:KUBE_ENV)
          op: assign_op.Equal
          rhs: {(DQ <'/home/kubernetes/kube-env'>)}
        )
      ]
      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.LogicalNot
                          child: 
                            (bool_expr.Unary
                              op_id: Id.BoolUnary_e
                              child: {(DQ (${ Id.VSub_Name KUBE_ENV))}
                            )
                        )
                      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 <'The '> (${ Id.VSub_Name KUBE_ENV) 
                    <' file does not exist!! Terminate health monitoring'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [333 350]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'SLEEP_SECONDS='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'SLEEP_SECONDS='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SLEEP_SECONDS='> name:SLEEP_SECONDS)
          op: assign_op.Equal
          rhs: {<10>}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'component='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'component='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'component='> name:component)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 1)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <echo>
      more_env: []
      words: [{<echo>} {(DQ <'Start kubernetes health monitoring for '> (${ Id.VSub_Name component))}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <source>
      more_env: []
      words: [{<source>} {(DQ (${ Id.VSub_Name KUBE_ENV))}]
      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.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {(DQ (${ Id.VSub_Name component))}
                          right: {(DQ <docker>)}
                        )
                      right: <Id.Lit_DRightBracket ']]'>
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <docker_monitoring>
              more_env: []
              words: [{<docker_monitoring>}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [394 413]
        )
        (IfArm
          keyword: <Id.KW_Elif elif>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      left: <Id.KW_DLeftBracket '[['>
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {(DQ (${ Id.VSub_Name component))}
                          right: {(DQ <kubelet>)}
                        )
                      right: <Id.Lit_DRightBracket ']]'>
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <kubelet_monitoring>
              more_env: []
              words: [{<kubelet_monitoring>}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [419 438]
        )
      ]
      else_kw: <Id.KW_Else else>
      else_action: [
        (command.Simple
          blame_tok: <echo>
          more_env: []
          words: [
            {<echo>}
            {(DQ <'Health monitoring for component '>) (${ Id.VSub_Name component) 
              (DQ <' is not supported!'>)
            }
          ]
          redirects: []
          do_fork: T
        )
      ]
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
  ]
)