Documentation ¶
Index ¶
- type Helper
- func (h *Helper) AddDebugSidecarDaemonSet(ctx context.Context, ...) (*appsv1.DaemonSet, string, error)
- func (h *Helper) AddDebugSidecarDeployment(ctx context.Context, ...) (*appsv1.Deployment, string, error)
- func (h *Helper) CreateJWKSecret(ctx context.Context, namespace, owner string) (name string, token string, err error)
- func (h *Helper) FetchJWKSecret(ctx context.Context, namespace, owner string) (corev1.Secret, error)
- func (h *Helper) GetDDApplyInfo(ctx context.Context, namespace, deploymentname string) (resources.DDConfig, error)
- func (h *Helper) GetDDPodApplyInfo(ctx context.Context, namespace, podname string) (resources.DDConfig, error)
- func (h *Helper) ListDaemonsetsInNamespace(ctx context.Context, namespace string) (*appsv1.DaemonSetList, error)
- func (h *Helper) ListDeploymentsInNamespace(ctx context.Context, namespace string) (*appsv1.DeploymentList, error)
- func (h *Helper) ListNamespaces(ctx context.Context) (*corev1.NamespaceList, error)
- func (h *Helper) ListPodsInNamespace(ctx context.Context, namespace string) (*corev1.PodList, error)
- func (h *Helper) PortForward(ctx context.Context, namespace string, podname string) error
- func (h *Helper) RemoveDebugSidecarDaemonSet(ctx context.Context, namespace, deploymentname string) (*appsv1.DaemonSet, error)
- func (h *Helper) RemoveDebugSidecarDeployment(ctx context.Context, namespace, deploymentname string) (*appsv1.Deployment, error)
- func (h *Helper) RemoveJWKSecret(ctx context.Context, namespace, secretname string) error
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 ¶
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 ¶
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