kubernetes

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 1 module, 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

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