From eb53b81d055ba0cade616b6b5cb50ae4e7117545 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 8 Oct 2021 15:37:19 +0200 Subject: [PATCH] Ensure operator and CRD are installed before applying resources --- component/config.jsonnet | 3 +++ .../group-sync-operator/group-sync-operator/02_groupsync.yaml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/component/config.jsonnet b/component/config.jsonnet index ff326fb..b96120d 100644 --- a/component/config.jsonnet +++ b/component/config.jsonnet @@ -41,6 +41,9 @@ local groupSyncs = std.filter( name: k, namespace: params.namespace, labels+: labels, + annotations+: { + 'argocd.argoproj.io/sync-options': 'SkipDryRunOnMissingResource=true', + }, }, spec: { providers: [ diff --git a/tests/golden/defaults/group-sync-operator/group-sync-operator/02_groupsync.yaml b/tests/golden/defaults/group-sync-operator/group-sync-operator/02_groupsync.yaml index 7676eb4..56edd09 100644 --- a/tests/golden/defaults/group-sync-operator/group-sync-operator/02_groupsync.yaml +++ b/tests/golden/defaults/group-sync-operator/group-sync-operator/02_groupsync.yaml @@ -1,6 +1,8 @@ apiVersion: redhatcop.redhat.io/v1alpha1 kind: GroupSync metadata: + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true labels: app.kubernetes.io/managed-by: commodore app.kubernetes.io/name: group-sync-operator @@ -32,6 +34,8 @@ spec: apiVersion: redhatcop.redhat.io/v1alpha1 kind: GroupSync metadata: + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true labels: app.kubernetes.io/managed-by: commodore app.kubernetes.io/name: group-sync-operator