public-cloud-roadmap icon indicating copy to clipboard operation
public-cloud-roadmap copied to clipboard

MKS nodepool spec 'desiredNodes' should be optional

Open matmicro opened this issue 1 year ago • 7 comments

As a MKS user, i would like nodepool spec 'desiredNodes' to be optional.

Because in case of AutoScaling nodepool, each time i am doing a deployment, i need to specify a 'desiredNodes' values. So by default my value is 1 (or the same as minNodes). But in case of peak of activity on my cluster, nodepool desiredNodes could be high, i do not want to reset it to its default value when performing kubectl apply -f nodepool.yml.

So this parameter should be optional. In case the value is missing on creation of the nodepool, the value should be set to the same as 'minNodes' value. In case the nodepool is already created, the current value should not be changed.

matmicro avatar Jul 08 '22 14:07 matmicro

@mhurtrel do you think this could be easily and quickly delivered ?

matmicro avatar Jul 11 '22 19:07 matmicro

Hi @matmicro I agree with your point and discussed with the team. We will amend this, but I can't give you and ETA yet.

mhurtrel avatar Jul 12 '22 13:07 mhurtrel

We implemented a behavior like this:

If desired_nodes parameter is empty AND a desired_nodes value already exists --> we use the existing value If desired_nodes parameter is empty AND a there is no existing value --> we use min_nodes value If min_nodes parameter is specified AND desired_nodes parameter is empty AND actual desired_nodes is lower than min_nodes parameter --> desired_nodes is set with the new min_nodes value If max_nodes parameter is specified AND desired_nodes parameter is empty AND actual desired_nodes is upper than max_nodes parameter --> desired_nodes is set with the new max_nodes value If desired_nodes parameter is specified AND not between min_nodes and max_nodes --> forbidden

jMonsinjon avatar Aug 04 '22 13:08 jMonsinjon

@jMonsinjon Great, that's perfect ! Thanks for such quickfix !

Could you please let me know once this will be live on GRA5 ? and others regions ? I am currently facing error : ValidationError(NodePool.spec): missing required field "desiredNodes" in com.ovh.cloud.kube.v1alpha1.NodePool.spec

matmicro avatar Aug 04 '22 15:08 matmicro

OK sorry @matmicro I reopened it. The Kubernetes custom resource definition is not yet up to date.

I will close this issue as soon as it has been done. It's our next priority ;-)

jMonsinjon avatar Aug 04 '22 15:08 jMonsinjon

Can you share an ETA ? Thx

matmicro avatar Aug 04 '22 17:08 matmicro

@matmicro We are currently working on it and we will deploy it as soon as possible. ETA: end of this week

jMonsinjon avatar Aug 11 '22 13:08 jMonsinjon

The feature has been released and we upgraded all nodepools controllers. You can now use the OVHcloud API or your nodepool's custom resource.

jMonsinjon avatar Aug 17 '22 09:08 jMonsinjon

It was working fine with Kubernetes 1.23 on GRA5.

But today it is not working with Kubernetes 1.24 on SBG5 : error: error validating "k8s/nodepool_dev.yml": error validating data: ValidationError(NodePool.spec): missing required field "desiredNodes" in com.ovh.cloud.kube.v1alpha1.NodePool.spec;

Is it related to SBG or to Kubernetes version 1.24 ?

Could you fix this asap ?

matmicro avatar Aug 18 '22 19:08 matmicro

Hello @matmicro Checking right now....

jMonsinjon avatar Aug 19 '22 07:08 jMonsinjon

Hello @matmicro,

The issue is link to nodepool CRD deployment for kubernetes 1.24 which does not contain yet the change.

best,

matprig avatar Aug 19 '22 08:08 matprig

Ok. Can you provide an ETA when this will be availabled with 1.24 ? Thanks

matmicro avatar Aug 19 '22 08:08 matmicro

This is for ASAP, we have the fix, we have to run all test before release it

best,

matprig avatar Aug 19 '22 11:08 matprig

hello @matmicro

we have just release the fix, you have to create a new cluster in 1.24 and it shall be ok

best,

matprig avatar Aug 19 '22 14:08 matprig

Hi, I can't create a new cluster, i need to use a current one. I cannot plan to reset it on PROD, but i can for DEV/TEST purpose.

  • What about reset the current cluster to 1.24 ? Fix will works ?
  • And does it will work also when patching a cluster 1.23 to upgrade to 1.24 ?

matmicro avatar Aug 19 '22 15:08 matmicro

Hi,

I can force a redeploy without loosing data for you, can you give me your cluster id ?

  • yes reset a cluster will work but you will loose all your data
  • yes upgrading from 1.23 to 1.24 will work

matprig avatar Aug 19 '22 15:08 matprig

hi,

Redeploy was done in fact for you and the others, you can test now it shall work.

best

matprig avatar Aug 19 '22 16:08 matprig

That's OK i could do it by myself with reset & upgrade. All is fine now, thanks

matmicro avatar Aug 19 '22 16:08 matmicro