From e2f1c6a4e5b03f5729a594a46bef0723f90046d2 Mon Sep 17 00:00:00 2001 From: QuantumEnigmaa Date: Tue, 6 Feb 2024 16:47:11 +0100 Subject: [PATCH] add missing kind and apiVersion to object --- service/controller/resource/ciliumnetpol/resource.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service/controller/resource/ciliumnetpol/resource.go b/service/controller/resource/ciliumnetpol/resource.go index 6fc288bdf..09ddc2b18 100644 --- a/service/controller/resource/ciliumnetpol/resource.go +++ b/service/controller/resource/ciliumnetpol/resource.go @@ -46,8 +46,10 @@ func toCiliumNetworkPolicy(v interface{}) (*unstructured.Unstructured, error) { ciliumNetworkPolicy := &unstructured.Unstructured{ Object: map[string]interface{}{ + "apiVersion": "cilium.io/v2", + "kind": "CiliumNetworkPolicy", "metadata": map[string]interface{}{ - "name": key.Namespace(cluster) + "-prometheus", + "name": key.ClusterID(cluster) + "-prometheus", "namespace": key.Namespace(cluster), "labels": map[string]string{ "app.kubernetes.io/name": "prometheus",