(CommandList
  children: [
    (C {(set)} {(-e)})
    (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: [54 62]
              ) (/../..)
            }
          spids: [53]
        )
      ]
      spids: [53]
    )
    (C {(source)} {(DQ (config-default.sh))})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:KUBECTL)
          op: Equal
          rhs: {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/kubectl.sh))}
          spids: [71]
        )
      ]
      spids: [71]
    )
    (C {(export)} 
      {(Lit_VarLike 'KUBECTL_PATH=') (DQ (${ VSub_Name KUBE_ROOT) (/cluster/centos/binaries/kubectl))}
    )
    (C {(export)} 
      {(Lit_VarLike 'KUBE_CONFIG_FILE=') 
        (BracedVarSub
          token: <VSub_Name KUBE_CONFIG_FILE>
          suffix_op: 
            (StringUnary
              op_id: VTest_ColonHyphen
              arg_word: 
                {(${ VSub_Name KUBE_ROOT) (Lit_Slash /) (cluster) (Lit_Slash /) (centos) (Lit_Slash /) 
                  (config-default.sh)
                }
            )
          spids: [92 104]
        )
      }
    )
    (FuncDef
      name: deploy_dns
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {(DQ ('Deploying DNS on Kubernetes'))})
            (C {(cp)} {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/addons/dns/kube-dns.yaml.sed))} 
              {(kube-dns.yaml)}
            )
            (C {(sed)} {(-i)} {(-e)} 
              {
                (DQ (s/) (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) 
                  (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (DNS_DOMAIN/) (${ VSub_Name DNS_DOMAIN) (/g)
                )
              } {(kube-dns.yaml)}
            )
            (C {(sed)} {(-i)} {(-e)} 
              {
                (DQ (s/) (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) 
                  (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (DNS_SERVER_IP/) (${ VSub_Name DNS_SERVER_IP) (/g)
                )
              } {(kube-dns.yaml)}
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:KUBEDNS)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(eval)} 
                                {
                                  (DQ (${ VSub_Name KUBECTL) 
                                    (' get services --namespace=kube-system | grep kube-dns | cat')
                                  )
                                }
                              )
                            ]
                          )
                        left_token: <Left_Backtick '`'>
                        spids: [175 184]
                      )
                    }
                  spids: [174]
                )
              ]
              spids: [174]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$KUBEDNS'))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(${ VSub_Name KUBECTL)} {(--namespace) (Lit_Other '=') (kube-system)} {(create)} 
                      {(-f)} {(kube-dns.yaml)}
                    )
                    (C {(echo)} {(DQ ('Kube-dns addon is successfully deployed.'))})
                  ]
                  spids: [16777215 202]
                )
              ]
              else_action: [(C {(echo)} {(DQ ('Kube-dns addon is already deployed. Skipping.'))})]
              spids: [232 242]
            )
            (C {(echo)})
          ]
          spids: [111]
        )
      spids: [107 110]
    )
    (FuncDef
      name: deploy_dashboard
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (Pipeline
                          children: [
                            (C {(${ VSub_Name KUBECTL)} {(get)} {(rc)} {(-l)} 
                              {(k8s-app) (Lit_Other '=') (kubernetes-dashboard)} {(--namespace) (Lit_Other '=') (kube-system)}
                            )
                            (C {(grep)} {(kubernetes-dashboard-v)})
                          ]
                          negated: False
                        )
                      terminator: <Op_Amp '&'>
                    )
                    (Sentence
                      child: 
                        (SimpleCommand
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 16777215
                              arg_word: {(/dev/null)}
                              spids: [285]
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ('Kubernetes Dashboard replicationController already exists'))})
                  ]
                  spids: [16777215 290]
                )
              ]
              else_action: [
                (C {(echo)} {(DQ ('Creating Kubernetes Dashboard replicationController'))})
                (C {(${ VSub_Name KUBECTL)} {(create)} {(-f)} 
                  {(${ VSub_Name KUBE_ROOT) (/cluster/addons/dashboard/dashboard-controller.yaml)}
                )
              ]
              spids: [300 324]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(${ VSub_Name KUBECTL)} {(get)} {(service/kubernetes-dashboard)} 
                          {(--namespace) (Lit_Other '=') (kube-system)}
                        )
                      terminator: <Op_Amp '&'>
                    )
                    (Sentence
                      child: 
                        (SimpleCommand
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 16777215
                              arg_word: {(/dev/null)}
                              spids: [343]
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {(echo)} {(DQ ('Kubernetes Dashboard service already exists'))})]
                  spids: [16777215 348]
                )
              ]
              else_action: [
                (C {(echo)} {(DQ ('Creating Kubernetes Dashboard service'))})
                (C {(${ VSub_Name KUBECTL)} {(create)} {(-f)} 
                  {(${ VSub_Name KUBE_ROOT) (/cluster/addons/dashboard/dashboard-service.yaml)}
                )
              ]
              spids: [358 382]
            )
            (C {(echo)})
          ]
          spids: [255]
        )
      spids: [251 254]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(DQ (${ VSub_Name ENABLE_CLUSTER_DNS))} 
                  {(Lit_Other '=') (Lit_Other '=')} {(true)} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(deploy_dns)})]
          spids: [16777215 410]
        )
      ]
      spids: [16777215 415]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(DQ (${ VSub_Name ENABLE_CLUSTER_UI))} 
                  {(Lit_Other '=') (Lit_Other '=')} {(true)} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(deploy_dashboard)})]
          spids: [16777215 436]
        )
      ]
      spids: [16777215 441]
    )
  ]
)