kubernetes

package
v0.258.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrchestratorGroup   = "core.inference-gateway.com"
	OrchestratorVersion = "v1alpha1"
	LabelCompute        = "inference-gateway.com/compute"

	// MinOperatorVersion is the first operator release that runs an
	// Orchestrator in a Sandbox from the image's own entrypoint and links it
	// to a Gateway by ref.
	MinOperatorVersion = "v0.29.0"
)

The operator API a cluster has to serve for sessions to run in it, and the label that marks what runs on one cluster's compute.

Variables

View Source
var OrchestratorGVR = k8sschema.GroupVersionResource{Group: OrchestratorGroup, Version: OrchestratorVersion, Resource: "orchestrators"}

Functions

func RequireOperator

func RequireOperator(ctx context.Context, dynamic k8sdynamic.Interface, namespace, where string) error

RequireOperator fails unless the cluster serves Orchestrators in namespace, so nothing is created in a cluster without the operator. where names the cluster in errors. A cluster without the CRD answers the list with not found.

func ServerVersion

func ServerVersion(ctx context.Context, core *k8srest.RESTClient) (string, error)

ServerVersion is the cluster's Kubernetes version as it reports it.

func Status

Status checks one cluster: whether it is reachable and runs the operator, its Kubernetes version, and the sessions every workspace on it runs.

Types

type Clients

type Clients struct {
	Rest    *k8srest.Config
	Dynamic k8sdynamic.Interface
	Core    *k8srest.RESTClient
}

Clients reach one cluster: the REST config a port-forward dials, a dynamic client for resources, and a core client for the calls no resource client makes, the port-forward URL and the server version.

func Connect

func Connect(kubeconfig, kubeContext, what string) (Clients, error)

Connect builds the clients for the cluster a kubeconfig and context name, the default kubeconfig and its current context when empty. what names the cluster's user in errors, such as "workspace code-reviewer".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL