From 943dba60cdc0d4a421fedc4b12a18ceea99aadcf Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Wed, 26 Jun 2024 23:40:48 +0300 Subject: [PATCH] ++ fix error "failed to list *v1.PodDisruptionBudget: json: cannot unmarshal string into Go struct field LabelSelector.items.spec.selector.matchLabels of type map[string]string" Signed-off-by: Ivan Mikheykin --- images/kube-api-proxy/pkg/rewriter/policy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/kube-api-proxy/pkg/rewriter/policy.go b/images/kube-api-proxy/pkg/rewriter/policy.go index 68b3b178f..60e301f43 100644 --- a/images/kube-api-proxy/pkg/rewriter/policy.go +++ b/images/kube-api-proxy/pkg/rewriter/policy.go @@ -23,6 +23,6 @@ const ( func RewritePDBOrList(rules *RewriteRules, obj []byte, action Action) ([]byte, error) { return RewriteResourceOrList(obj, PodDisruptionBudgetListKind, func(singleObj []byte) ([]byte, error) { - return RewriteLabelsMap(rules, singleObj, "spec.selector", action) + return RewriteLabelsMap(rules, singleObj, "spec.selector.matchLabels", action) }) }