Skip to content

feat(gitops_bootstrap): add configurable sync_options - #168

Closed
tonykay wants to merge 2 commits into
mainfrom
feat/gitops-bootstrap-sync-options
Closed

feat(gitops_bootstrap): add configurable sync_options#168
tonykay wants to merge 2 commits into
mainfrom
feat/gitops-bootstrap-sync-options

Conversation

@tonykay

@tonykay tonykay commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds ocp4_workload_gitops_bootstrap_sync_options list variable to the ocp4_workload_gitops_bootstrap role
  • Allows catalog items to add custom syncOptions to the generated ArgoCD Application
  • RespectIgnoreDifferences=true is always included (backwards compatible)
  • Default is an empty list — no change for existing catalog items

Motivation

When an ArgoCD Application includes both operator Subscriptions and CRs that depend on those operators' CRDs (e.g. RHTAS Securesign CR in the same app as the rhtas-operator Subscription), the dry-run fails because the CRD doesn't exist yet at dry-run time. SkipDryRunOnMissingResource=true is the standard ArgoCD solution, but the current template has no way to set it.

Usage

ocp4_workload_gitops_bootstrap_sync_options:
  - SkipDryRunOnMissingResource=true

Test plan

  • Verify existing catalog items without the new variable still deploy correctly (empty list default)
  • Verify catalog items setting the variable get the additional syncOptions in the Application spec

🤖 Generated with Claude Code

…ication

Add ocp4_workload_gitops_bootstrap_sync_options list variable that allows
catalog items to add custom syncOptions to the generated ArgoCD Application.
RespectIgnoreDifferences=true is always included as before.

Common use case: SkipDryRunOnMissingResource=true is needed when operator
Subscriptions and their CRDs (e.g. Securesign) are in the same Application.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@juliaaano

Copy link
Copy Markdown
Contributor

I think this is unnecessary. I recommend adding SkipDryRunOnMissingResource=true to the specific CR manifest within the gitops deployment resources.

For example, such as in this case: https://github.com/rhpds/modernize-ocp-virt-automation/blob/f665ac11579301e692ec797f58e11e0be2287396/bootstrap-infra/templates/devhub/backstage-cr.yaml#L8

@tonykay

tonykay commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Closing — per Juliano's recommendation, the per-resource annotation argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true on the specific CR (Securesign) is the better approach. Applied in rhpds/lightwell-automation-gitops@0011ca4.

@tonykay tonykay closed this Aug 5, 2026
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.

2 participants