Documentation ¶
Index ¶
- func AddFailureRetryWrapper(config *rest.Config, failureRetryCount int, failureRetryPeriodSeconds int) *rest.Config
- func GetAppInstanceAnnotation(un *unstructured.Unstructured, key string) string
- func GetAppInstanceLabel(un *unstructured.Unstructured, key string) string
- func IsValidResourceName(name string) bool
- func NewKubeUtil(client kubernetes.Interface, ctx context.Context) *kubeUtil
- func NewKubectl() kube.Kubectl
- func PortForward(targetPort int, namespace string, overrides *clientcmd.ConfigOverrides, ...) (int, error)
- func RemoveLabel(un *unstructured.Unstructured, key string)
- func SetAppInstanceAnnotation(target *unstructured.Unstructured, key, val string) error
- func SetAppInstanceLabel(target *unstructured.Unstructured, key, val string) error
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 ¶ added in v2.2.0
func GetAppInstanceAnnotation(un *unstructured.Unstructured, key string) string
GetAppInstanceAnnotation returns the application instance name from annotation
func GetAppInstanceLabel ¶ added in v2.2.0
func GetAppInstanceLabel(un *unstructured.Unstructured, key string) string
GetAppInstanceLabel returns the application instance name from labels
func IsValidResourceName ¶
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 PortForward ¶
func RemoveLabel ¶ added in v2.2.0
func RemoveLabel(un *unstructured.Unstructured, key string)
RemoveLabel removes label with the specified name
func SetAppInstanceAnnotation ¶ added in v2.2.0
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.