From 6e62ac329a8beb11875f6c9ee5dcd58ae6dd62e6 Mon Sep 17 00:00:00 2001 From: Ansh Garhewal Date: Tue, 17 Nov 2026 13:47:44 +0530 Subject: [PATCH 1/2] docs(agent): upgrade Argo CD-managed agents with a chart version range --- .../auto-instrumentation/gitops-clusters.mdx | 24 +++++++++++++++++++ .../docs/docs/kloudmate-agent/upgrade.mdx | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/content/docs/docs/kloudmate-agent/auto-instrumentation/gitops-clusters.mdx b/src/content/docs/docs/kloudmate-agent/auto-instrumentation/gitops-clusters.mdx index c495eca9..0028aade 100644 --- a/src/content/docs/docs/kloudmate-agent/auto-instrumentation/gitops-clusters.mdx +++ b/src/content/docs/docs/kloudmate-agent/auto-instrumentation/gitops-clusters.mdx @@ -216,6 +216,30 @@ spec: - /data/agent-deployment.yaml ``` +## Upgrade the agent automatically + +One-click upgrade from KloudMate doesn't work for an agent that Argo CD manages, because Argo CD reverts the agent to the chart version in its Application. Let Argo CD upgrade the agent instead: set the chart version to a range and turn on automated sync. + +```yaml +spec: + source: + repoURL: https://charts.kloudmate.com + chart: km-kube-agent + targetRevision: ">=2.0.0" + syncPolicy: + automated: + prune: true + selfHeal: true +``` + +With `>=2.0.0`, Argo CD installs the newest chart version that is 2.0.0 or later, including future major versions such as 3.0.0, so you don't need to change the Application again. A range such as `2.*` stops at the last 2.x release. To review major versions before they roll out, use `">=2.0.0 <3.0.0"` and raise the upper bound yourself. + +Argo CD installs a new release the next time it refreshes the chart repository. To install it right away, run a hard refresh on the Application. The settings in [Install the agent on a GitOps cluster](#install-the-agent-on-a-gitops-cluster) keep the cluster's eBPF and SDK selections through each upgrade. + +If an ApplicationSet or a parent Application generates the agent's Application, set the range in its source in git. Otherwise the parent overwrites a change you make in the Argo CD UI. + +With Flux, set the same range in the HelmRelease's `spec.chart.spec.version`. + ## Next steps diff --git a/src/content/docs/docs/kloudmate-agent/upgrade.mdx b/src/content/docs/docs/kloudmate-agent/upgrade.mdx index b2b2e7b5..39a2ef9a 100644 --- a/src/content/docs/docs/kloudmate-agent/upgrade.mdx +++ b/src/content/docs/docs/kloudmate-agent/upgrade.mdx @@ -40,7 +40,7 @@ Hover over the button to see why. The usual causes and fixes: | Remote upgrades are turned off on the host. | Remove the setting described in [Turn off one-click upgrade on a host](#turn-off-one-click-upgrade-on-a-host), or upgrade manually. | | The host can't reach the release download host. | Allow outbound HTTPS to `github.com`, `release-assets.githubusercontent.com`, and `objects.githubusercontent.com`. See [Before you start](../installation/before-you-start/). | | The Helm chart was installed with `selfUpdate.enabled=false`. | Set it to `true` with `helm upgrade`, or upgrade manually. | -| The cluster is managed by Argo CD or Flux. | Upgrade the chart through your GitOps repository. | +| The cluster is managed by Argo CD or Flux. | Set the chart version to a range so Argo CD or Flux upgrades the agent. See [Upgrade the agent automatically](../auto-instrumentation/gitops-clusters/#upgrade-the-agent-automatically). | | The container is part of a Docker Compose project or a Swarm service. | Change the image in the Compose file or service definition, and redeploy. | | The container doesn't run the official `ghcr.io/kloudmate/km-agent` image, or doesn't have the Docker socket mounted. | Recreate the container with the KloudMate Docker install command. | | The Docker host is arm64. | Upgrade manually. One-click upgrade for Docker agents works on amd64 hosts. | From 3dd94ef32956134f3d2e83a861043e6b6174ca4c Mon Sep 17 00:00:00 2001 From: Ansh Garhewal Date: Tue, 17 Nov 2026 13:54:07 +0530 Subject: [PATCH 2/2] docs(agent): show the full Application settings in the auto-upgrade example --- .../auto-instrumentation/gitops-clusters.mdx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/content/docs/docs/kloudmate-agent/auto-instrumentation/gitops-clusters.mdx b/src/content/docs/docs/kloudmate-agent/auto-instrumentation/gitops-clusters.mdx index 0028aade..f6c39767 100644 --- a/src/content/docs/docs/kloudmate-agent/auto-instrumentation/gitops-clusters.mdx +++ b/src/content/docs/docs/kloudmate-agent/auto-instrumentation/gitops-clusters.mdx @@ -223,18 +223,30 @@ One-click upgrade from KloudMate doesn't work for an agent that Argo CD manages, ```yaml spec: source: - repoURL: https://charts.kloudmate.com - chart: km-kube-agent targetRevision: ">=2.0.0" syncPolicy: automated: prune: true selfHeal: true + syncOptions: + - SkipDryRunOnMissingResource=true + - RespectIgnoreDifferences=true + ignoreDifferences: + - group: "" + kind: ConfigMap + name: km-agent-configmap-daemonset + jsonPointers: + - /data/agent-daemonset.yaml + - group: "" + kind: ConfigMap + name: km-agent-configmap-deployment + jsonPointers: + - /data/agent-deployment.yaml ``` With `>=2.0.0`, Argo CD installs the newest chart version that is 2.0.0 or later, including future major versions such as 3.0.0, so you don't need to change the Application again. A range such as `2.*` stops at the last 2.x release. To review major versions before they roll out, use `">=2.0.0 <3.0.0"` and raise the upper bound yourself. -Argo CD installs a new release the next time it refreshes the chart repository. To install it right away, run a hard refresh on the Application. The settings in [Install the agent on a GitOps cluster](#install-the-agent-on-a-gitops-cluster) keep the cluster's eBPF and SDK selections through each upgrade. +Argo CD installs a new release the next time it refreshes the chart repository. To install it right away, run a hard refresh on the Application. The `ignoreDifferences` entries and sync options keep the cluster's eBPF and SDK selections through each upgrade, as explained in [Install the agent on a GitOps cluster](#install-the-agent-on-a-gitops-cluster). If an ApplicationSet or a parent Application generates the agent's Application, set the range in its source in git. Otherwise the parent overwrites a change you make in the Argo CD UI.