-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: yaroslavborbat <[email protected]>
- Loading branch information
1 parent
85396ba
commit 98ad3b1
Showing
3 changed files
with
108 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
images/virt-artifact/patches/023-replace-expressions-for-validating-admission-policy.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/pkg/virt-operator/resource/generate/components/validatingadmissionpolicy.go b/pkg/virt-operator/resource/generate/components/validatingadmissionpolicy.go | ||
index 5fefec2304..20914e8bf6 100644 | ||
--- a/pkg/virt-operator/resource/generate/components/validatingadmissionpolicy.go | ||
+++ b/pkg/virt-operator/resource/generate/components/validatingadmissionpolicy.go | ||
@@ -117,7 +117,7 @@ func NewHandlerV1ValidatingAdmissionPolicy(virtHandlerServiceAccount string) *ad | ||
Variables: []admissionregistrationv1.Variable{ | ||
{ | ||
Name: "oldNonKubevirtLabels", | ||
- Expression: `oldObject.metadata.labels.filter(k, !k.contains("kubevirt.io") && k != "cpumanager")`, | ||
+ Expression: `oldObject.metadata.labels.filter(k, !k.contains("kubevirt") && k != "cpumanager")`, | ||
}, | ||
{ | ||
Name: "oldLabels", | ||
@@ -125,7 +125,7 @@ func NewHandlerV1ValidatingAdmissionPolicy(virtHandlerServiceAccount string) *ad | ||
}, | ||
{ | ||
Name: "newNonKubevirtLabels", | ||
- Expression: `object.metadata.labels.filter(k, !k.contains("kubevirt.io") && k != "cpumanager")`, | ||
+ Expression: `object.metadata.labels.filter(k, !k.contains("kubevirt") && k != "cpumanager")`, | ||
}, | ||
{ | ||
Name: "newLabels", | ||
@@ -133,11 +133,11 @@ func NewHandlerV1ValidatingAdmissionPolicy(virtHandlerServiceAccount string) *ad | ||
}, | ||
{ | ||
Name: "oldNonKubevirtAnnotations", | ||
- Expression: `oldObject.metadata.annotations.filter(k, !k.contains("kubevirt.io"))`, | ||
+ Expression: `oldObject.metadata.annotations.filter(k, !k.contains("kubevirt"))`, | ||
}, | ||
{ | ||
Name: "newNonKubevirtAnnotations", | ||
- Expression: `object.metadata.annotations.filter(k, !k.contains("kubevirt.io"))`, | ||
+ Expression: `object.metadata.annotations.filter(k, !k.contains("kubevirt"))`, | ||
}, | ||
{ | ||
Name: "oldAnnotations", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters