Skip to content

Bug | repo-server-api render method does not pass ApiVersions in ManifestRequest #432

Description

@Amoolaa

Describe the bug

When using --render-method repo-server-api, the ManifestRequest sent to the repo-server does not populate the ApiVersions or KubeVersion fields. This causes Helm charts that conditionally render resources based on .Capabilities.APIVersions (e.g. ServiceMonitor, PrometheusRule, PodMonitor, VirtualService) to silently omit those resources from the diff output.

In a real ArgoCD deployment, the application controller queries the destination cluster for available API groups and passes them via ManifestRequest.ApiVersions

Expected behavior

The diff output should include all resources that ArgoCD would render during a real sync, including those gated behind .Capabilities.APIVersions checks. Either:

  • The tool queries the cluster (via the existing kubeconfig) for available API groups and passes them in the request
  • A CLI flag (--api-versions) allows users to provide them explicitly

Standard output (with --debug flag)

n/a

Application causing problems (if applicable)

Any app with helm templating that references .Capabilities.APIVersions (e.g. the Argo CD helm chart itself!).

Parameters

n/a

Additional Notes

Happy to contribute. Understand that the using the server-api would likely work, however this would create the actual app resources and all the overhead that becomes involved when that is the case.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions