-
-
Notifications
You must be signed in to change notification settings - Fork 15
feat: automatic cluster detection #1068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -651,7 +657,25 @@ pub async fn initialize_operator( | |||
.context(InferKubeConfigSnafu)?; | |||
let default_namespace = kubeconfig.default_namespace.clone(); | |||
let client = kube::Client::try_from(kubeconfig).context(CreateKubeClientSnafu)?; | |||
let cluster_info = KubernetesClusterInfo::new(cluster_info_opts); | |||
|
|||
let local_cluster_info_opts = match cluster_info_opts.kubernetes_cluster_domain { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to not further enlarge this already gigantic file.
Please have a look at KubernetesClusterInfo::new
, I'd say there is the correct place to add this, even with a todo marker :)
You need to make KubernetesClusterInfo::new
fallible for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[snafu(display("failed to deserialize kubelet config JSON"))] | ||
KubeletConfigJson { source: serde_json::Error }, | ||
|
||
#[snafu(display("empty Kubernetes nodes list"))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please explain the user why we need at least one node to avoid user frustration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a quick implementation, didn't expect that! :) |
Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de>
Description
Fixes stackabletech/issues#662
Definition of Done Checklist
Author
Reviewer
Acceptance