Feedback

Chat Icon

GitOps the Hard Way, with Argo CD

Build Real GitOps Pipelines From Empty Clusters to Automated Deploys

Argo CD With Helm: Charts, Values, and Versioned Releases
82%

Deploying Helm Charts With Argo CD Using a Helm Repository

To pull the chart from the GitLab registry, Argo CD needs the repository registered with credentials. Create a repository Secret. The argocd.argoproj.io/secret-type: repository label is what tells Argo CD this Secret defines a repo:

cat < $HOME/todo/app/manifests/helm-repo-secret.yaml
apiVersion: v1
kind: Secret
metadata:
  name: helm-repo-secret
  namespace: argocd
  labels:
    # "repository" registers this as a named repo
    argocd.argoproj.io/secret-type: repository
stringData:
  # Must match the Application's repoURL exactly
  url: $HELM_REPO_URL
  # "helm" tells Argo CD to treat this as a Helm repository, not a Git repo
  type: helm
  username: $GITLAB_USERNAME
  password: $GITLAB_TOKEN
EOF

Apply the manifest:

kubectl apply \
  -f $HOME/todo/app/manifests/helm-repo-secret.yaml

Update the Application to source the chart from the Helm repository. The name stays todo-app, so re-applying switches the source in place:

cat < $HOME/todo/app/manifests/app-helm-with-repo.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application

GitOps the Hard Way, with Argo CD

Build Real GitOps Pipelines From Empty Clusters to Automated Deploys

Enroll now to unlock all content and receive all future updates for free.