kubeutils

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientSet

func GetClientSet(useInClusterConfig bool) (*kubernetes.Clientset, error)

GetClientSet returns the kubernetes Clientset

Types

type APITokenProvider

type APITokenProvider struct {
	// contains filtered or unexported fields
}

APITokenProvider wraps around the kubernetes interface to enhance testability

func NewAPITokenProvider

func NewAPITokenProvider(useInClusterConfig bool) (*APITokenProvider, error)

NewAPITokenProvider creates new APITokenProvider

func (*APITokenProvider) GetKeptnAPITokenFromSecret

func (a *APITokenProvider) GetKeptnAPITokenFromSecret(ctx context.Context, namespace string, secretName string) (string, error)

GetKeptnAPITokenFromSecret returns the `keptn-api-token` data secret from Keptn Installation

type KeptnEndpointProvider

type KeptnEndpointProvider struct {
	// contains filtered or unexported fields
}

KeptnEndpointProvider wraps around the kubernetes interface to enhance testability

func NewKeptnEndpointProvider

func NewKeptnEndpointProvider(useInClusterConfig bool) (*KeptnEndpointProvider, error)

NewKeptnEndpointProvider creates new KeptnEndpointProvider

func (*KeptnEndpointProvider) GetKeptnEndpointFromIngress

func (a *KeptnEndpointProvider) GetKeptnEndpointFromIngress(ctx context.Context, namespace string, ingressName string) (string, error)

GetKeptnEndpointFromIngress returns the host of ingress object Keptn Installation

func (*KeptnEndpointProvider) GetKeptnEndpointFromService

func (a *KeptnEndpointProvider) GetKeptnEndpointFromService(ctx context.Context, namespace string, serviceName string) (string, error)

GetKeptnEndpointFromService returns the loadbalancer service IP from Keptn Installation

type NamespaceManager

type NamespaceManager struct {
	// contains filtered or unexported fields
}

NamespaceManager wraps around the kubernetes interface to enhance testability

func NewNamespaceManager

func NewNamespaceManager(useInClusterConfig bool) (*NamespaceManager, error)

NewNamespaceManager creates new NamespaceManager

func (*NamespaceManager) CreateNamespace

func (a *NamespaceManager) CreateNamespace(ctx context.Context, namespace string, namespaceMetadata ...metav1.ObjectMeta) error

CreateNamespace creates a new Kubernetes namespace with the provided name

func (*NamespaceManager) ExistsNamespace

func (a *NamespaceManager) ExistsNamespace(ctx context.Context, namespace string) (bool, error)

ExistsNamespace checks whether a namespace with the provided name exists

func (*NamespaceManager) GetKeptnManagedNamespace

func (a *NamespaceManager) GetKeptnManagedNamespace(ctx context.Context) ([]string, error)

GetKeptnManagedNamespace returns the list of namespace with the annotation & label `keptn.sh/managed-by: keptn`

Jump to

Keyboard shortcuts

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