From 867b9dc1fefe59331e112367ef965500ae8b911e Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Tue, 19 Nov 2024 12:56:38 +0100 Subject: [PATCH] Fix initial sync for `ClusterLogForwarder` resources Add `SkipDryRunOnMissingResource=true` to `ClusterLogForwarder` so that the initial sync of the openshift4-logging ArgoCD app can succeed. --- component/config_forwarding.libsonnet | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/component/config_forwarding.libsonnet b/component/config_forwarding.libsonnet index dcaa4aa..c1cf1e5 100644 --- a/component/config_forwarding.libsonnet +++ b/component/config_forwarding.libsonnet @@ -225,6 +225,11 @@ local unfoldSpecs(specs) = { // ClusterLogForwarder: // Create definitive ClusterLogForwarder resource from specs. local clusterLogForwarder = lib.ClusterLogForwarder(params.namespace, 'instance') { + metadata+: { + annotations+: { + 'argocd.argoproj.io/sync-options': 'SkipDryRunOnMissingResource=true', + }, + }, spec: unfoldSpecs(clusterLogForwarderSpec), }; @@ -243,6 +248,11 @@ local namespaceLogForwarder = [ local serviceAccount = std.get(specs, 'serviceAccountName', utils.namespacedName(forwarder).name); lib.ClusterLogForwarder(namespace, name) { + metadata+: { + annotations+: { + 'argocd.argoproj.io/sync-options': 'SkipDryRunOnMissingResource=true', + }, + }, spec: { serviceAccountName: serviceAccount } + com.makeMergeable(unfoldSpecs(specs)), } for forwarder in std.objectFields(params.namespaceLogForwarder)