k8s

package
v0.1.2-0...-47a3a74 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: EUPL-1.2 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Cluster   string
	Clientset *kubernetes.Clientset
	Dynamic   dynamic.Interface
	Config    *rest.Config
}

API holds two K8s client interfaces: clientset and dynamic

func CreateAPI

func CreateAPI(context string) (*API, error)

CreateAPI initializes a K8s clientset and a dynamic K8s client

func (API) ApplyManifests

func (k8sAPI API) ApplyManifests(namespace string, manifests string) error

ApplyManifests applies a set of manifests

func (API) GetSecretData

func (k8sAPI API) GetSecretData(secretName string, namespace string) (map[string][]byte, error)

GetSecretData gets the data for a secret

func (API) PatchNamespaceLabels

func (k8sAPI API) PatchNamespaceLabels(namespace string, labelPatches map[string]string, operation string) error

func (API) SecretExists

func (k8sAPI API) SecretExists(secretName string, namespace string) (bool, error)

SecretExists checks if a secret exists

Jump to

Keyboard shortcuts

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