mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add default value to validationOpts param
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
a88acc13c0
commit
c4d029baa1
@ -160,11 +160,11 @@ export function getNodeWarningConditions(node: V1Node) {
|
||||
* Validates Context, User and Cluster sructs in given kubeconfig. Additionally this will validate
|
||||
* the command passed to the exec substructure.
|
||||
*/
|
||||
export function validateKubeConfig (config: KubeConfig, contextName: string, validationOpts?: KubeConfigValidationOpts) {
|
||||
export function validateKubeConfig (config: KubeConfig, contextName: string, validationOpts: KubeConfigValidationOpts = {}) {
|
||||
// we only receive a single context, cluster & user object here so lets validate them as this
|
||||
// will be called when we add a new cluster to Lens
|
||||
|
||||
const { validateUser = true, validateCluster = true, validateExec = true } = validationOpts || {};
|
||||
const { validateUser = true, validateCluster = true, validateExec = true } = validationOpts;
|
||||
|
||||
const contextObject = config.getContextObject(contextName);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user