Delete deletes a pod if existent
( ctx context.Context, crudClient client.Client, namespace, name string, opts ...client.DeleteOption, )
| 54 | |
| 55 | // Delete deletes a pod if existent |
| 56 | func 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 |
| 75 | func CreateAndWaitForReady( |
no test coverage detected