Documentation
¶
Overview ¶
Package k8s: initialization, client, and misc. helpers
- Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
Package k8s: initialization, client, and misc. helpers
- Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
Package k8s: initialization, client, and misc. helpers
- Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
Package k8s: initialization, client, and misc. helpers
- Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
Index ¶
Constants ¶
View Source
const ( Default = "default" Pod = "pod" Svc = "svc" )
Variables ¶
View Source
var ( NodeName string // assign upon successful initialization ErrK8sRequired = errors.New("the operation requires Kubernetes") )
Functions ¶
func InitMetricsClient ¶ added in v1.3.22
func InitMetricsClient()
func ValidateEtlName ¶ added in v1.3.16
Types ¶
type Client ¶
type Client interface {
Create(v any) error
Delete(entityType, entityName string) error
CheckExists(entityType, entityName string) (bool, error)
Pod(name string) (*corev1.Pod, error)
Pods() (*corev1.PodList, error)
Service(name string) (*corev1.Service, error)
Logs(podName string) ([]byte, error)
WatchPodEvents(podName string) (watch.Interface, error)
Health(podName string) (string, error)
CheckMetricsAvailability() error
}
Client is simplified version of default `kubernetes.Interface` client.
func InitTestClient ¶ added in v1.4.0
InitTestClient initializes a K8s client for testing environments using kubeconfig. This is designed for use in Go tests running from shell environments with kubectl access.
Click to show internal directories.
Click to hide internal directories.