Documentation
¶
Index ¶
- Constants
- Variables
- func RequireOperator(ctx context.Context, dynamic k8sdynamic.Interface, namespace, where string) error
- func ServerVersion(ctx context.Context, core *k8srest.RESTClient) (string, error)
- func Status(ctx context.Context, cluster config.ClusterEntry) computedomain.ClusterStatus
- type Clients
Constants ¶
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 ¶
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 ¶
ServerVersion is the cluster's Kubernetes version as it reports it.
func Status ¶
func Status(ctx context.Context, cluster config.ClusterEntry) computedomain.ClusterStatus
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.