-
Notifications
You must be signed in to change notification settings - Fork 41
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
feat: Create an autoscaled default machine pool #1147
feat: Create an autoscaled default machine pool #1147
Conversation
a2ee665
to
cf37feb
Compare
cf37feb
to
80eaa81
Compare
Codecov Report
@@ Coverage Diff @@
## main #1147 +/- ##
=======================================
Coverage 80.11% 80.11%
=======================================
Files 129 129
Lines 10946 10946
=======================================
Hits 8769 8769
Misses 1816 1816
Partials 361 361
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
lgtm
Thanks
@@ -75,7 +75,7 @@ func (r clusterBuilder) NewOCMClusterFromCluster(clusterRequest *types.ClusterRe | |||
clusterBuilder.AWS(awsBuilder) | |||
|
|||
// Set compute node size | |||
clusterBuilder.Nodes(clustersmgmtv1.NewClusterNodes().ComputeMachineType(clustersmgmtv1.NewMachineType().ID(r.dataplaneClusterConfig.ComputeMachineType))) | |||
clusterBuilder.Nodes(clustersmgmtv1.NewClusterNodes().AutoscaleCompute(clustersmgmtv1.NewMachinePoolAutoscaling().MinReplicas(6).MaxReplicas(18).ID(r.dataplaneClusterConfig.ComputeMachineType))) |
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.
This has been updated in #1153
It should have been to take into account the correct id of the machine type. Otherwise the default one was used which might not always be what we want
clusterBuilder.Nodes(clustersmgmtv1.NewClusterNodes().ComputeMachineType(clustersmgmtv1.NewMachineType().ID(r.dataplaneClusterConfig.ComputeMachineType)).AutoscaleCompute(clustersmgmtv1.NewMachinePoolAutoscaling().MinReplicas(6).MaxReplicas(18)))
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 see, thanks for the correction @machi1990 :)
Description
Auto-scaled default machine pool created
MGDSTRM-8917
Verification Steps
1) Run the service:
make db/teardown
make sso/teardown
make db/setup
make ocm/setup OCM_OFFLINE_TOKEN=token OCM_ENV=development
make sso/setup
make sso/config
make keycloak/setup MAS_SSO_CLIENT_ID=kas-fleet-manager MAS_SSO_CLIENT_SECRET=kas-fleet-manager OSD_IDP_MAS_SSO_CLIENT_ID=kas-fleet-manager OSD_IDP_MAS_SSO_CLIENT_SECRET=kas-fleet-manager
make run
2) Get Cluster ID:
make db/login
SELECT cluster_id from clusters;
3) Get cluster info:
ocm get /api/clusters_mgmt/v1/clusters/<ClusterID>/
4) Under Nodes, you should have these configurations:
Checklist (Definition of Done)