intellij-kubernetes icon indicating copy to clipboard operation
intellij-kubernetes copied to clipboard

Notify user if plugin doesn't find a valid config

Open lstocchi opened this issue 4 years ago • 2 comments

The k8s plugin assumes that the kube config can be found in the default path ~/.kube/config which is fine but we need to notify the user if that is not true. Otherwise they can be lost. No message, no notification and they don't know which is the problem. image

The issue is that we take the path but we do not check if it really exists https://github.com/redhat-developer/intellij-kubernetes/blob/30c3c61276551870d9e86d1ab288e7717c69d898/src/main/kotlin/com/redhat/devtools/intellij/kubernetes/model/ClientConfig.kt#L108-L109

and the getKubeConfigPath() does

public static String getKubeConfigPath() {
      return System.getProperty("user.home") + "/.kube/config";
}

Now the problem can be of two types. The user used to start IJ. E.g. In my case i have the config inside home/luca/.kube/config but if i start IJ as root then the path where the plugin will look at is root/.kube/config. Or if the config has been moved to another path.

We should tell the user why the plugin window is empty.

lstocchi avatar Oct 13 '21 16:10 lstocchi

@lstocchi thx for reporting! this is related or even duplicate to #209. Keeping this issue because of all the details that it contains.

adietish avatar Oct 19 '21 17:10 adietish

this is part of the epic #208

adietish avatar Oct 19 '21 17:10 adietish

This is duplicate to #817.

Closing as DUPLICATE.

adietish avatar Feb 07 '25 19:02 adietish