Skip to content

Commit 11f9d7d

Browse files
committed
Add support for patch-operator-backed patches
We modify the resources returned by `rl.Patch()` to inject custom ArgoCD sync-wave annotations. In order to ensure this functionality isn't lost when migrating to patch-operator-backed patches, we adjust the component to also inject the sync-wave annotations for resources with `kind: Patch`. Note that we aren't migrating to importing `patch-operator.libsonnet` directly to make this change backwards-compatible.
1 parent 4f1277a commit 11f9d7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

component/main.jsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ local consoleRoutePatch =
162162
},
163163
};
164164
[
165-
if obj.kind == 'ResourceLocker' then
165+
if std.member([ 'ResourceLocker', 'Patch' ], obj.kind) then
166166
obj {
167167
metadata+: {
168168
annotations+: {
@@ -207,7 +207,7 @@ local openshiftConfigNsAnnotationPatch =
207207
},
208208
};
209209
[
210-
if obj.kind == 'ResourceLocker' then
210+
if std.member([ 'ResourceLocker', 'Patch' ], obj.kind) then
211211
obj {
212212
metadata+: {
213213
annotations+: {

0 commit comments

Comments
 (0)