Closed bfitzpat closed 2 days ago
looking at https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ it seems we can get the namespace: kubectl get namespace
And we can set it permanently for all subsequent kubectl calls.
kubectl config set-context --current --namespace=<insert-namespace-name-here>
# Validate it
kubectl config view --minify | grep namespace:
Is that what you're after @apupier ?
On long term, I would like that we use the same logic than what VS Code Kubernetes is doing. I know they can also specify custom kubeconfig in preferences.
this issue was only for the tooltip so that we know the namespace from which the VS Code Camel K view is doing the calls and retrieving the "integrations".
What is used to retrieve the integrations? kubectl? kamel? if kamel, needs to follow this issue as it is not in phase with what kubectl is doing for now: https://github.com/apache/camel-k/issues/1048 so it can create a desynrrhonization if namespace and integrations are retrieved using a different method.
We are using the kubernetes API (k8s.extension.kubectl.v1) to retrieve the list of integrations (see https://github.com/camel-tooling/vscode-camelk/blob/136b26a89ff88cb9b3ed22e8e240a5d759a997e7/src/kubectlutils.ts#L121)
From Aurelien on https://github.com/camel-tooling/vscode-camelk/pull/186
Right now we only show the namespace if it's set in the user's settings, but it would be nice to get the system default from kubernetes or Camel K and display that as well.