Skip to main content
logoTetrate Patch ServiceVersion: alpha

Upgrades with Flux

This page finishes connecting your repository when Flux deploys from it. You apply the .tetrate/ directory with Flux, and change each HelmRelease that deploys a Tetrate product. The setup guide in the console shows the exact lines for your account; this page explains them.

Step 1: Let Flux Apply the .tetrate Directory​

A HelmRelease cannot read a values file from Git directly. So .tetrate/kustomization.yaml, in the download, turns each versions file into a ConfigMap your HelmReleases read, and deploys the agent. When an upgrade is merged, the ConfigMap changes, and Flux upgrades the release.

Have Flux apply the directory, either way:

  • Apply .tetrate/flux-kustomization.yaml to the cluster once. It is a Flux Kustomization for ./.tetrate, reading the repository through the flux-system GitRepository, which is the one Flux creates when it was bootstrapped from this repository.
  • Or add ./.tetrate to a Kustomization you already have.

Step 2: Change Each Product's HelmRelease​

Merge these lines into the HelmRelease that deploys the product, here Tetrate Enterprise Gateway in the default environment:

metadata:
labels:
patch.tetrate.io/product: teg
patch.tetrate.io/environment: default
spec:
chart:
spec:
version: v1.9.3
upgrade:
crds: CreateReplace
valuesFrom:
# ...your own values, then the versions, last:
- kind: ConfigMap
name: tetrate-teg-default-versions
valuesKey: values.yaml

What each part does:

  • The labels tell the agent which product and environment this HelmRelease deploys, and so that it comes from your repository.
  • version is the chart version upgrades move, if you named this file in the setup guide. Keep it an exact version, never a range, so the chart only moves by pull request.
  • crds: CreateReplace upgrades the product's CRDs with the chart. Helm does not by default.
  • The versions ConfigMap is the last of valuesFrom, so its image pins win over any image your own values set.

The HelmRelease must be in flux-system, where the ConfigMap is created.

Step 3: Deploy the Agent from Your Repository​

The Kustomization from Step 1 also deploys the agent, with a HelmRelease in .tetrate/patch-service-agent/envs/default/helmrelease.yaml, so agent upgrades arrive as pull requests too. Its settings, in .tetrate/patch-service-agent/values-customer.yaml, are already filled in for your account. Nothing secret is in either.

  • If the cluster already runs the agent from Connect a cluster, uninstall that copy before Flux applies the directory, so the two do not clash. The Secret and ConfigMap it uses stay in place:

    helm uninstall patch-service-agent -n tetrate-dataplane-system
  • The agent's chart is in Tetrate's private registry. Its OCIRepository reads the credentials from a tetrate-pull-credentials Secret in flux-system: copy the one the secrets file from Connect a cluster created in tetrate-dataplane-system.

Step 4: Check the Result​

Once Flux has reconciled:

  1. In the console's Clusters view, the cluster shows a chip for each product, such as teg · default, filled rather than outlined. Hover over it: it names the HelmRelease and your repository.
  2. Run the Tetrate upgrades workflow once from the repository's Actions tab.

An outlined chip means Patch Service does not upgrade that product, and hovering says why.

Next Steps​