Closed omus closed 3 years ago
This isn't a K8sClusterManagers.jl
error, it's from Kubernetes:
{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"driver-2021-03-19--17-58-47-kpqnt\"
is forbidden: User \"system:serviceaccount:project-ondawerks:ondawerks-service-account\" cannot get resource \"pods\"
in API group \"\" in the namespace \"ondawerks\"","reason":"Forbidden","details":
{"name":"driver-2021-03-19--17-58-47-kpqnt","kind":"pods"},"code":403}
Though I suppose K8sClusterManagers.jl
could go out of its way to check that the namespace actually exists, if some interested party wanted to add such a check :)
Edit: Sorry, I'm so used to visually drilling into stack traces that I forget :sweat_smile: I suppose what you're probably suggesting is to merely handle the exception by surfacing the error from k8s itself, which would probably be a lot easier for users to digest indeed.
There are a couple of things that can be done here to improve the situation:
UndefVarError: readPod not defined
. This error makes it appear that there is an internal failure happeningMaybe (probably not) we could have K8sClusterManagers.jl
catch the exception and reformat the exception as a proper Julia exception but that seems overkill at this point.
Issue has been resolved. There were several parts to this:
readPod
error message was from Kuber.jl which was dropped in #34Additionally, we now use kubectl_jll for interacting with Kubernetes and with our internal wrappers we get fairly nice to read KubeError
s. Finally, specifying the namespace is no longer required as the current namespace is determined automatically (#22)
When specifying an incorrect namespace you get the following error:
Setting the namespace to "project-ondawerks" works properly