# v3.6 to 3.7

## Breaking Changes

<!-- Any breaking behavior change:
Any removal or change of default behavior that requires user action -->

### Kustomize patches that set cluster cache environment variables

> [!WARNING]
> If you set any of the following environment variables on the application controller with a
> Kustomize strategic merge patch that uses `value`, Kubernetes rejects the updated controller
> StatefulSet or Deployment, and the controller stays on the previous version. The controller
> manifests now read these variables from `argocd-cmd-params-cm`, so your patch gives the same
> variable a second source.

Before you upgrade, move each setting to its `argocd-cmd-params-cm` key and remove it from the
patch:

| Environment variable | `argocd-cmd-params-cm` key |
|---|---|
| `ARGOCD_CLUSTER_CACHE_RESYNC_DURATION` | `controller.cluster.cache.resync.duration` |
| `ARGOCD_CLUSTER_CACHE_WATCH_RESYNC_DURATION` | `controller.cluster.cache.watch.resync.duration` |
| `ARGOCD_CLUSTER_SYNC_RETRY_TIMEOUT_DURATION` | `controller.cluster.cache.sync.retry.timeout` |
| `ARGOCD_CLUSTER_CACHE_LIST_PAGE_SIZE` | `controller.cluster.cache.list.page.size` |
| `ARGOCD_CLUSTER_CACHE_LIST_PAGE_BUFFER_SIZE` | `controller.cluster.cache.list.page.buffer.size` |
| `ARGOCD_CLUSTER_CACHE_LIST_SEMAPHORE` | `controller.cluster.cache.list.semaphore` |
| `ARGOCD_CLUSTER_CACHE_ATTEMPT_LIMIT` | `controller.cluster.cache.attempt.limit` |
| `ARGOCD_CLUSTER_CACHE_RETRY_USE_BACKOFF` | `controller.cluster.cache.retry.use.backoff` |

### `HEAD` no longer resolves to a branch named `HEAD`

If a repository has a branch literally named `HEAD` (`refs/heads/HEAD`), a `targetRevision` of `HEAD`
(or an empty `targetRevision`) previously resolved to that branch. It now follows the repository's
symbolic `HEAD` to the tip of the default branch, as Git does.

**Impact:**

- Applications and ApplicationSets tracking `HEAD` in such a repository will switch from the
  `refs/heads/HEAD` branch to the default branch, and may sync different manifests.
- To keep tracking the branch, set `targetRevision: refs/heads/HEAD`. Otherwise, consider deleting the
  branch with `git push origin --delete refs/heads/HEAD`.

