Skip to main content
Version: v1.2

Helm

KubeVela's Helm component meets the needs of users to connect to Helm Chart. You can deploy any ready-made Helm chart software package from Helm Repo, Git Repo or OSS bucket through the Helm component, and overwrite its parameters.

Deploy From Helm Repo

In this Application, we hope to deliver a component called redis-comp. It is a chart from the bitnami.

cat <<EOF | vela up -f -
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: app-delivering-chart
spec:
components:
- name: redis-comp
type: helm
properties:
chart: redis-cluster
version: 6.2.7
url: https://charts.bitnami.com/bitnami
repoType: helm
EOF

Please copy the above code block and deploy it directly to the runtime cluster:

application.core.oam.dev/app-delivering-chart created

Finally, we use vela ls to view the application status after successful delivery:

APP                     COMPONENT   TYPE        TRAITS  PHASE   HEALTHY STATUS  CREATED-TIME                 
app-delivering-chart redis-comp helm running healthy 2021-08-28 18:48:21 +0800 CST

We also see that the PHASE of the app-delivering-chart APP is running and the STATUS is healthy.

Attributes

ParametersDescriptionExample
repoTyperequired, indicates where it's fromHelm
pullIntervaloptional, synchronize with Helm Repo, tunning interval and 5 minutes by default10m
urlrequired, Helm Reop address, it supports http/httpshttps://charts.bitnami.com/bitnami
secretRefoptional, The name of the Secret object that holds the credentials required to pull the repo. The username and password fields must be included in the HTTP/S basic authentication Secret. For TLS the secret must contain a certFile and keyFile, and/or caCert fields. For TLS authentication, the secret must contain a certFile / keyFile field and/or caCert field.sec-name
timeoutoptional, timeout for pulling repo index60s
chartrequired, chart titleredis-cluster
versionoptional, chart version, * by default6.2.7
targetNamespaceoptional, the namespace to install chart, decided by chart itselfyour-ns
releaseNameoptional, release name after installedyour-rn
valuesoptional, override the Values.yaml inchart, using for the rendering of Helm

Deploy From OSS bucket

ParametersDescriptionExample
repoTyperequired, indicates where it's fromoss
pullIntervaloptional, synchronize with bucket, tunning interval and 5 minutes by default10m
urlrequired, bucket's endpoint and no need to fill in with schemeoss-cn-beijing.aliyuncs.com
secretRefoptional, Save the name of a Secret, which is the credential to read the bucket. Secret contains accesskey and secretkey fieldssec-name
timeoutoptional, The timeout period of the download operation, the default is 20s60s
chartrequired, Chart storage path (key)./chart/podinfo-5.1.3.tgz
versionoptional, In OSS source, this parameter has no effect
targetNamespaceoptional, The namespace of the installed chart, which is determined by the chart itself by defaultyour-ns
releaseNameoptional, Installed release nameyour-rn
valuesoptional, Overwrite the Values.yaml of the chart for Helm rendering.
oss.bucketNamerequired, bucket nameyour-bucket
oss.provideroptional, Optional generic or aws, fill in aws if the certificate is obtained from aws EC2. The default is generic.generic
oss.regionoptional, bucket region

How-to

  1. (Opentional) If your OSS bucket needs identity verification, create a Secret:
$ kubectl create secret generic bucket-secret --from-literal=accesskey=<your-ak> --from-literal=secretkey=<your-sk>
secret/bucket-secret created
  1. Example
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: bucket-app
spec:
components:
- name: bucket-comp
type: helm
properties:
repoType: oss
# required if bucket is private
secretRef: bucket-secret
chart: ./chart/podinfo-5.1.3.tgz
url: oss-cn-beijing.aliyuncs.com
oss:
bucketName: definition-registry

Deploy From Git Repo

ParametersDescriptionExample
repoTyperequired, indicates where it's fromgit
pullIntervaloptional, synchronize with Git Repo, tunning interval and 5 minutes by default10m
urlrequired, Git Repo addresshttps://github.com/oam-dev/terraform-controller
secretRefoptional, The name of the Secret object that holds the credentials required to pull the Git repository. For HTTP/S basic authentication, the Secret must contain the username and password fields. For SSH authentication, the identity, identity.pub and known_hosts fields must be includedsec-name
timeoutoptional, The timeout period of the download operation, the default is 20s60s
chartrequired, Chart storage path (key)./chart/podinfo-5.1.3.tgz
versionoptional, In Git source, this parameter has no effect
targetNamespaceoptional, the namespace to install chart, decided by chart itselfyour-ns
releaseNameoptional, Installed release nameyour-rn
valuesoptional, Overwrite the Values.yaml of the chart for Helm rendering.
git.branchoptional, Git branch, master by defaultdev

How-to

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: app-delivering-chart
spec:
components:
- name: terraform-controller
type: helm
properties:
repoType: git
url: https://github.com/oam-dev/terraform-controller
chart: ./chart
git:
branch: master