fix(): just use raw json
This commit is contained in:
		| @@ -60,22 +60,9 @@ func RecreateIPPoolCrd(cfg *Config, name string, ips []string) 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(). | ||||
| 		Resource("routes"). | ||||
| 		Body(&obj). | ||||
| 		Body([]byte(body)). | ||||
| 		Do(context.TODO()) | ||||
|  | ||||
| 	var status int | ||||
|   | ||||
		Reference in New Issue
	
	Block a user