Documentation
¶
Index ¶
- Constants
- func AppendEtcdEnvs(envs []corev1.EnvVar, bannerEnvName string, vClusterName string, podCount int) []corev1.EnvVar
- func BuildEnvs(podName, vClusterVersion string) []corev1.EnvVar
- func BuildEtcdEndpoints(vClusterName string, podCount int) string
- func CreateEphemeralContainer(targetContainer *corev1.Container, envs []corev1.EnvVar, name string, ...) corev1.EphemeralContainer
- func FindExistingDebugShell(pod *corev1.Pod, namePrefix string) (string, bool)
- func FindTargetContainer(pod *corev1.Pod, containerName string) *corev1.Container
- func IsEmbeddedEtcdEnabled(rawVClusterConfig []byte) (bool, error)
- func SelectRunningPod(pods []corev1.Pod) (*corev1.Pod, bool)
- func SelectTargetPod(pods []corev1.Pod, requestedPodName string) (*corev1.Pod, error)
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 BuildEtcdEndpoints ¶
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 ¶
FindExistingDebugShell returns the matching debug container name and whether it is running.
func FindTargetContainer ¶
FindTargetContainer locates the named container in the pod spec.
func IsEmbeddedEtcdEnabled ¶
IsEmbeddedEtcdEnabled decodes the vCluster config and checks if embedded etcd is enabled.
func SelectRunningPod ¶
SelectRunningPod returns the first running pod in the list.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.