(kubeContext, namespace string)
| 63 | var kubeContextOnce sync.Once |
| 64 | |
| 65 | func SetPluginKubeContext(kubeContext, namespace string) { |
| 66 | kubeContextOnce.Do(func() { |
| 67 | pluginContextLock.Lock() |
| 68 | defer pluginContextLock.Unlock() |
| 69 | |
| 70 | if kubeContext != "" { |
| 71 | pluginContext[KubeContextFlagEnv] = kubeContext |
| 72 | } |
| 73 | if namespace != "" { |
| 74 | pluginContext[KubeNamespaceFlagEnv] = namespace |
| 75 | } |
| 76 | }) |
| 77 | } |
| 78 | |
| 79 | var commandOnce sync.Once |
| 80 |
no test coverage detected