Creating External Reference in Helm Chart(4.3)
This section describes how to create External References using Helm Chart.
Create an External Reference Profile
Create an External Reference Profile with the type Kubernetes Properties described in External Reference (4.3) and save it.
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:
Create an empty Helm chart using the following command:
$ helm create [name of helm chart]
A new directory is created with the specified name.
Delete everything in the templates directory in the new Helm chart.
$ rm -rf [name of helm chart]/templates/*
Â
Add your ConfigMap YAML file downloaded in step 2 of Create an External Reference Profile into the templates directory.Â
External Reference values will be received from the data field. Update the values for your keys.Â
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):
Add the following parameter in your ConfigMap YAML file in the
templates
directory:ÂÂ
Example - ConfigMap.yaml file
Â
Move the data field from your ConfigMap YAML file to the values.yaml file.
Â
Â