See [Branches named `HEAD`](../../user-guide/tracking_strategies.md#branches-named-head).

### Webhook events are rejected for providers without a webhook secret

The API server and ApplicationSet webhooks used to accept unauthenticated events from any Git
provider that had no webhook secret configured in `argocd-secret`, including when another provider
did have one. They now reject events for a provider with no secret with `400 Bad Request`. This
applies to GitHub (and GHCR), GitLab, Bitbucket, Bitbucket Server, Gogs and Azure DevOps. The Harbor
and Docker Hub webhooks already required a secret.

**Impact:**

- Webhooks configured without a secret stop triggering refreshes. Applications and ApplicationSets
  still refresh on the regular polling interval.
- To keep using webhooks, set a secret in the Git provider's webhook and in `argocd-secret`. See
  [Configure Argo CD With The WebHook Secret](../webhook.md#2-configure-argo-cd-with-the-webhook-secret).
- To restore the previous behavior, set `ARGOCD_WEBHOOK_ALLOW_UNAUTHENTICATED=true` on `argocd-server`
  and `argocd-applicationset-controller`.

## Behavioral Improvements / Fixes

### Metrics can be pushed via OTLP

The API server, application controller and repo server can now push the metrics served at
`/metrics` to an OpenTelemetry collector, controlled by `otlp.metrics.enabled` and
`otlp.metrics.interval` in `argocd-cmd-params-cm`. It is off by default; see
[Pushing metrics via OTLP](../observability.md#pushing-metrics-via-otlp).

Two changes apply to deployments that already set `--otlp-address` for tracing:

- Spans now carry a `service.instance.id` resource attribute set to the pod hostname, in
  addition to `service.name`. Collector pipelines that derive metrics from spans (for example the
  `spanmetrics` connector with its default resource keys) will see series split per pod. Drop the
  attribute in the collector, or configure the connector's resource key attributes, if that is
  unwanted.
- On shutdown the tracer now drains its span queue with a 10s timeout instead of aborting on the
  cancelled process context, so the last batch of spans is exported rather than dropped.

### ApplicationSet webhook responses now match the API server webhook

The ApplicationSet controller's webhook endpoint now handles requests the same way as the API
server's `/api/webhook` endpoint:

- Payloads larger than the `webhook.maxPayloadSizeMB` value in the `argocd-cm` ConfigMap (default
  50MB) are rejected with `400 Bad Request`. Previously, the ApplicationSet webhook had no payload
  size limit.
- A GHCR event that fails signature verification is rejected with `401 Unauthorized` instead of
  `400 Bad Request`.
- When a payload cannot be parsed, the response body is a generic `Webhook processing failed`
  message. The parser error is logged by the ApplicationSet controller instead of being returned to
  the caller.

If you monitor the ApplicationSet webhook's response codes or bodies, update any checks that relied
on the previous behavior.

### Paused KEDA ScaledObjects are now Healthy

The bundled health check for `keda.sh/ScaledObject` now reports a ScaledObject whose `Paused` and
`Ready` conditions are both `True` as `Healthy` instead of `Suspended`. The health message is still
`ScaledObject is paused`. Before this change, a sync that paused a ScaledObject (for example by
setting the `autoscaling.keda.sh/paused` annotation) and had more than one wave or phase never
finished, because the sync waited for the ScaledObject to become healthy.

A paused ScaledObject whose `Ready` condition is `False`, or whose `Fallback` condition is `True`,
is still `Degraded`. Its health message is now the message of that condition instead of
`ScaledObject is paused`.

An Application whose only non-healthy resource was a paused ScaledObject used to be `Suspended`
and is now `Healthy`. If you rely on the `Suspended` status, for example in notifications, you can
restore the previous behavior with a custom health check in the
`resource.customizations.health.keda.sh_ScaledObject` key of the `argocd-cm` ConfigMap.

### New `argocd-default-cluster-ca-cm` ConfigMap for cluster CA certificates

The `ca.crt` key of this ConfigMap can hold one or more PEM encoded CA certificates. Once it does,
Argo CD verifies the Kubernetes API server of any cluster whose secret does not set
`tlsClientConfig.caData` against only that bundle, not the system trust store. If all your clusters
use certificates from the same internal CA, you can now configure that CA once instead of copying it
into every cluster secret.

The installation manifests now include this ConfigMap without any data, so nothing changes until you
set `ca.crt`. Clusters that define their own `caData`, clusters with
`tlsClientConfig.insecure: true`, and the in-cluster endpoint never use the bundle.

A new optional `tlsClientConfig.caTrust` field in the cluster secret `config` controls this for a
single cluster:

- Unset (the default): the cluster trusts only the bundle if the ConfigMap has one, and the system
  trust store otherwise.
- `bundle`: the cluster trusts only the bundle. If the ConfigMap has no bundle, connecting to the
  cluster fails with an error.
- `system`: the cluster trusts only the system trust store and ignores the bundle.
- `bundle-and-system`: the cluster trusts both the system trust store and the bundle.

Any other value is rejected by the API server when the cluster is created or updated. The `argocd`
CLI has no flag for it, so set it in the cluster secret. See the
[declarative setup documentation](../declarative-setup.md#default-ca-bundle-for-cluster-connections)
for more details.

> [!WARNING]
> Clusters without `caData` whose API server uses a certificate from a publicly trusted CA (for
> example managed cloud clusters) stop trusting the system trust store as soon as the ConfigMap has a
> bundle, and lose their connection. Before you fill in `argocd-default-cluster-ca-cm`, set `caTrust` to
> `system` (or `bundle-and-system`) on those clusters:
>
> ```yaml
> apiVersion: v1
> kind: Secret
> metadata:
>   name: mycluster-secret
>   labels:
>     argocd.argoproj.io/secret-type: cluster
> type: Opaque
> stringData:
>   name: mycluster.example.com
>   server: https://mycluster.example.com
>   config: |
>     {
>       "bearerToken": "<authentication token>",
>       "tlsClientConfig": {
>         "caTrust": "system"
>       }
>     }
> ```

- No action is required when upgrading. Action is only needed before you set `ca.crt`, as described in the
  warning above.
- If you install Argo CD with your own manifests, or with a Helm chart that does not create this
  ConfigMap, create `argocd-default-cluster-ca-cm` yourself with the `app.kubernetes.io/part-of: argocd`
  label before using the feature.
- Anyone who can edit `argocd-default-cluster-ca-cm` controls which CAs Argo CD trusts for clusters without
  their own `caData`. Limit write access to it in the same way as for cluster secrets.

### Custom Healthchecks Added

- A bundled health check for Vault Secrets Operator's `secrets.hashicorp.com/VaultStaticSecret`
  resource. It reports `Healthy` when the `Healthy` condition is `True` and `Degraded` with the
  sync error when it is `False`, and stays `Progressing` until the operator has reconciled the
  current generation. With operator versions before 1.0.0, which set no conditions, it reports
  `Healthy` once `status.lastGeneration` matches the resource's generation.
- A bundled health check for the Keycloak operator's `k8s.keycloak.org/KeycloakRealmImport`
  resource. It reports `Healthy` when the `Done` condition is `True`, `Progressing` while the
  import Job runs or the operator waits for the Keycloak StatefulSet to be created and ready, and
  `Degraded` with the operator's message when the `HasErrors` condition reports any other error,
  such as a missing `Keycloak`. `Healthy` means that the import Job completed, not that the
  current realm spec was applied, since Keycloak skips the import when the realm already exists.
  A failed import Job is reported as `Progressing`, because the Job may still retry and the
  operator's status doesn't show when its retries are used up. A realm import whose Job keeps
  failing stays `Progressing` and holds its sync wave, while the Job, shown under the realm
  import, turns `Degraded` once it reaches its backoff limit.

### Built-in actions for gitops-promoter rollback

Argo CD now includes built-in resource actions for rolling back a
[gitops-promoter](https://gitops-promoter.readthedocs.io/en/latest/advanced-usage/rolling-back/)
environment and releasing the promotion block afterward.

| Custom Resource | Action | What it does |
| --- | --- | --- |
| PromotionStrategy | `rollback-environment` | Creates a RestoreActiveCommit for the environment branch and hydrated SHA you provide |
| RestoreActiveCommit | `release-environment-block` | Sets `spec.blockEnvironment` to false after the rollback has recorded `status.activeSha` |

`promotionStrategyRef`, `branch`, and `sha` are immutable. Releasing the block patches the live
RestoreActiveCommit. It does not delete the object. Deleting it while the block is still set does
not stamp `Promoter-restore-unblocked-at`.

A non-empty `status.activeSha` only means that the restore commit is on the active branch. Before
you release the block, check that the RestoreActiveCommit is `Ready`, that the restored commit has
synced, and that the workloads are healthy. Releasing the block lets promotions to the environment
resume.

Grant these Argo CD action permissions:

- `action/promoter.argoproj.io/PromotionStrategy/rollback-environment`
- `action/promoter.argoproj.io/RestoreActiveCommit/release-environment-block`

The AppProject must permit the `PromotionStrategy` and `RestoreActiveCommit` resources. Both
actions write a `RestoreActiveCommit`: rollback creates one, and release patches it. Argo CD does
that with the destination cluster's credentials, so that cluster identity needs Kubernetes `create`
and `patch` permission for `RestoreActiveCommit`. See
[resource actions](../resource_actions.md#built-in-actions).

## Other Changes

### Revoked token resync interval

`argocd-server` now reloads revoked tokens from Redis every 5 minutes instead of every 15 seconds. The interval is configurable with `ARGOCD_SESSION_REVOKED_TOKEN_RESYNC_DURATION`. See [Revoked token resync](../user-management/index.md#revoked-token-resync).

### Cluster cache settings in `argocd-cmd-params-cm`

You can now configure the application controller's cluster cache with `argocd-cmd-params-cm` keys
or controller flags. The environment variables you use today keep working, unless you set them
with a Kustomize strategic merge patch that uses `value` (see Breaking Changes). See
[argocd-cmd-params-cm.yaml](../argocd-cmd-params-cm-yaml.md) for the `controller.cluster.cache.*`
keys and their defaults.

The duration flags (`--cluster-cache-resync-duration`, `--cluster-cache-watch-resync-duration`,
`--cluster-cache-sync-retry-timeout` and `--cluster-cache-events-processing-interval`) take Go
duration strings such as `10m` or `12h`. The environment variables and `argocd-cmd-params-cm` keys
also accept days (for example `1d`), but the flags do not.

If you install Argo CD with the Helm chart, keep setting these values with `controller.env` until
the chart supports the new keys.

### `--http-retry-max` now applies to TLS (and `--grpc-web`) connections

Prior to v3.7, the CLI's global `--http-retry-max` flag had no effect on TLS
connections (the default) — the retryable HTTP transport was silently discarded
during TLS setup, so retries only ever applied to `--plaintext` connections.
This is now fixed, so `--http-retry-max` retries transient failures (connection
errors, HTTP `429`, and `5xx` except `501`) for HTTP requests over plaintext or TLS,
including `--grpc-web`. (Native gRPC connections use a separate, built-in retry
interceptor that this flag does not configure.)

The flag still defaults to `0` (no retries), so behavior is unchanged unless you
have opted in. If you do set `--http-retry-max`, be aware:

> [!WARNING]
> - Retries apply to **all** gRPC-web requests, including non-idempotent ones.
>   gRPC-web tunnels every RPC as an HTTP `POST`, so the retry layer cannot
>   distinguish reads from writes. A transient `5xx` returned *after* the server
>   has already processed a mutating request (e.g. `argocd account generate-token`,
>   `argocd app actions run`) will cause the request to be re-sent. Prefer enabling
>   the flag for idempotent/declarative operations (e.g. `app set`/`app sync`), and
>   consider this before enabling it globally for mutating commands.
> - Retries add latency ahead of any command-level timeout. Backoff is capped at
>   10s per attempt, but `--http-retry-max` attempts still accumulate; size it with
>   your `--timeout` values (e.g. `app sync`/`app wait`) in mind.
