kubernetes

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Helper

type Helper struct {
	Client kubernetes.Interface
}

Helper struct for kubernetes helper methods for managing debug sidecars

func (*Helper) AddDebugSidecarDaemonSet

func (h *Helper) AddDebugSidecarDaemonSet(ctx context.Context, namespace, daemonsetname, containerToDebug, debugimage string) (*appsv1.DaemonSet, string, error)

AddDebugSidecarDaemonSet adds a debug sidecar to a daemonset

func (*Helper) AddDebugSidecarDeployment

func (h *Helper) AddDebugSidecarDeployment(ctx context.Context, namespace, deploymentname, containerToDebug, debugimage string) (*appsv1.Deployment, string, error)

AddDebugSidecarDeployment adds debug sidecar to a Deployment

func (*Helper) CreateJWKSecret

func (h *Helper) CreateJWKSecret(ctx context.Context, namespace, owner string) (name string, token string, err error)

CreateJWKSecret creates a secret with a JWK public-key and subject

func (*Helper) FetchJWKSecret

func (h *Helper) FetchJWKSecret(ctx context.Context, namespace, owner string) (corev1.Secret, error)

FetchJWKSecret fetches secret from kubernetes based on owner

func (*Helper) GetDDApplyInfo

func (h *Helper) GetDDApplyInfo(ctx context.Context, namespace, deploymentname string) (resources.DDConfig, error)

GetDDApplyInfo returns the debug sidecar apply info for a deployment from kubernetes

func (*Helper) GetDDPodApplyInfo

func (h *Helper) GetDDPodApplyInfo(ctx context.Context, namespace, podname string) (resources.DDConfig, error)

GetDDPodApplyInfo returns the debug sidecar apply info for a pod from kubernetes

func (*Helper) ListDaemonsetsInNamespace

func (h *Helper) ListDaemonsetsInNamespace(ctx context.Context, namespace string) (*appsv1.DaemonSetList, error)

ListDaemonsetsInNamespace returns list of deployments in a namespace

func (*Helper) ListDeploymentsInNamespace

func (h *Helper) ListDeploymentsInNamespace(ctx context.Context, namespace string) (*appsv1.DeploymentList, error)

ListDeploymentsInNamespace returns list of deployments in a namespace

func (*Helper) ListNamespaces

func (h *Helper) ListNamespaces(ctx context.Context) (*corev1.NamespaceList, error)

ListNamespaces returns list of namespaces

func (*Helper) ListPodsInNamespace added in v0.1.0

func (h *Helper) ListPodsInNamespace(ctx context.Context, namespace string) (*corev1.PodList, error)

ListPodsInNamespace returns list of pods in a namespace

func (*Helper) PortForward

func (h *Helper) PortForward(ctx context.Context, namespace string, podname string) error

PortForward runs port-forward to the given pod and waits for Interrupt

func (*Helper) RemoveDebugSidecarDaemonSet

func (h *Helper) RemoveDebugSidecarDaemonSet(ctx context.Context, namespace, deploymentname string) (*appsv1.DaemonSet, error)

RemoveDebugSidecarDaemonSet removes the debug sidecar from a daemonset

func (*Helper) RemoveDebugSidecarDeployment

func (h *Helper) RemoveDebugSidecarDeployment(ctx context.Context, namespace, deploymentname string) (*appsv1.Deployment, error)

RemoveDebugSidecarDeployment removes debug sidecar from a Deployment

func (*Helper) RemoveJWKSecret

func (h *Helper) RemoveJWKSecret(ctx context.Context, namespace, secretname string) error

RemoveJWKSecret removes secret

Jump to

Keyboard shortcuts

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