From 7e8fa26edb6a6c858711585b0fbb75d805f86c57 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Wed, 14 Sep 2022 22:52:02 +0400 Subject: [PATCH] fix: use PathEscape instead of QueryEscape I believe that is the intention - replace `/` to avoid mismatches on prefixes. Signed-off-by: Andrey Smirnov --- pkg/state/impl/etcd/key.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/state/impl/etcd/key.go b/pkg/state/impl/etcd/key.go index 312709c..36d6bc2 100644 --- a/pkg/state/impl/etcd/key.go +++ b/pkg/state/impl/etcd/key.go @@ -23,8 +23,8 @@ func (st *State) etcdKeyFromPointer(pointer resource.Pointer) string { // etcdKeyPrefixFromKind returns a key prefix for the given resource kind. func (st *State) etcdKeyPrefixFromKind(kind resource.Kind) string { - nsEscaped := url.QueryEscape(kind.Namespace()) - typeEscaped := url.QueryEscape(kind.Type()) + nsEscaped := url.PathEscape(kind.Namespace()) + typeEscaped := url.PathEscape(kind.Type()) return st.keyPrefix + "/" + nsEscaped + "/" + typeEscaped + "/" }