Skip to content

Conversation

@omri2001
Copy link
Contributor

No description provided.

@omri2001 omri2001 requested a review from GoshaDo January 25, 2025 19:28
@omri2001 omri2001 linked an issue Jan 25, 2025 that may be closed by this pull request
except FileNotFoundError:
raise RuntimeError("Namespace file not found. Are you running in a Kubernetes cluster?")
try:
contexts, active_context = cluster_config.list_kube_config_contexts()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think about loading from env var, with fall back to default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if im getting you right. that might cause problems, if a mistake was entered in the env var and is different then the "/var/run/secrets/kubernetes.io/serviceaccount/namespace". i think default should be the 'incluster' namespace file, then fallback to other methods

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using kubeconfig context namespace used only for development purposes..
if the pod in cluster, the namespace file will exists and all will be just fine.

the only reason to provide namespace will be for development reasons..
I would even delete the fallback to default, and will try to use env var, it not exists, exit the program..
using kubeconfig namespace just too implicit

except FileNotFoundError:
raise RuntimeError("Namespace file not found. Are you running in a Kubernetes cluster?")
try:
contexts, active_context = cluster_config.list_kube_config_contexts()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using kubeconfig context namespace used only for development purposes..
if the pod in cluster, the namespace file will exists and all will be just fine.

the only reason to provide namespace will be for development reasons..
I would even delete the fallback to default, and will try to use env var, it not exists, exit the program..
using kubeconfig namespace just too implicit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: add support for local development

3 participants