MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / Kubernetes

Function Kubernetes

internal/testing/require/kubernetes.go:73–77  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

71// Tests that call t.Parallel might share the same local API. Call t.Parallel after this
72// function to ensure they share.
73func 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".

Calls 2

kubernetes3Function · 0.85
HelperMethod · 0.80