Skip to content

DeploymentTemplate with empty parameters stays OutOfSync in Argo CD #13436

Open

Description

@nithyatsu

Bug information

Steps to reproduce

  1. Install Radius and Argo CD on a cluster (seen on kind with Radius 0.61.1 and Argo CD 3.5.5, Helm chart 10.10.5).

  2. Generate a DeploymentTemplate from a Bicep file that has no parameters:

    echo "// empty" > empty.bicep
    rad bicep generate-kubernetes-manifest empty.bicep --destination-file plain/fake-dt.yaml --group playground

    The generated file contains spec.parameters: {}.

  3. Commit plain/fake-dt.yaml and point an Argo CD Application at plain, with automated sync.

  4. Run argocd app get <app> --refresh and argocd app diff <app>.

Observed behavior

Radius deploys the template (kubectl get deploymenttemplates shows Ready), but Argo CD keeps the DeploymentTemplate OutOfSync. The only diff is:

===== radapp.io/DeploymentTemplate playground/empty.bicep ======
53a54
>   parameters: {}

Re-syncing doesn't help: Argo CD re-applies parameters: {}, and the controller removes it again.

Cause: the live object's metadata.generation is 2 because the controller rewrites the spec when it adds its finalizer:

  • r.Client.Update in pkg/controller/reconciler/deploymenttemplate_reconciler.go (around line 326).
  • Parameters is a map[string]string with the tag json:"parameters,omitempty" in pkg/controller/api/radapp.io/v1alpha3/deploymenttemplate_types.go (line 30).
  • So the update serializes the empty map away.

Desired behavior

An applied DeploymentTemplate with no parameters shows Synced in Argo CD (and in any GitOps tool that compares desired and live state).

Possible fixes:

  • The generator leaves out parameters when it's empty.
  • The controller adds its finalizer with a patch instead of a full update.

Workaround

Either delete the parameters: {} line from the generated manifest, or add an ignoreDifferences entry for /spec/parameters to the Argo CD Application.

System information

rad Version

0.61.1

Operating system

macOS, Apple silicon (arm64); kind cluster

Additional context

Found while prototyping Argo CD support (design note in #13323).

Activity

  1. added
    bugSomething is broken or not working as expected
    on Oct 23, 2026
  2. radius-triage commented on Oct 23, 2026

    @radius-triage

    👋 @nithyatsu Thanks for filing this bug report.

    A project maintainer will review this report and get back to you soon. If you'd like immediate help troubleshooting, please visit our Discord server.

    For more information on our triage process please visit our triage overview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething is broken or not working as expected

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions