This topic describes the use cases and principles of a Helm chart deployment package and explains how to create and use it.
Use cases
-
If you need to keep your Helm charts private when deploying services, we recommend using Helm chart deployment packages in Compute Nest. These packages are stored in a Compute Nest ACR repository and are pulled securely using a temporary key.
ImportantFor publicly accessible Helm charts, you can deploy them by specifying their public URL in the service's ROS template. No extra configuration is required.
-
Helm charts are typically used for services with complex structures and numerous YAML deployment files to manage these files in a structured way. In Compute Nest, Helm chart deployment packages are hosted in an ACR repository. For more information about the upload and pull mechanism, see container image artifact.
How it works
To use a Helm chart deployment package in a service template, you must define the following two placeholders. These placeholders are replaced with actual values during deployment:
-
{{computenest::helmchart::test}}: The deployment package placeholder. This is replaced with the full URL of the Helm chart, for example,oci://compute-nest-chart-registry.cn-hangzhou.cr.aliyuncs.com/${aliUid}/wordpress:15.4.1. -
{{computenest::helm::dockerconfigjson}}: The repository pull secret, used to pull Helm charts hosted in the Compute Nest ACR repository.
Helm chart deployment uses the public module MODULE::ACS::ComputeNest::FluxOciHelmDeploy defined by Compute Nest. This module uses the open-source component FluxCD and currently supports only chart repositories in OCI format. The repository for Compute Nest Helm chart deployment packages uses the OCI format. The following sample template shows how to deploy a Helm chart deployment package by using MODULE::ACS::ComputeNest::FluxOciHelmDeploy:
Resources:
FluxHelmDeploy:
Type: MODULE::ACS::ComputeNest::FluxOciHelmDeploy
Version: v1
Properties:
ClusterId:
Ref: ClusterId
ReleaseName: wordpress
Namespace: wordpress
HelmChartUrl: '{{ computenest::helmchart::test }}'
DockerConfigJson: '{{ computenest::helm::dockerconfigjson }}'
ChartValues:
mariadb:
primary:
persistence:
enabled: true
storageClass: alicloud-disk-essd
size: 20Gi
persistence:
enabled: false
...
Creation and usage
Prerequisites
Ensure that the Helm CLI is installed and you have a packaged Helm chart. If you do not, see Push and pull Helm charts.
Create a Helm chart package
-
Configure basic information for the deployment package.
-
Log on to the Compute Nest console. In the left-side navigation pane, choose Service Deployment Package. On the Packages tab, click Create Deployment Package.
-
In the Basic Information section, configure the following parameters.
Parameter
Description
Deployment Package Name
The name can contain Chinese characters, English letters, digits, and underscores (_). The name must be 3 to 128 characters long, where a Chinese character counts as two characters. The deployment package name cannot be changed after creation.
Version Name
The name can contain Chinese characters, English letters, digits, and underscores (_). The name must be 3 to 50 characters long, where a Chinese character counts as two characters.
Description
The description must be 10 to 500 characters long. A Chinese character counts as two characters.
Resource Group
Select the resource group to which the deployment package belongs.
Resource groups allow you to group your cloud resources by usage, permissions, or ownership, enabling hierarchical resource management for multiple users and projects within an organization. For more information, see resource groups.
Tag Settings
Select or enter a complete tag key and tag value to add a tag to the deployment package. You can bind up to 20 tags to a resource. If no tag keys or values are available, you can create a custom tag. For more information, see Create and bind a custom tag.
-
-
Configure the Helm chart deployment package.
-
In the Deployment Package Content section, set Deployment Package Type to Helm chart.
-
Click Obtain Access Credential to get a temporary key for the namespace. Then, run the provided commands in your terminal.
On the Helm chart tab, the page displays a three-step process. Step 1: Log in to the image repository by running the
helm registry logincommand. Step 2: Tag the chart and push it to the image repository. Step 3: Enter the chart name, for example,chart-name, and run thehelm push chart-name.tgz oci://xxxcommand to complete the push. -
After you upload the Helm chart to the Compute Nest ACR repository, select the newly uploaded chart and click Publish Deployment Package.
-
-
View the deployment package.
-
Return to the Service Deployment Package page. Click the name of your deployment package to open the Deployment Package Details page and check the creation progress.
-
When the status changes to Available, the deployment package is ready to use.
-
Use a Helm chart package
This section explains how to use a Helm chart deployment package, using the creation of a private service as an example.
-
Log on to the Compute Nest console.
-
In the left-side navigation pane, click My Services. On the Created Services tab of the My Services page, click Create Service.
-
On the Create New Service page, select Custom launch as the creation method, select Private Service as the service type, and click Next: Configure Settings.
-
Enter the basic information for the service and provide a ROS template.
In the service's ROS template, add the Helm chart deployment package placeholder
{{ computenest::helmchart::test}}and the pull secret placeholder{{ computenest::helm::dockerconfigjson}}. -
In the Deployment Package Association section, configure the Associate Helm. Click Select Deployment Package, choose the desired deployment package and version from the dialog box, and click OK to associate it with the placeholder.
In the dialog box, the Association identifier is displayed in a format like
{{ computenest::helmchart::wordpress }}. You can only select Helm chart deployment packages. After the association is complete, the Helm Association section at the bottom of the page displays the mapping between the association identifier and the associated deployment package. -
After you create and successfully test the service, check the service against the Compute Nest review criteria and submit the service for review. For more information about the review criteria, see Review criteria.
-
After the service is created, you can view the deployment package association on the service details page.
On the service details page, click the Deployment Association tab, and then click the Helm Association sub-tab. You can view the association identifier (for example,
{{ computenest::helmchart::wordpress }}) and the corresponding deployment package information and version number.
Related documents
-
For more information about creating a service, see Create a service.
-
When a deployment package or one of its versions is no longer needed, you can delete it. For more information, see Delete a deployment package.
-
To change a deployment package's content or other information, create a new version. For more information, see Create a new version.
-
To configure upgrade settings for a deployment package, see Configure service upgrades.