openconfig / kne

Apache License 2.0
216 stars 65 forks source link

allow omitting cluster spec from the deployment yaml #225

Closed hellt closed 2 years ago

hellt commented 2 years ago

Hi @alexmasi @marcushines

To allow automated KNE cluster installation on the standalone k8s cluster (non-kind), it is required for KNE deployment routine to allow users use the deployment yaml that contains just ingress/cni/controllers spec.

Currently, when users remove cluster object from a deployment yaml the deploy command fails

[reth@mvsrlstbsim01 kne]$ kne deploy kb1.yml
INFO[0000] Reading deployment config: "/home/reth/kne/deploy/kne/kb1.yml"
Error: cluster type not supported:

By allowing removing the cluster (or specyfing cluster type as external) we will enable KNE users to deploy KNE prerequisites automatically, while using their own k8s cluster

/cc @bpandipp

alexmasi commented 2 years ago

Yes we plan on supporting other cluster types in kne deploy, however currently we just have kind. The cluster/ingress/cni specifications are required. I'm curious if an external cluster spec that had no-op methods for deploy, etc. would work out of the box. Or does simply not returning an error for no cluster specified work for your use case?

hellt commented 2 years ago

I'm curious if an external cluster spec that had no-op methods for deploy, etc. would work out of the box.

@alexmasi I think this is indeed what would suffice for my use case. The k8s cluster is deployed and KNE shouldn't normally touch it, since the cluster might be a managed service offered by a PaaS. So exactly as you say, if KNE would do nothing for a cluster of type external it would solve my use case of onboarding KNE to an existing cluster.

alexmasi commented 2 years ago

I will pick this up next sprint

alexmasi commented 2 years ago

This is now closed from the linked PR, please re-open if the implementation does not work for you