MCPcopy
hub / github.com/microsoft/retina / ephemeralContainerForPodDebug

Function ephemeralContainerForPodDebug

shell/manifests.go:10–25  ·  view source on GitHub ↗

convertToCapabilities converts a slice of strings to a slice of v1.Capability

(config Config)

Source from the content-addressed store, hash-verified

8
9// convertToCapabilities converts a slice of strings to a slice of v1.Capability
10func ephemeralContainerForPodDebug(config Config) v1.EphemeralContainer {
11 return v1.EphemeralContainer{
12 EphemeralContainerCommon: v1.EphemeralContainerCommon{
13 Name: randomRetinaShellContainerName(),
14 Image: config.RetinaShellImage,
15 Stdin: true,
16 TTY: true,
17 SecurityContext: &v1.SecurityContext{
18 Capabilities: &v1.Capabilities{
19 Drop: []v1.Capability{"ALL"},
20 Add: stringSliceToCapabilities(config.Capabilities),
21 },
22 },
23 },
24 }
25}
26
27func hostNetworkPodForNodeDebug(config Config, debugPodNamespace, nodeName string) *v1.Pod {
28 pod := &v1.Pod{

Calls 2