Deploying a Helm Chart
Helm is an open source package manager for Kubernetes that provides the ability to share, package, and deploy the software built for Kubernetes. The Oracle Cloud Infrastructure (OCI) DevOps service supports the deployment of Helm charts to Container Engine for Kubernetes (OKE) cluster.
The deployment occurs only when the Helm chart is deployed for the first time, or if updates are detected in the artifact or Helm stage parameters. This is automatically validated before running the deployment. However, if you want to deploy the Helm chart irrespective of the updates to the artifact or any other Helm stage parameter, then during the deployment run, you must set the ENFORCE_HELM_DEPLOYMENT
parameter to true
.
Before you begin, you must have a deployment pipeline and create a Container Engine for Kubernetes cluster. You can deploy to both public and private OKE clusters.
For creating dynamic groups and policies for deployment pipelines, see Deployment Pipeline Policies. For more details, see DevOps IAM Policies.
The Helm charts must be located in the OCI Container Registry repository for deployment. See Adding a Helm Chart.
Helm charts contain templates of Kubernetes YAML manifest files and a values.yaml
file to supply the default template values. The values.yaml
is a generic file that's located in the OCI
Artifact Registry. You must create a reference to this file. See Adding an Artifact Registry Artifact.
The deployment doesn't support parameter substitution in the Helm chart tarball. However, it's supported in the
values.yaml
file.For accessing DevOps using the Oracle Cloud Console, REST API, and CLI, see Accessing DevOps.
- Open the navigation menu and click Developer Services. Under DevOps, click Projects.
- Select a project, and a deployment pipeline.
- To add a stage to the pipeline, click the + icon and select Add stage.
- For stage type, select Install Helm chart to Kubernetes cluster, and then click Next.
- Enter a name and description for the stage. Adding a description is optional.
- For Environment, select an existing cluster environment.
- Enter a Release name. Example: helm-release.
A release refers to the running instance of the helm chart with specific configuration. A single chart can be installed many times into the same cluster, and create different releases.
- Click Select Artifact to select the helm chart for deployment.
- (Optional) Click Select Artifact to select the
values.yaml
file containing the values that 's passed to the helm chart. The file contains default parameters that you can override. - (Optional) To override the default environment namespace, enter value for Override Kubernetes namespace.
- (Optional) Enter a timeout value for deployment in seconds.
- (Optional) Specify Helm upgrade options to upgrade the Helm chart version or change the configuration of your Helm release. See Helm Upgrade.
You can set values and string values for the Helm command during the Helm chart deployment.
Specify the maximum number of upgrades per deployment. By default, the value is set to 10. Enter zero if you don’t want to set any limit for the upgrades.
- To automatically roll back to the last successful release version if the validation fails, select Yes. For more information, see Rolling Back a Deployment.
- (Optional) To add tags to the pipeline, click Show tagging options.
Tagging is a metadata system that lets you organize and track the resources
in your tenancy.
If you have permissions to create a resource, you also have permissions to add free-form tags to it.
To add a defined tag, you must have permissions to use the tag namespace.
For more information, see Resource Tags.
- To add the stage to the pipeline, click Add.
A stage preview provides a snapshot of the configuration.
Add more stages sequentially or in parallel to the pipeline, as needed. To deploy the build output to the target environment, run the deployment pipeline. To automatically trigger a deployment from the build pipeline, you can add a Trigger Deployment stage to the build pipeline.
To create an OKE Helm stage for the pipeline, run the
command:create-oke-helm-chart-stage
oci devops deploy-stage create-oke-helm-chart-stage
Required parameters:
--helm-chart-artifact-id
--oke-cluster-environment-id
--pipeline-id
--stage-predecessor-collection
--release-name
To get all the commands for
deploy-stage
:oci devops deploy-stage -h
To get help for the
command:create-oke-helm-chart-stage
oci devops deploy-stage create-oke-helm-chart-stage -h
To create a Kubernetes cluster stage for the pipeline, use the
CreateDeployStage
operation. For thedeployStageType
attribute, specify the value asOKE_HELM_CHART_DEPLOYMENT
.