kubernetes

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package kubernetes contains utilities for interacting with kubernetes clusters and unit testing code that deals with clusters

Index

Constants

View Source
const (
	NamespacesURI = "/api/v1/namespaces"
	ConfigMapsURI = "/api/v1/namespaces/vmware-system-telemetry/configmaps"

	TelemetryNamespace    = "vmware-system-telemetry"
	TelemetryNamespaceURI = "/api/v1/namespaces/vmware-system-telemetry"

	CeipConfigMapName = "vmware-telemetry-cluster-ceip"
	CeipConfigMapURI  = "/api/v1/namespaces/vmware-system-telemetry/configmaps/vmware-telemetry-cluster-ceip"

	SharedIdsConfigMapName = "vmware-telemetry-identifiers"
	SharedIdsConfigMapURI  = "/api/v1/namespaces/vmware-system-telemetry/configmaps/vmware-telemetry-identifiers"
)

Variables

This section is empty.

Functions

func GetConfigAndServer

func GetConfigAndServer(h func(http.ResponseWriter, *http.Request)) (func() (*rest.Config, error), *httptest.Server, error)

GetConfigAndServer creates an httptest.Server that allows k8s based code to be tested locally Returns a function to acquire a rest.Config, leaving k8s client creation up to the caller

func GetDynamicClient

func GetDynamicClient() (dynamic.Interface, error)

GetDynamicClient gets a dynamic client for the targeted cluster We expect a KUBECONFIG env var to be set for cluster targeting

func GetKubernetesClientServer

func GetKubernetesClientServer(h func(http.ResponseWriter, *http.Request)) (func() (dynamic.Interface, error), *httptest.Server, error)

GetKubernetesClientServer creates an httptest.Server that allows k8s based code to be tested locally.

Types

This section is empty.

Jump to

Keyboard shortcuts

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