From 67f50adc39ea1d740654aa7b242f6ec1adf75478 Mon Sep 17 00:00:00 2001 From: Dmitry Lopatin Date: Wed, 22 May 2024 17:42:13 +0300 Subject: [PATCH] fix(kube-api-rewriter): add rewrite ownerReferences - add rewrite owner reference for kubevirt and cdi related resources Signed-off-by: Dmitry Lopatin --- images/kube-api-proxy/pkg/rewriter/target_request.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/images/kube-api-proxy/pkg/rewriter/target_request.go b/images/kube-api-proxy/pkg/rewriter/target_request.go index 4a7606f5f..c9ad3ae1f 100644 --- a/images/kube-api-proxy/pkg/rewriter/target_request.go +++ b/images/kube-api-proxy/pkg/rewriter/target_request.go @@ -128,7 +128,7 @@ func (tr *TargetRequest) ShouldRewriteRequest() bool { if tr.originEndpoint.IsCore { switch tr.originEndpoint.ResourceType { - case "pods": + case "pods", "configmaps", "secrets", "services": return true } } @@ -137,7 +137,14 @@ func (tr *TargetRequest) ShouldRewriteRequest() bool { case "mutatingwebhookconfigurations", "validatingwebhookconfigurations", "clusterroles", - "roles": + "roles", + "rolebindings", + "clusterrolebindings", + "deployments", + "statefulsets", + "daemonsets", + "poddisruptionbudgets": + return true }