Search code examples
kubernetes-helmgithub-actionsazure-aksorphan-process

Github action terminate helm orphan process and release stuck in "pending-install"


I'm creating a GitHub action pipeline to deploy backend application to AKS. I try to follow this tutorial https://learn.microsoft.com/en-us/learn/modules/aks-deployment-pipeline-github-actions. First, I follow along with the tutorial with my demo project, which works perfectly fine. After that, I apply to exist backend project then something goes wrong.

  1. When deploy on resources aren't upgrade.
  2. Helm release status is shown as "pending-install", but my demo project is in "deployed" status.
  3. Github action terminates the orphan process on complete job step, but there isn't an orphan process in the demo project.[Please see image of pipeline log for reference]

Demo pipeline enter image description here

Backend project pipeline enter image description here

What I've done.

  • I've tried removing all Helm resource(including Helm secret) manually and redo again, but I still face the same error.
  • I've tried to compare every configuration between demo project and backend project but I cannot catch any mismatch.
  • If I helm install backend project from my laptop using the same command but manually inject variable, it works(The release is in deployed status).

Other useful information

  • Helm version on pipeline: v3.3.1
  • Helm command that I currently use:
- name: Run Helm Deploy
        run: |
          helm upgrade \
            --debug \
            --install \
            --create-namespace \
            --atomic \
            --wait \
            --timeout 30m0s \
            --namespace dev \
            xxxx-release-dev \
            ./helm --set image.repository=${{ secrets.ACR_NAME }} --set mongo.url=${{ secrets.MONGO_URL_DEV }}

Solution

  • Thanks to https://www.facebook.com/groups/devopsthailand/ Admin to helps me find out the answer. Github action secrets.MONGO_URL_DEV contains the special character that is needed to put a double quote between. Those special characters weird behavior when executed. After putting a double quote in, it works!!.