Skip to content
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

Merged

Conversation

VanillaSpoon
Copy link
Contributor

@VanillaSpoon VanillaSpoon commented Jun 29, 2022

Description

Auto-scaled default machine pool created

  • Min Replicas: 6
  • Max Replicas: 18

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:

.....
.....
"nodes": {
  "master": 3,
  "infra": 3,
  "autoscale_compute": {
    "min_replicas": 6,
    "max_replicas": 18
  },
  .....
  .....
},
.....
.....

Checklist (Definition of Done)

  • All acceptance criteria specified in JIRA have been completed
  • Unit and integration tests added that prove the fix is effective or the feature works (tested against emulated and non-emulated OCM environment)
  • Documentation added for the feature
  • CI and all relevant tests are passing
  • Code Review completed
  • Verified independently by reviewer
  • All PR comments are resolved either by addressing them or creating follow up tasks
  • Required metrics/dashboards/alerts have been added (or PR created).
  • Required Standard Operating Procedure (SOP) is added.
  • JIRA has been created for changes required on the client side

@codecov
Copy link

codecov bot commented Jun 29, 2022

Codecov Report

Merging #1147 (80eaa81) into main (febdf7b) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1147   +/-   ##
=======================================
  Coverage   80.11%   80.11%           
=======================================
  Files         129      129           
  Lines       10946    10946           
=======================================
  Hits         8769     8769           
  Misses       1816     1816           
  Partials      361      361           
Flag Coverage Δ
unittests 80.11% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...nternal/kafka/internal/clusters/cluster_builder.go 100.00% <100.00%> (ø)

Copy link
Contributor

@machi1990 machi1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Thanks

@machi1990 machi1990 merged commit 99814c9 into bf2fc6cc711aee1a0c2a:main Jun 29, 2022
@@ -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)))
Copy link
Contributor

@machi1990 machi1990 Jun 30, 2022

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)))

Copy link
Contributor Author

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants