Kubernetes starts or connects to a Kubernetes API and returns a client that uses it. When starting a local API, the client is a member of the "system:masters" group. It calls t.Fatal when something fails. It stops the local API using t.Cleanup. It calls t.Skip when the "KUBEBUILDER_ASSETS" and "USE
(t TestingT)
| 71 | // Tests that call t.Parallel might share the same local API. Call t.Parallel after this |
| 72 | // function to ensure they share. |
| 73 | func Kubernetes(t TestingT) client.Client { |
| 74 | t.Helper() |
| 75 | _, cc := kubernetes3(t) |
| 76 | return cc |
| 77 | } |
| 78 | |
| 79 | // KubernetesAtLeast is the same as [Kubernetes] but also calls t.Skip when |
| 80 | // the connected Kubernetes API is earlier than minVersion, like "1.28" or "1.27.7". |