MCPcopy
hub / github.com/dragonflyoss/dragonfly / GetClientPodNameInWorker

Function GetClientPodNameInWorker

test/e2e/util/exec.go:146–156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144}
145
146func GetClientPodNameInWorker() (string, error) {
147 out, err := KubeCtlCommand("-n", DragonflyNamespace, "get", "pod", "-l", "component=client",
148 "-o", "jsonpath='{.items[?(@.spec.nodeName==\"kind-worker\")].metadata.name}'").CombinedOutput()
149 if err != nil {
150 return "", err
151 }
152
153 podName := strings.Trim(string(out), "'")
154 fmt.Println(podName)
155 return podName, nil
156}
157
158func GetSeedClientPodName(n int) (string, error) {
159 out, err := KubeCtlCommand("-n", DragonflyNamespace, "get", "pod", "-l", "component=seed-client",

Callers 1

ClientExecFunction · 0.85

Calls 2

KubeCtlCommandFunction · 0.85
PrintlnMethod · 0.80

Tested by

no test coverage detected