kne icon indicating copy to clipboard operation
kne copied to clipboard

allow omitting cluster spec from the deployment yaml

Open hellt opened this issue 2 years ago • 3 comments

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

hellt avatar Sep 29 '22 08:09 hellt

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?

alexmasi avatar Sep 29 '22 17:09 alexmasi

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.

hellt avatar Sep 29 '22 17:09 hellt

I will pick this up next sprint

alexmasi avatar Oct 08 '22 00:10 alexmasi

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

alexmasi avatar Oct 21 '22 21:10 alexmasi