Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,42 @@ 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:
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 `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.

With Flux, set the same range in the HelmRelease's `spec.chart.spec.version`.

## Next steps

<CardGrid>
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/docs/kloudmate-agent/upgrade.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
Loading