Upgrading¶
This page contains upgrade instructions and migration guides for the Argo CD Operator.
Upgrading from Operator ≤0.18 to Operator 0.19+¶
ApplicationSet tokenRef strict mode¶
If you're upgrading to an operator version that defaults ApplicationSet tokenRef strict mode when ApplicationSets in any namespace are configured, note the following changes:
- When
.spec.applicationSet.sourceNamespacesexpands to at least one cluster namespace, the operator setsapplicationsetcontroller.enable.tokenref.strict.modeto"true"inargocd-cmd-params-cm - The ApplicationSet controller requires Secrets referenced by SCM Provider and Pull Request generators via
tokenRefto be labeledargocd.argoproj.io/secret-type: scm-creds - Manual edits to this key in
argocd-cmd-params-cmare corrected on reconcile; use the ArgoCD CR (.spec.cmdParams) to change behavior - You may opt out via
.spec.cmdParams, but this is not recommended; see ApplicationSets in Any Namespace
Detection¶
The following users are unaffected by this change:
- Users who do not configure .spec.applicationSet.sourceNamespaces on their ArgoCD CR
- Users whose .spec.applicationSet.sourceNamespaces patterns match no cluster namespace
- Users who do not have ApplicationSets that use an SCM Provider or Pull Request generator with a tokenRef pointing at a Secret for API authentication
- Users whose SCM tokenRef Secrets already have argocd.argoproj.io/secret-type: scm-creds
The following users are affected and should perform remediation:
- Users with a non-empty expanded .spec.applicationSet.sourceNamespaces list whose ApplicationSets use an SCM Provider or Pull Request generator with a tokenRef pointing at a Secret for API authentication
- Users whose referenced Secrets are missing the argocd.argoproj.io/secret-type: scm-creds label
Remediation Steps¶
- Find ApplicationSets using
tokenRef:
kubectl get applicationsets -A -o yaml | grep -B5 -A3 'tokenRef:'
Review SCM Provider and Pull Request generator blocks in each ApplicationSet.
- Identify referenced Secrets:
For each tokenRef, note secretName and namespace (often the Argo CD namespace or the ApplicationSet namespace).
kubectl get secret -n <namespace> <secretName> -o yaml
- Label SCM credential Secrets:
kubectl label secret -n <namespace> <secretName> \
argocd.argoproj.io/secret-type=scm-creds
Or in Git or your secret management workflow:
metadata:
labels:
argocd.argoproj.io/secret-type: scm-creds
- Verify after upgrade or reconcile:
kubectl get cm -n <argocd-namespace> argocd-cmd-params-cm -o yaml
kubectl logs -n <argocd-namespace> deploy/<instance>-applicationset-controller --tail=50
Confirm applicationsetcontroller.enable.tokenref.strict.mode is "true" when source namespaces are configured, and that ApplicationSets reconcile without tokenRef or secret errors.
- Temporary opt-out (migration only):
If you need time to label Secrets, set .spec.cmdParams on the ArgoCD CR:
spec:
cmdParams:
applicationsetcontroller.enable.tokenref.strict.mode: "false"
This removes the scm-creds label requirement and is not recommended for production. Prefer labeling Secrets and keeping strict mode enabled. See ApplicationSets in Any Namespace for details.
Upgrading from Operator ≤0.14 (Argo CD ≤2.14) to Operator 0.15+ (Argo CD 3.0+)¶
Logs RBAC Enforcement¶
If you're upgrading from Argo CD 2.x to 3.0+, note the following changes:
- The
server.rbac.log.enforce.enableflag is no longer supported - Logs RBAC is now enforced by default
- Users with existing policies need to explicitly add logs permissions
- The operator does not provide default RBAC policies - you must define your own
Detection¶
The following users are unaffected by this change:
- Users who have server.rbac.log.enforce.enable: "true" in their argocd-cm ConfigMap
- Users who have policy.default: role:readonly or policy.default: role:admin in their argocd-rbac-cm ConfigMap
The following users are affected and should perform remediation:
- Users who don't have a policy.default in their argocd-rbac-cm ConfigMap
- Users who have server.rbac.log.enforce.enable set to false or don't have this setting at all in their argocd-cm ConfigMap
Remediation Steps¶
- Quick Remediation:
- Add logs permissions to existing roles
-
Example:
p, role:existing-role, logs, get, */*, allow -
Recommended Remediation:
- Review existing roles and their permissions
- Add logs permissions only to roles that need them
- Consider creating a dedicated log viewer role
- Define your own RBAC policies as the operator does not provide defaults
- Remove the
server.rbac.log.enforce.enablesetting fromargocd-cmConfigMap if it was present before the upgrade
RBAC with Dex SSO Authentication¶
If you're upgrading from Argo CD 2.x to 3.0+ and using Dex SSO, you need to update your RBAC policies to maintain the same access levels.
Detection¶
The following users are affected by this change:
- Users who have Dex SSO configured with custom RBAC policies
- Users who reference Dex sub claims in their RBAC policies
- Users who have user-specific permissions based on Dex authentication
The following users are unaffected by this change: - Users who don't use Dex SSO - Users who only use group-based RBAC policies - Users who use other SSO providers (Keycloak, OIDC, etc.)
Remediation Steps¶
- Quick Remediation:
- Decode existing
subclaims in your policies - Replace
subclaim values with the decodeduser_id -
Example: Replace
ChdleGFtcGxlQGFyZ29wcm9qLmlvEgJkZXhfY29ubl9pZAwithexample@argoproj.io -
Recommended Remediation:
- Audit all existing RBAC policies for Dex
subclaim references - Decode each
subclaim to identify the actual user ID - Update policies to use the
federated_claims.user_idformat - Test authentication and authorization after the changes
- Consider using group-based policies instead of user-specific ones for better maintainability
CLI Authentication¶
If you're using the Argo CD CLI with Dex authentication, make sure to use the new Argo CD version to obtain an authentication token with the appropriate claims. The CLI will automatically handle the new authentication flow.
Best Practices¶
- Use Group-Based Policies: Instead of user-specific policies, consider using group-based policies for better maintainability
- Document User Mappings: Keep a record of the decoded user IDs for future reference
- Test Thoroughly: Verify that all users maintain their expected access levels after the migration
- Monitor Authentication: Watch for authentication issues during and after the migration
Example Migration Workflow¶
- Identify affected policies:
kubectl get cm argocd-rbac-cm -n argocd -o=jsonpath='{.data.policy\.csv}'
- Decode sub claims:
echo "YOUR_SUB_CLAIM_HERE" | base64 -d
- Update policies:
apiVersion: argoproj.io/v1beta1
kind: ArgoCD
metadata:
name: example-argocd
labels:
example: rbac-migration
spec:
rbac:
policy: |
# Old: g, ChdleGFtcGxlQGFyZ29wcm9qLmlvEgJkZXhfY29ubl9pZA, role:example
# New: g, example@argoproj.io, role:example
g, example@argoproj.io, role:example
- Test authentication:
argocd login <your-argocd-server> --sso
argocd app list
Declarative webhook secrets (spec.webhookSecrets)¶
The Argo CD Operator can populate Argo CD’s Git webhook credentials from Kubernetes Secret
references declared on spec.webhookSecrets in the ArgoCD CR (v1beta1). This is optional and backward compatible:
- If you do not set
spec.webhookSecrets, the operator continues to omit declarative webhook management;webhook.*keys already present inargocd-secretare left as-is, including values you patched in manually before this feature existed. - If you set
spec.webhookSecrets, the operator syncs the providers you declare intoargocd-secret. Providers not listed while management is enabled can have theirwebhook.*keys cleared on reconcile—see Configuring webhook secrets for exact semantics.
For migration from manual edits, verification, integrations (External Secrets, Sealed Secrets), and troubleshooting, use the Configuring webhook secrets guide. A runnable example can be found at https://github.com/argoproj-labs/argocd-operator/blob/master/examples/argocd-webhook-secrets.yaml.