Creating External Reference in Helm Chart(4.0)

Create an External Reference Profile

  1. Create an External Reference Profile with the type Kubernetes Properties described in and save it.

  2. Change to the YAML tab and click on the download button to download the YAML file of the ConfigMap.

Example - ConfigMap.yaml downloaded from External Reference Profile

--- apiVersion: "v1" data: time_unit: "" interval: "" kind: "ConfigMap" metadata: labels: app.kubernetes.io/component: "extref" name: "default.k8s-extref"

Caution!

The label, app.kubernetes.io/component: "extref" as shown in the above example is required. A ConfigMap without this label will not work with the External Reference Profile.

 

Create a Helm chart with config maps

Create a Helm chart with one or more ConfigMaps that will be used in your configuration:

  1. Create an empty Helm chart using the following command:

    $ helm create [name of helm chart]

    A new directory is created with the specified name.

  2. Delete everything in the templates directory in the new Helm chart.

    $ rm -rf [name of helm chart]/templates/*

     

  3. Add your ConfigMap YAML file downloaded in step 2 of Create an External Reference Profile into the templates directory. 

  4. External Reference values will be received from the data field. Update the values for your keys. 

  5. Install your Helm chart. 

     

Move your External Reference data (optional)

Move your External Reference data to the values.yaml file for easy maintenance. (This step is optional):

  1. Add the following parameter in your ConfigMap YAML file in the templates directory: 

     

Example - ConfigMap.yaml file

 

  1. Move the data field from your ConfigMap YAML file to the values.yaml file.

     

 

Â