()
| 79 | } |
| 80 | |
| 81 | func (c KubernetesConnectionConfig) Validate() error { |
| 82 | if c.Host == "" { |
| 83 | return newError("host", "no host specified") |
| 84 | } |
| 85 | if c.APIPath == "" { |
| 86 | return newError("path", "no API path specified") |
| 87 | } |
| 88 | if c.BearerTokenFile != "" { |
| 89 | if _, err := os.Stat(c.BearerTokenFile); err != nil { |
| 90 | return wrapWithMessage(err, "bearerTokenFile", "bearer token file %s not found", c.BearerTokenFile) |
| 91 | } |
| 92 | } |
| 93 | return nil |
| 94 | } |
| 95 | |
| 96 | // KubernetesPodConfig describes the pod to launch. |
| 97 | // |
nothing calls this directly
no test coverage detected