kubernetes

package
v0.0.0-...-dd5720f Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateK8sSecret

func CreateK8sSecret(clientset *kubernetes.Clientset, o *CreateK8sSecretCmdOptions) error

CreateK8sSecret

func CreateKubeConfig

func CreateKubeConfig(inCluster string) (*rest.Config, kubernetes.Clientset, string)

CreateKubeConfig

func CreateSecretV2

func CreateSecretV2(inCluster string, secret *v1.Secret) error

CreateSecretV2

func PodExecSession

func PodExecSession(clientset *kubernetes.Clientset, config *rest.Config, p *PodSessionOptions, silent bool) error

PodExecSession executes a command against a Pod

func ReadConfigMapV2

func ReadConfigMapV2(inCluster string, namespace string, configMapName string) (map[string]string, error)

ReadConfigMapV2

func ReadSecretV2

func ReadSecretV2(inCluster string, namespace string, secretName string) (map[string]string, error)

ReadSecretV2

func ReadService

func ReadService(clientset *kubernetes.Clientset, namespace string, serviceName string) (*v1.Service, error)

ReadService reads a Kubernetes Service object

func ReturnDeploymentObject

func ReturnDeploymentObject(clientset *kubernetes.Clientset, matchLabel string, matchLabelValue string, namespace string, timeoutSeconds int64) (*appsv1.Deployment, error)

ReturnDeploymentObject returns a matching appsv1.Deployment object based on the filters

func ReturnKubeConfigPath

func ReturnKubeConfigPath() string

ReturnKubeConfigPath generates the path in the filesystem to kubeconfig

func ReturnPodObject

func ReturnPodObject(clientset *kubernetes.Clientset, matchLabel string, matchLabelValue string, namespace string, timeoutSeconds int64) (*v1.Pod, error)

ReturnPodObject returns a matching v1.Pod object based on the filters

func ReturnStatefulSetObject

func ReturnStatefulSetObject(clientset *kubernetes.Clientset, matchLabel string, matchLabelValue string, namespace string, timeoutSeconds int64) (*appsv1.StatefulSet, error)

ReturnStatefulSetObject returns a matching appsv1.StatefulSet object based on the filters

func SynchronizeECRTokenSecret

func SynchronizeECRTokenSecret(clientset *kubernetes.Clientset, o *SyncEcrCmdOptions) error

SynchronizeECRTokenSecret

func UpdateConfigMapV2

func UpdateConfigMapV2(inCluster string, namespace, configMapName string, key string, value string) error

UpdateConfigMapV2

func WaitForCertificateReady

func WaitForCertificateReady(restConfig *rest.Config, namespace string, certificateName string, timeoutSeconds int64) error

WaitForCertificateReady

func WaitForClusterSecretStoreReady

func WaitForClusterSecretStoreReady(clientset *kubernetes.Clientset, storeName string, timeoutSeconds int64) error

WaitForClusterSecretStoreReady

func WaitForDeploymentReady

func WaitForDeploymentReady(clientset *kubernetes.Clientset, deployment *appsv1.Deployment, timeoutSeconds int64) (bool, error)

WaitForDeploymentReady waits for a target Deployment to become ready

func WaitForPodReady

func WaitForPodReady(clientset *kubernetes.Clientset, pod *v1.Pod, timeoutSeconds int64) (bool, error)

WaitForPodReady waits for a target Pod to become ready

func WaitForStatefulSetReady

func WaitForStatefulSetReady(clientset *kubernetes.Clientset, statefulset *appsv1.StatefulSet, timeoutSeconds int64, ignoreReady bool) (bool, error)

WaitForStatefulSetReady waits for a target StatefulSet to become ready

Types

type CreateK8sSecretCmdOptions

type CreateK8sSecretCmdOptions struct {
	Namespace           string
	Name                string
	KubeInClusterConfig string
}

type PodSessionOptions

type PodSessionOptions struct {
	Command    []string
	Namespace  string
	PodName    string
	Stdin      bool
	Stdout     bool
	Stderr     bool
	TtyEnabled bool
}

podSessionOptions provides a struct to assign parameters to an exec session

type SyncEcrCmdOptions

type SyncEcrCmdOptions struct {
	Namespace           string
	Region              string
	RegistryURL         string
	KubeInClusterConfig string
}

Jump to

Keyboard shortcuts

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