{"action":"opened","issue":{"url":"https://api.github.com/repos/jenkins-x/jx/issues/2055","repository_url":"https://api.github.com/repos/jenkins-x/jx","labels_url":"https://api.github.com/repos/jenkins-x/jx/issues/2055/labels{/name}","comments_url":"https://api.github.com/repos/jenkins-x/jx/issues/2055/comments","events_url":"https://api.github.com/repos/jenkins-x/jx/issues/2055/events","html_url":"https://github.com/jenkins-x/jx/issues/2055","id":372456002,"node_id":"MDU6SXNzdWUzNzI0NTYwMDI=","number":2055,"title":"jx uninstall tries to delete default namespace","user":{"login":"magnuhho","id":39699842,"node_id":"MDQ6VXNlcjM5Njk5ODQy","avatar_url":"https://avatars3.githubusercontent.com/u/39699842?v=4","gravatar_id":"","url":"https://api.github.com/users/magnuhho","html_url":"https://github.com/magnuhho","followers_url":"https://api.github.com/users/magnuhho/followers","following_url":"https://api.github.com/users/magnuhho/following{/other_user}","gists_url":"https://api.github.com/users/magnuhho/gists{/gist_id}","starred_url":"https://api.github.com/users/magnuhho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnuhho/subscriptions","organizations_url":"https://api.github.com/users/magnuhho/orgs","repos_url":"https://api.github.com/users/magnuhho/repos","events_url":"https://api.github.com/users/magnuhho/events{/privacy}","received_events_url":"https://api.github.com/users/magnuhho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-22T09:46:17Z","updated_at":"2018-10-22T09:46:17Z","closed_at":null,"author_association":"NONE","body":"### Summary \r\n\r\njx uninstall seems to assume the default that jx is installed in whatever namespace is active at the time of execution\r\n\r\nAs a result, if you change active namespace, jx uninstall gives \r\nerror: failed to delete team namespace namespace: failed to delete the namespace 'default': namespaces \"default\" is forbidden: this namespace may not be deleted\r\n\r\n\r\n### Steps to reproduce the behavior\r\n\r\nSetup k8s with Kubespray\r\nbin/jx install --provider=kubernetes --on-premise\r\n\r\nChange namespace for default context back to \"default\"\r\nkubectl config set-context default-system --cluster=default-cluster --user=default-admin --namespace=default\r\n\r\nUninstall jx\r\njx uninstall\r\n\r\n### Jx version\r\n\r\nThe output of `jx version` is:\r\n\r\n```\r\nUsing helmBinary helm with feature flag: none\r\nNAME               VERSION\r\njx                 1.3.461\r\nKubernetes cluster v1.10.2\r\nkubectl            v1.10.4\r\nhelm client        v2.9.1+g20adb27\r\nhelm server        v2.10.0+g9ad53aa\r\ngit                git version 1.8.3.1\r\n\r\n```\r\n\r\n### Kubernetes cluster\r\n\r\nClient Version: version.Info{Major:\"1\", Minor:\"10\", GitVersion:\"v1.10.4\", GitCommit:\"5ca598b4ba5abb89bb773071ce452e33fb66339d\", GitTreeState:\"clean\", BuildDate:\"2018-06-06T08:13:03Z\", GoVersion:\"go1.9.3\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"10\", GitVersion:\"v1.10.2\", GitCommit:\"81753b10df112992bf51bbc2c2f85208aad78335\", GitTreeState:\"clean\", BuildDate:\"2018-04-27T09:10:24Z\", GoVersion:\"go1.9.3\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n\r\nSetup with Kubespray\r\n\r\n### Operating system / Environment\r\nCoreOS\r\n\r\n### Expected behavior\r\nI would expect jx uninstall to lookup which name space jx is installed in and then try to delete that one instead of the namespace configured for the current kubectl context\r\n\r\n### Actual behavior\r\n"}}
{"actor":{"display_login":"magnuhho"}}