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

SDKQE-3458: Add ability to deploy specific Columnar AMIs in Capella #71

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions deployment/clouddeploy/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,12 @@ func (p *Deployer) createNewCluster(ctx context.Context, def *clusterdef.Cluster
},
AvailabilityZone: "single",
}
if def.NodeGroups[0].Cloud.ServerImage != "" {
createReq.Override = capellacontrol.CreateOverrideRequest{
Image: def.NodeGroups[0].Cloud.ServerImage,
Token: p.overrideToken,
}
}
p.logger.Debug("creating columnar", zap.Any("req", createReq))

newCluster, err := p.client.CreateColumnar(ctx, p.tenantID, cloudProjectID, createReq)
Expand Down Expand Up @@ -931,8 +937,9 @@ func (p *Deployer) NewCluster(ctx context.Context, def *clusterdef.Cluster) (dep
}
}

// Deploy cluster based on presence of server image
if serverImage != "" {
// Deploy cluster based on presence of server image,
// specific Columnar images are deployed through the normal createCluster func
if serverImage != "" && !def.Columnar {
return p.deployNewCluster(ctx, def, clusterVersion, serverImage)
} else {
return p.createNewCluster(ctx, def, clusterVersion)
Expand Down
3 changes: 2 additions & 1 deletion utils/capellacontrol/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ type CreateServices struct {
type CreateOverrideRequest struct {
Image string `json:"image"`
Token string `json:"token"`
Server string `json:"server"`
Server string `json:"server,omitempty"`
}

func (o CreateOverrideRequest) IsEmpty() bool {
Expand Down Expand Up @@ -723,6 +723,7 @@ type CreateColumnarInstanceRequest struct {
Package Package `json:"package"`
InstanceTypes ColumnarInstanceTypes `json:"instanceTypes"`
AvailabilityZone string `json:"availabilityZone"`
Override CreateOverrideRequest `json:"overRide,omitempty"`
}

type UpdateColumnarInstanceRequest struct {
Expand Down
Loading