()
| 10 | ) |
| 11 | |
| 12 | func (e *KubePiServer) startTty() { |
| 13 | cmd := "gotty" |
| 14 | params := []string{"--permit-write", "unshare", "--fork", "--pid", "--mount-proc", "--mount", "bash", "init-kube.sh"} |
| 15 | go func() { |
| 16 | c := exec.Command(cmd, params...) |
| 17 | c.Env = append(os.Environ(), "KUBEPI_WEBKUBECTL_SESSION_URL="+e.localWebkubectlSessionURL()) |
| 18 | c.Stdout = io.Discard |
| 19 | c.Stderr = io.Discard |
| 20 | if err := c.Run(); err != nil { |
| 21 | e.logger.Error(err) |
| 22 | } |
| 23 | }() |
| 24 | } |
no test coverage detected