Container Registry Enterprise Edition (ACR EE) can store Helm charts as OCI artifacts. This topic walks you through pushing a Helm chart to an ACR EE instance and deploying it across environments using ACK One GitOps (Argo CD).
Prerequisites
Before you begin, ensure that you have:
Fleet management enabled. See Enable Fleet management.
The kubeconfig file of your Fleet instance downloaded from the ACK One console, with kubectl connected to the Fleet instance.
The latest Argo CD CLI installed. See Argo CD releases.
Step 1: Push the Helm chart to ACR EE
Package your Helm chart and push it to your ACR EE instance. This topic uses the echo-server chart at version 0.1.1 as an example. In this example, the tar command is used to create the package. We recommend that you use the helm package command. For detailed steps, see Push and pull Helm charts.
Step 2: Add an OCI repository
Run the following command to register your ACR EE instance as an OCI Helm repository in Argo CD:
argocd repo add <registry-domain> --type helm --name <repo-name> --enable-oci --username <username> --password <password>Example:
argocd repo add demo***-registry.cn-hangzhou.cr.aliyuncs.com --type helm --name acr-oci --enable-oci --username ack***@test.aliyunid.com --password <password>Replace the placeholders with your actual values:
| Placeholder | Description | Example |
|---|---|---|
<registry-domain> | Your ACR EE instance domain | demo***-registry.cn-hangzhou.cr.aliyuncs.com |
<repo-name> | A display name for the repository in Argo CD | acr-oci |
<username> | Your Alibaba Cloud account username | ack***@test.aliyunid.com |
<password> | Your Alibaba Cloud account password | — |
Step 3: Deploy the application
Create a file named
app-helm-dev-oci.yamlwith the following content:apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: app-helm-dev-oci spec: # Deployment target: the cluster and namespace to deploy into destination: namespace: app-helm-dev-oci server: <apiserver-url> # Example: https://XX.XX.XX.XX:6443 # Chart source: the OCI repository, chart name, and version source: repoURL: <registry-domain>/<namespace> # Example: demo***-registry.cn-hangzhou.cr.aliyuncs.com/test chart: <my-chart-name> # Example: echo-server targetRevision: <my-chart-version> # Example: 0.1.1 helm: passCredentials: true valueFiles: - values-dev.yaml # Defaults to values.yaml if not specified project: default # Sync policy: automatically sync and create the namespace if it does not exist syncPolicy: automated: {} syncOptions: - CreateNamespace=trueReplace the placeholders with your actual values:
Placeholder Description Example <apiserver-url>API server URL of the target cluster https://XX.XX.XX.XX:6443<registry-domain>/<namespace>Registry domain and namespace demo***-registry.cn-hangzhou.cr.aliyuncs.com/test<my-chart-name>Helm chart name echo-server<my-chart-version>Chart version to deploy 0.1.1Create the application:
argocd app create -f app-helm-dev-oci.yamlArgo CD syncs the application automatically based on the
automatedsync policy and creates theapp-helm-dev-ocinamespace if it does not exist.