Using Edge Delta Agent Helm Values

Using the Helm values when Installing Edge Delta.

Overview

Helm values are variables used in Helm charts. They are set with a default configuration but you can override them. Helm values define the settings for Kubernetes resources in the manifest files (like Deployment, Service, ConfigMap, etc.) that Helm will apply to the cluster. They are for configuring the deployment itself, such as replicas, image tags, resource limits, volumes, ingress rules, etc.

See a description of the Helm values.

Not to be confused with environment variables.

Helm Values

To view the default Helm values, update the Edge Delta chart then show values:

helm repo update
helm show values edgedelta/edgedelta

Using Values

Assume this is the default helm installation command for Edge Delta:

helm upgrade edgedelta edgedelta/edgedelta -i --version v0.1.99 --set secretApiKey.value=123456789 -n edgedelta --create-namespace

Helm values can be set and overridden in a Helm chart in several ways:

Using the –set flag:

You can set individual values directly on the command line with the --set flag when you install or upgrade a Helm chart. This is useful for quick adjustments without the need for a separate file.

helm upgrade edgedelta edgedelta/edgedelta -i --version v0.1.99 --set serviceMonitor.enabled=true --set secretApiKey.value=123456789 -n edgedelta --create-namespace

Using a variable file with -f or –values:

You can create a YAML file with the values you want to set or override and then specify this file using the -f or --values flag during Helm chart installation or upgrade.

helm upgrade edgedelta edgedelta/edgedelta -i --version v0.1.99 -f custom-values.yaml --set secretApiKey.value=123456789 -n edgedelta --create-namespace

Alternatively, you can use multiple values files to layer configurations:

helm upgrade edgedelta edgedelta/edgedelta -i --version v0.1.99 --set serviceMonitor.enabled=true --set secretApiKey.value=123456789 -n edgedelta --create-namespace -f base-values.yaml -f override-values.yaml

Using –set-file:

If you have a large piece of data that you want to set, such as a configuration file, you can use the –set-file flag. The data from the specified file will be set as a value for the indicated variable.

helm upgrade edgedelta edgedelta/edgedelta -i --version v0.1.99 --set-file configContent=my-config.yaml --set secretApiKey.value=123456789 -n edgedelta --create-namespace

Using –set-string:

This works similarly to –set but forces the value to be treated as a string, which is important when dealing with values that the YAML parser might otherwise interpret as a boolean or a number.

helm upgrade edgedelta edgedelta/edgedelta -i --version v0.1.99 --set-string flagValue="true" --set secretApiKey.value=123456789 -n edgedelta --create-namespace

Using environment variables with the env (or –env) flag:

In some scenarios, you might have to use environment variables for sensitive data that you don’t want to pass directly via command line or stored in files. This is not directly supported by Helm but can be worked around with shell commands.

export API_KEY="123456789"
helm upgrade edgedelta edgedelta/edgedelta -i --version v0.1.99 --set secretApiKey.value=$API_KEY -n edgedelta --create-namespace

Manually editing values.yaml:

For Helm charts that are stored locally or have been downloaded, you can directly edit the values.yaml file by hand and then install or upgrade the chart. This method isn’t common for packaged Helm charts but can be used during chart development.

Always remember to use sensitive data handling practices when dealing with secrets or sensitive configurations. In production environments, it is best to store such data in secure storage and reference it using Kubernetes secrets.

Precedence

Helm merges the values together using the following order of precedence. It goes from the most specific (direct command line overrides) to the least specific (the defaults in the chart’s values.yaml). If there are conflicting settings, the source with the highest precedence is chosen.

  1. Command Line –set Parameter: Values set with –set on the command line take the highest precedence. If you use multiple –set options, the last one will take precedence. It can be overridden with successive –set commands:
--set key1=value1 --set key2=value2
  1. Command Line –set-file Parameter: This sets a value from a given file and takes precedence after direct –set parameters.

  2. Command Line –set-string Parameter: Just like –set, but treated as a string. The precedence of –set-string parameters relative to –set and –set-file depends on their order on the command line.

  3. Value Files Specified with -f or –values: If values are supplied using -f or –values options, each file specified will overlay on the previous one:

-f myvalues.yaml -f override.yaml

In this example, override.yaml would take precedence over values in myvalues.yaml.

  1. Values File from the Chart References (values.yaml): This is the values.yaml file included with the Helm chart by default. Any values that are not overridden by the above methods will have the defaults from this file.

  2. Chart Dependencies: For Helm charts that include dependencies, the default values from those dependency charts are applied first (lowest priority), before values from the main chart’s values.yaml.


Edge Delta Agent Helm Values

Values for Installing Edge Delta using Helm.