fix(): just use raw json
All checks were successful
Gitea Docker Build Demo / Test (push) Successful in 1m4s
Gitea Docker Build Demo / Build_Image (push) Successful in 1m24s

This commit is contained in:
2025-10-07 09:25:28 +02:00
parent 79fd7ff3b7
commit eacc8ac9f2

View File

@@ -60,22 +60,9 @@ func RecreateIPPoolCrd(cfg *Config, name string, ips []string) error {
return fmt.Errorf("error generating CRD: %v", err.Error()) return fmt.Errorf("error generating CRD: %v", err.Error())
} }
decode := scheme.Codecs.UniversalDeserializer().Decode
versionKind := schema.GroupVersionKind{
Group: "cilium.io",
Version: "v2alpha1",
Kind: "CiliumLoadBalancerIPPool",
}
obj, _, err := decode([]byte(body), &versionKind, nil)
if err != nil {
return fmt.Errorf("could not deserialize CRD: %v", err.Error())
}
res := routeclient.Post(). res := routeclient.Post().
Resource("routes"). Resource("routes").
Body(&obj). Body([]byte(body)).
Do(context.TODO()) Do(context.TODO())
var status int var status int