Skip to content

Commit

Permalink
Merge pull request #157 from appuio/fix/forwarder-skip-dry-run-on-mis…
Browse files Browse the repository at this point in the history
…sing-resource

Fix initial sync for `ClusterLogForwarder` resources
  • Loading branch information
simu authored Nov 19, 2024
2 parents 85f5517 + 022fb85 commit 8710667
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 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
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 8710667

Please sign in to comment.