Skip to content

Commit

Permalink
Fix initial sync for ClusterLogForwarder resources
Browse files Browse the repository at this point in the history
Add `SkipDryRunOnMissingResource=true` to `ClusterLogForwarder` so that
the initial sync of the openshift4-logging ArgoCD app can succeed.
  • Loading branch information
simu committed Nov 19, 2024
1 parent 85f5517 commit 867b9dc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions component/config_forwarding.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};

Expand All @@ -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)
Expand Down

0 comments on commit 867b9dc

Please sign in to comment.