MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / Delete

Function Delete

tests/utils/pods/pod.go:56–72  ·  view source on GitHub ↗

Delete deletes a pod if existent

(
	ctx context.Context,
	crudClient client.Client,
	namespace, name string,
	opts ...client.DeleteOption,
)

Source from the content-addressed store, hash-verified

54
55// Delete deletes a pod if existent
56func Delete(
57 ctx context.Context,
58 crudClient client.Client,
59 namespace, name string,
60 opts ...client.DeleteOption,
61) error {
62 u := &unstructured.Unstructured{}
63 u.SetName(name)
64 u.SetNamespace(namespace)
65 u.SetGroupVersionKind(schema.GroupVersionKind{
66 Group: "",
67 Version: "v1",
68 Kind: "Pod",
69 })
70
71 return objects.Delete(ctx, crudClient, u, opts...)
72}
73
74// CreateAndWaitForReady creates a given pod object and wait for it to be ready
75func CreateAndWaitForReady(

Callers 3

DeleteNamespaceAndWaitFunction · 0.92
logs_test.goFile · 0.92

Calls 1

DeleteFunction · 0.92

Tested by

no test coverage detected