k8s

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 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
	// kubearmor-ca secret label
	KubeArmorCALabels = map[string]string{
		"kubearmor-app": "kubearmor-ca",
	}
)

Functions

func AutoDetectEnvironment added in v0.13.4

func AutoDetectEnvironment(c *Client) (name string)

AutoDetectEnvironment detect the environment for a given k8s context

func GetKubeArmorCaSecret added in v1.2.0

func GetKubeArmorCaSecret(client kubernetes.Interface) (string, string)

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