k8s

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 14 Imported by: 8

Documentation

Overview

Package k8s contains helper functions to establlish connection and communicate with k8s apis

Index

Constants

This section is empty.

Variables

View Source
var (
	// KubeConfig specifies the path of kubeconfig file
	KubeConfig string
	// ContextName specifies the name of kubeconfig context
	ContextName string
)

Functions

func AutoDetectEnvironment added in v0.13.4

func AutoDetectEnvironment(c *Client) (name string)

AutoDetectEnvironment detect the environment for a given k8s context

Types

type Client

type Client struct {
	K8sClientset    kubernetes.Interface
	KSPClientset    ksp.SecurityV1Interface
	APIextClientset apiextensionsclientset.Interface
	RawConfig       clientcmdapi.Config
	Config          *rest.Config
}

Client Structure

func ConnectK8sClient

func ConnectK8sClient() (*Client, error)

ConnectK8sClient Function

Jump to

Keyboard shortcuts

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