Skip to content

Expose Argo CD command parameters in OpenShift GitOps workload - #198

Merged
juliaaano merged 2 commits into
rhpds:mainfrom
evanshortiss:feat/gitops-cmd-params
Nov 2, 2026
Merged

juliaaano merged 2 commits into
rhpds:mainfrom
evanshortiss:feat/gitops-cmd-params

Conversation

@evanshortiss

Copy link
Copy Markdown
Contributor

The OpenShift GitOps workload cannot currently configure spec.cmdParams on its ArgoCD custom resource. This prevents callers from configuring settings such as controller.resource.health.persist: "false" to keep per-resource health in Redis instead of also persisting it in Application status.

Add ocp4_workload_openshift_gitops_cmd_params, documented with an example in the role defaults, and render it as spec.cmdParams when non-empty. The default is an empty mapping, preserving the existing rendered resource. Parameter values must be strings, and the installed OpenShift GitOps version must support spec.cmdParams.

Validation:

  • Rendered the template using Ansible with the default empty map and confirmed the resulting resource is identical to the previous template.
  • Rendered the workshop configuration and confirmed only spec.cmdParams changes, with "false" preserved as a string.
  • Rendered multiple command parameters and verified their names and string values survive YAML parsing.
  • git diff --check passed.
  • Separately validated the example setting on OpenShift GitOps 1.20.9 / Argo CD 3.3.16: the operator applied it, all 45 Applications switched to resourceHealthSource: appTree, and resource health remained available through the Argo CD API. A fresh role installation has not been run.

@stencell

stencell commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@juliaaano Please do a quick review on this. Looks fine to me, especially since anyone who wants to use it has to opt-in.

@juliaaano

Copy link
Copy Markdown
Contributor

It does looks fine.

I've asked a question to @evanshortiss in Slack and I will post the summary of our conversation here once we're done. Meanwhile he mentioned he would also test this today (Monday), so I'll convert this to draft and wait for that before merging.

@juliaaano
juliaaano marked this pull request as draft November 2, 2026 10:22
@juliaaano
juliaaano marked this pull request as ready for review November 2, 2026 19:15

@juliaaano juliaaano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff. As discussed with Evan, this setting makes sense and it enables keeping compatibility with upstream argocd.

@juliaaano
juliaaano merged commit 8dd2e4b into rhpds:main Nov 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants