kube

package
v0.0.0-...-895b7a3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRetryableError

func IsRetryableError(err error) bool

IsRetryableError is a helper method to see whether an error returned from the dynamic client is potentially retryable. If the error is retryable we could retry again with exponential backoff. This code is directly copied from: https://github.com/argoproj/argo-cd/controller/cache/cache.go

Types

type KubernetesClient

type KubernetesClient struct {
	Clientset             kubernetes.Interface
	ApplicationsClientset versioned.Interface
	Context               context.Context
	Namespace             string
}

func NewKubernetesClient

func NewKubernetesClient(ctx context.Context, client kubernetes.Interface, applicationsClientset versioned.Interface, namespace string) *KubernetesClient

func NewKubernetesClientFromConfig

func NewKubernetesClientFromConfig(ctx context.Context, namespace string, kubeconfig string, kubecontext string) (*KubernetesClient, error)

NewKubernetesClient creates a new Kubernetes client object from given configuration file. If configuration file is the empty string, in-cluster client will be created.

Jump to

Keyboard shortcuts

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