Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This section describes how to create External References using Helm Chart.

...

Create an External Reference Profile

  1. Create an External Reference Profile with the type Kubernetes Properties described in External Reference (4.

    0

    1) and save it.

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

Info

...

Example - ConfigMap.yaml downloaded from External Reference Profile

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

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:

    Code Block
    $ 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.

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

  3. Add your ConfigMap YAML file downloaded in step

    1.b

    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. 

    Code Block
    $ helm install [release name] ./[name of helm chart]
    Optional step: To easily maintain

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: 

    Code Block
    data:
    {{ toYaml .Values.externalReference.data | indent 2 }}
    See the following ConfigMap as an example:

Info

...

Example - ConfigMap.yaml file

Code Block
apiVersion: v1
kind: "ConfigMap"
data:
{{ toYaml .Values.externalReference.data | indent 2 }}
metadata:
  labels:
    app.kubernetes.io/component: "extref"
  name: "default.k8s-extref"

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

...

Info

...

Example - values.yaml file

Code Block
# Default values for [name of helm chart].
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

...


externalReference:
  data:
    interval: "2"
	time_unit: "seconds"

...

Note!

All the default values created by Helm can be deleted if you don't want to use them.