# Helm Chart

The API7 Gateway Helm chart installs API7 Gateway data plane instances on Kubernetes and renders the gateway configuration from chart values. The chart supports configuration for both Kubernetes deployment resources and the gateway runtime configuration generated into `config.yaml`.

For Kubernetes deployments, Helm values should be treated as the source of truth. Changes made directly to `conf/config.yaml` inside a running pod, or to the generated ConfigMap, are overwritten by the next Helm upgrade.

## Chart Repository[​](#chart-repository "Direct link to Chart Repository")

[API7 Helm Chart](https://github.com/api7/api7-helm-chart) provides Helm-based installation and management of API7 components on Kubernetes.

Add the API7 Helm repository:

```
helm repo add api7 https://charts.api7.ai

helm repo update
```

Install or upgrade API7 Gateway with a values file:

```
helm upgrade --install api7-ee-3-gateway api7/gateway \

  -n api7 \

  --create-namespace \

  --version "3.10.19" \

  -f values.yaml
```

Chart version `3.10.19` has application version `3.10.10` and uses the `3.10.10` gateway image by default. The chart version and gateway version are separate values.

If API7 Dashboard generated your data plane installation command or values file, keep the generated connection settings, certificates, and token-related environment variables when you add custom values.

## Chart Values[​](#chart-values "Direct link to Chart Values")

Helm chart values define the configuration of a chart. They can come from the chart's default `values.yaml` file or be overridden during installation or upgrade to customize the deployment.

### View Default Values[​](#view-default-values "Direct link to View Default Values")

To view the default values provided by the API7 Gateway chart, run:

```
helm show values api7/gateway --version "3.10.19"
```

This command displays the `values.yaml` packaged with the chart documented on this page. It does not read values from an installed release. To inspect the values currently associated with a release, use `helm get values`.

For chart references that match this API7 Gateway version, see the values reference for readable field descriptions and `values.yaml` for the raw default values and nesting:

* [API7 Gateway Helm chart values reference table](https://github.com/api7/api7-helm-chart/blob/gateway-3.10.19/charts/gateway/README.md#values)
* [API7 Gateway Helm chart `values.yaml`](https://github.com/api7/api7-helm-chart/blob/gateway-3.10.19/charts/gateway/values.yaml)
* [API7 Gateway Helm chart ConfigMap template](https://github.com/api7/api7-helm-chart/blob/gateway-3.10.19/charts/gateway/templates/configmap.yaml)

The ConfigMap template is the chart-side mapping between Helm values and the generated gateway `config.yaml`. It is the reference for cases where a native gateway configuration key has a different Helm value name, or when a plugin's static configuration section requires updates to `config.yaml`.

### View Effective Values[​](#view-effective-values "Direct link to View Effective Values")

To view the values applied to an installed release, including defaults and overrides, run:

```
helm get values <release-name> -n <namespace> --all
```

### Migrate Values from an Older Chart[​](#migrate-values-from-an-older-chart "Direct link to Migrate Values from an Older Chart")

For a migration from chart `0.2.71` to `3.10.18`, review the overrides against both charts before applying them. This comparison explains values structure; use the [supported upgrade path](https://docs.api7.ai/api7-gateway/upgrade-guides/lts-upgrades.md) to decide whether the associated product upgrade is supported.

| Configuration                 | Values to carry forward                                                                     | What to verify in the rendered chart                                                                                                      |
| ----------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Extra volumes and mounts      | Top-level `extraVolumes` and `extraVolumeMounts`                                            | Volume names, mount paths, read-only flags, and ownership. These are not nested under `gateway`.                                          |
| Init containers               | Top-level `extraInitContainers`                                                             | Image, command, user, volume mounts, and completion before the gateway starts.                                                            |
| CPU and memory                | `apisix.resources`                                                                          | Gateway container requests and limits; sidecars need their own resources.                                                                 |
| Pod and container security    | `apisix.podSecurityContext` and `apisix.securityContext`                                    | Pod ownership settings and gateway container restrictions remain separate.                                                                |
| Custom shared dictionaries    | `apisix.customLuaSharedDicts`                                                               | Preserve the list of `{name, size}` entries. Helm replaces lists rather than merging entries by name.                                     |
| Existing dictionary overrides | `apisix.meta.luaSharedDict`, `apisix.http.luaSharedDict`, and `apisix.stream.luaSharedDict` | Confirm each intended override appears under the correct subsystem in `config.yaml`.                                                      |
| Forwarded-header trust        | `apisix.trustedAddresses` in the target chart                                               | Set only the actual trusted proxy IPs or CIDRs. An old values file has no equivalent setting and cannot establish the new trust boundary. |

Export user-supplied values separately from the effective values. Preserve the effective values for comparison; copying every old default into the new chart can retain obsolete settings.

```
helm get values "$RELEASE" -n "$NAMESPACE" -o yaml > old-overrides.yaml

helm get values "$RELEASE" -n "$NAMESPACE" --all -o yaml > old-effective.yaml

helm get manifest "$RELEASE" -n "$NAMESPACE" > old-manifest.yaml

helm show values api7/gateway --version "3.10.18" > target-defaults.yaml
```

Create `migrated-values.yaml` from the reviewed overrides and required Dashboard connection settings. Retain required target-chart list entries when customizing a list. Do not use `--reuse-values` as a substitute for this review.

```
helm template "$RELEASE" api7/gateway --version "3.10.18" \

  -n "$NAMESPACE" -f migrated-values.yaml > target-manifest.yaml
```

Compare the gateway image, resources, volumes, init containers, security contexts, probes, and generated `config.yaml` with the installed manifest. An unused or misspelled value can be accepted without changing a template, so a successful render alone is insufficient. Protect all exported files as deployment secrets and keep them out of CI logs. Test the rendered configuration in staging, including forwarded headers through the real proxy chain, before upgrading production.

### Update Values[​](#update-values "Direct link to Update Values")

To update a Helm release, export the full set of values for the release to a file:

```
helm get values <release-name> -n <namespace> --all -o yaml > values.yaml
```

Find the installed chart version with `helm list -n <namespace>`. The `CHART` column includes the chart name, such as `gateway-3.10.19`; pass only the version suffix to `--version`. Use that same version for a configuration-only update so the operation does not also upgrade the chart or its default image. Edit `values.yaml`, then apply it:

```
helm upgrade <release-name> api7/gateway --version <installed-chart-version> -n <namespace> -f values.yaml
```
