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) diff --git a/tests/golden/legacy/openshift4-logging/openshift4-logging/31_cluster_logforwarding.yaml b/tests/golden/legacy/openshift4-logging/openshift4-logging/31_cluster_logforwarding.yaml index b6f6990..69c1e22 100644 --- a/tests/golden/legacy/openshift4-logging/openshift4-logging/31_cluster_logforwarding.yaml +++ b/tests/golden/legacy/openshift4-logging/openshift4-logging/31_cluster_logforwarding.yaml @@ -1,7 +1,8 @@ apiVersion: logging.openshift.io/v1 kind: ClusterLogForwarder metadata: - annotations: {} + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true labels: name: instance name: instance diff --git a/tests/golden/master/openshift4-logging/openshift4-logging/31_cluster_logforwarding.yaml b/tests/golden/master/openshift4-logging/openshift4-logging/31_cluster_logforwarding.yaml index c4d68e0..6ed51d1 100644 --- a/tests/golden/master/openshift4-logging/openshift4-logging/31_cluster_logforwarding.yaml +++ b/tests/golden/master/openshift4-logging/openshift4-logging/31_cluster_logforwarding.yaml @@ -1,7 +1,8 @@ apiVersion: logging.openshift.io/v1 kind: ClusterLogForwarder metadata: - annotations: {} + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true labels: name: instance name: instance diff --git a/tests/golden/master/openshift4-logging/openshift4-logging/32_namespace_logforwarding.yaml b/tests/golden/master/openshift4-logging/openshift4-logging/32_namespace_logforwarding.yaml index 1c2d4e6..f9b4483 100644 --- a/tests/golden/master/openshift4-logging/openshift4-logging/32_namespace_logforwarding.yaml +++ b/tests/golden/master/openshift4-logging/openshift4-logging/32_namespace_logforwarding.yaml @@ -1,7 +1,8 @@ apiVersion: logging.openshift.io/v1 kind: ClusterLogForwarder metadata: - annotations: {} + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true labels: name: bar name: bar @@ -27,7 +28,8 @@ spec: apiVersion: logging.openshift.io/v1 kind: ClusterLogForwarder metadata: - annotations: {} + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true labels: name: hands name: hands diff --git a/tests/golden/multilineerr/openshift4-logging/openshift4-logging/31_cluster_logforwarding.yaml b/tests/golden/multilineerr/openshift4-logging/openshift4-logging/31_cluster_logforwarding.yaml index ad037a2..15009bd 100644 --- a/tests/golden/multilineerr/openshift4-logging/openshift4-logging/31_cluster_logforwarding.yaml +++ b/tests/golden/multilineerr/openshift4-logging/openshift4-logging/31_cluster_logforwarding.yaml @@ -1,7 +1,8 @@ apiVersion: logging.openshift.io/v1 kind: ClusterLogForwarder metadata: - annotations: {} + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true labels: name: instance name: instance