From 38119fe3ae7a7a685697627faabc6b86029f2640 Mon Sep 17 00:00:00 2001 From: Tony Kay Date: Wed, 5 Aug 2026 08:16:23 -0600 Subject: [PATCH 1/2] feat(gitops_bootstrap): add configurable sync_options for ArgoCD Application 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 --- roles/ocp4_workload_gitops_bootstrap/defaults/main.yml | 8 ++++++++ .../templates/application.yaml.j2 | 3 +++ 2 files changed, 11 insertions(+) diff --git a/roles/ocp4_workload_gitops_bootstrap/defaults/main.yml b/roles/ocp4_workload_gitops_bootstrap/defaults/main.yml index 7565c7e..d39d96a 100644 --- a/roles/ocp4_workload_gitops_bootstrap/defaults/main.yml +++ b/roles/ocp4_workload_gitops_bootstrap/defaults/main.yml @@ -49,3 +49,11 @@ ocp4_workload_gitops_bootstrap_application_sync_required: true # false is great # /operation on child Application CRDs. Has no effect on other resource types. # Default: false — existing labs are unaffected unless they opt in. ocp4_workload_gitops_bootstrap_application_ignore_tracking: false + +# Additional syncOptions to include on the ArgoCD Application. +# RespectIgnoreDifferences=true is always included. +# Common additions: +# - SkipDryRunOnMissingResource=true (when operator CRDs are in same app as Subscriptions) +# - CreateNamespace=true +# - ServerSideApply=true +ocp4_workload_gitops_bootstrap_sync_options: [] diff --git a/roles/ocp4_workload_gitops_bootstrap/templates/application.yaml.j2 b/roles/ocp4_workload_gitops_bootstrap/templates/application.yaml.j2 index cfcd3e1..ae52c1f 100644 --- a/roles/ocp4_workload_gitops_bootstrap/templates/application.yaml.j2 +++ b/roles/ocp4_workload_gitops_bootstrap/templates/application.yaml.j2 @@ -33,6 +33,9 @@ spec: selfHeal: false syncOptions: - RespectIgnoreDifferences=true +{% for opt in ocp4_workload_gitops_bootstrap_sync_options %} + - {{ opt }} +{% endfor %} ignoreDifferences: - group: "" kind: ConfigMap From 337cb1c109073b4bae80c211df78f0b9e55b1aad Mon Sep 17 00:00:00 2001 From: Tony Kay Date: Wed, 5 Aug 2026 09:24:30 -0600 Subject: [PATCH 2/2] style: guard sync_options loop with length check Co-Authored-By: Claude Opus 4.6 --- .../templates/application.yaml.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/ocp4_workload_gitops_bootstrap/templates/application.yaml.j2 b/roles/ocp4_workload_gitops_bootstrap/templates/application.yaml.j2 index ae52c1f..5214618 100644 --- a/roles/ocp4_workload_gitops_bootstrap/templates/application.yaml.j2 +++ b/roles/ocp4_workload_gitops_bootstrap/templates/application.yaml.j2 @@ -33,9 +33,11 @@ spec: selfHeal: false syncOptions: - RespectIgnoreDifferences=true +{% if ocp4_workload_gitops_bootstrap_sync_options | length > 0 %} {% for opt in ocp4_workload_gitops_bootstrap_sync_options %} - {{ opt }} {% endfor %} +{% endif %} ignoreDifferences: - group: "" kind: ConfigMap