kubernetes

package
v0.265.2 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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