debugshell

package
v0.32.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTTLForEphemeralContainer = "60m"
	ShellBannerEnv                  = "SHELL_BANNER"
)

Variables

This section is empty.

Functions

func AppendEtcdEnvs

func AppendEtcdEnvs(envs []corev1.EnvVar, bannerEnvName string, vClusterName string, podCount int) []corev1.EnvVar

AppendEtcdEnvs appends ETCD env vars and enriches the banner env with ETCD tips.

func BuildEnvs

func BuildEnvs(podName, vClusterVersion string) []corev1.EnvVar

func BuildEtcdEndpoints

func BuildEtcdEndpoints(vClusterName string, podCount int) string

BuildEtcdEndpoints builds the endpoint list for embedded etcd.

func CreateEphemeralContainer

func CreateEphemeralContainer(targetContainer *corev1.Container, envs []corev1.EnvVar, name string, bannerEnvName string, ttl string) corev1.EphemeralContainer

CreateEphemeralContainer builds an ephemeral container spec that runs a debug shell.

func FindExistingDebugShell

func FindExistingDebugShell(pod *corev1.Pod, namePrefix string) (string, bool)

FindExistingDebugShell returns the matching debug container name and whether it is running.

func FindTargetContainer

func FindTargetContainer(pod *corev1.Pod, containerName string) *corev1.Container

FindTargetContainer locates the named container in the pod spec.

func IsEmbeddedEtcdEnabled

func IsEmbeddedEtcdEnabled(rawVClusterConfig []byte) (bool, error)

IsEmbeddedEtcdEnabled decodes the vCluster config and checks if embedded etcd is enabled.

func SelectRunningPod

func SelectRunningPod(pods []corev1.Pod) (*corev1.Pod, bool)

SelectRunningPod returns the first running pod in the list.

func SelectTargetPod

func SelectTargetPod(pods []corev1.Pod, requestedPodName string) (*corev1.Pod, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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