-
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.
refactor(kube-api-rewriter): fixes to work with original KubeVirt
- Rename cluster resources: validatingwebhooks, mutatingwebhooks. - Rename app.kubernetes.io/managed-by label value. - Rename devices on nodes, rename unix socket path for Device Plugin API server. - Remove upload.cdi.kubevirt.io ApiService. - kube-api-rewriter: Rewrite name and value for labels and annotations. - kube-api-rewriter: Add Exclude rules to exclude objects from API server. - kube-api-rewriter: Exclude original CRDs from CRD list, exclude original groups/resources from discovery responses. - kube-api-rewriter: Preserve original labels with prefix to save them during list-restore-update-rename transformation chain. Signed-off-by: Ivan Mikheykin <[email protected]>
- Loading branch information
Showing
25 changed files
with
738 additions
and
68 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
46 changes: 46 additions & 0 deletions
46
images/cdi-artifact/patches/009-remove-upload-apiservice.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,46 @@ | ||
diff --git a/pkg/operator/resources/cluster/apiserver.go b/pkg/operator/resources/cluster/apiserver.go | ||
index adf8093fa..f737bba55 100644 | ||
--- a/pkg/operator/resources/cluster/apiserver.go | ||
+++ b/pkg/operator/resources/cluster/apiserver.go | ||
@@ -48,7 +48,7 @@ func createStaticAPIServerResources(args *FactoryArgs) []client.Object { | ||
|
||
func createDynamicAPIServerResources(args *FactoryArgs) []client.Object { | ||
return []client.Object{ | ||
- createAPIService("v1beta1", args.Namespace, args.Client, args.Logger), | ||
+ // createAPIService("v1beta1", args.Namespace, args.Client, args.Logger), | ||
createDataVolumeValidatingWebhook(args.Namespace, args.Client, args.Logger), | ||
createDataVolumeMutatingWebhook(args.Namespace, args.Client, args.Logger), | ||
createCDIValidatingWebhook(args.Namespace, args.Client, args.Logger), | ||
diff --git a/pkg/operator/resources/cluster/rbac.go b/pkg/operator/resources/cluster/rbac.go | ||
index 88e14c39a..85635efd9 100644 | ||
--- a/pkg/operator/resources/cluster/rbac.go | ||
+++ b/pkg/operator/resources/cluster/rbac.go | ||
@@ -58,17 +58,17 @@ func getAdminPolicyRules() []rbacv1.PolicyRule { | ||
"create", | ||
}, | ||
}, | ||
- { | ||
- APIGroups: []string{ | ||
- "upload.cdi.kubevirt.io", | ||
- }, | ||
- Resources: []string{ | ||
- "uploadtokenrequests", | ||
- }, | ||
- Verbs: []string{ | ||
- "*", | ||
- }, | ||
- }, | ||
+ // { | ||
+ // APIGroups: []string{ | ||
+ // "upload.cdi.kubevirt.io", | ||
+ // }, | ||
+ // Resources: []string{ | ||
+ // "uploadtokenrequests", | ||
+ // }, | ||
+ // Verbs: []string{ | ||
+ // "*", | ||
+ // }, | ||
+ // }, | ||
} | ||
} | ||
|
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.