turbonomic / kubeturbo

140 stars 75 forks source link

TRB-43347 Disable scaling for eks spot and windows instance #922

Closed alvinc78 closed 1 year ago

alvinc78 commented 1 year ago

Intent

Disable scaling for eks spot instance Disable scaling for windows instance

Background

We don't support these instances to be suspended or provisioned but the UI shows the actions, we want to disable that for the nodes.

Testing

Checklist

These are the items that must be done by the developer and by reviewers before the change is ready to merge. Please strikeout any items that are not applicable, but don't delete them

Audience

tian-ma commented 1 year ago

Are you going to add a unit test here https://github.com/turbonomic/kubeturbo/blob/92f550541093aeb3d13f2de2609055668c3efb81/pkg/discovery/dtofactory/node_entity_dto_builder_test.go#L208

seeing how complex this is, it maybe simpler to separate the extra logic into its own function and make a unit test for the small function.

alvinc78 commented 1 year ago

Are you going to add a unit test here

https://github.com/turbonomic/kubeturbo/blob/92f550541093aeb3d13f2de2609055668c3efb81/pkg/discovery/dtofactory/node_entity_dto_builder_test.go#L208

seeing how complex this is, it maybe simpler to separate the extra logic into its own function and make a unit test for the small function.

I have moved this to a function itself

alvinc78 commented 1 year ago

Are you going to add a unit test here

https://github.com/turbonomic/kubeturbo/blob/92f550541093aeb3d13f2de2609055668c3efb81/pkg/discovery/dtofactory/node_entity_dto_builder_test.go#L208

seeing how complex this is, it maybe simpler to separate the extra logic into its own function and make a unit test for the small function.

added unit test