kube

package
v2.0.0-...-5e8ce1c Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFailureRetryWrapper

func AddFailureRetryWrapper(config *rest.Config, failureRetryCount int, failureRetryPeriodSeconds int) *rest.Config

AddFailureRetryWrapper adds a transport wrapper which wraps a function call around each kubernetes request

func GetAppInstanceAnnotation

func GetAppInstanceAnnotation(un *unstructured.Unstructured, key string) (string, error)

GetAppInstanceAnnotation returns the application instance name from annotation

func GetAppInstanceLabel

func GetAppInstanceLabel(un *unstructured.Unstructured, key string) (string, error)

GetAppInstanceLabel returns the application instance name from labels

func IsValidResourceName

func IsValidResourceName(name string) bool

IsValidResourceName returns true if given string a valid Kubernetes resource name

func NewKubeUtil

func NewKubeUtil(client kubernetes.Interface, ctx context.Context) *kubeUtil

NewKubeUtil NewUtil returns a new kubeUtil receiver

func NewKubectl

func NewKubectl() kube.Kubectl

func PortForward

func PortForward(targetPort int, namespace string, overrides *clientcmd.ConfigOverrides, podSelectors ...string) (int, error)

func RemoveLabel

func RemoveLabel(un *unstructured.Unstructured, key string) error

RemoveLabel removes label with the specified name

func SetAppInstanceAnnotation

func SetAppInstanceAnnotation(target *unstructured.Unstructured, key, val string) error

SetAppInstanceAnnotation the recommended app.kubernetes.io/instance annotation against an unstructured object Uses the legacy labeling if environment variable is set

func SetAppInstanceLabel

func SetAppInstanceLabel(target *unstructured.Unstructured, key, val string) error

SetAppInstanceLabel the recommended app.kubernetes.io/instance label against an unstructured object Uses the legacy labeling if environment variable is set

Types

This section is empty.

Jump to

Keyboard shortcuts

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