Skip to content

Commit

Permalink
Merge pull request #162 from openinfradev/byoh_minor_fix
Browse files Browse the repository at this point in the history
trivial. change byoh agent command
  • Loading branch information
ktkfree authored Oct 20, 2023
2 parents b97f3b1 + ca4eeab commit e34183e
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions internal/usecase/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,16 @@ func (u *ClusterUsecase) Delete(ctx context.Context, clusterId domain.ClusterId)

// FOR TEST. ADD MAGIC KEYWORD
// check cloudAccount
cloudAccount, err := u.cloudAccountRepo.Get(cluster.CloudAccountId)
if err != nil {
return httpErrors.NewInternalServerError(fmt.Errorf("Failed to get cloudAccount"), "", "")
}
tksCloudAccountId := cluster.CloudAccountId.String()
if strings.Contains(cloudAccount.Name, domain.CLOUD_ACCOUNT_INCLUSTER) {
tksCloudAccountId = "NULL"
tksCloudAccountId := "NULL"
if cluster.CloudService != domain.CloudService_BYOH {
cloudAccount, err := u.cloudAccountRepo.Get(cluster.CloudAccountId)
if err != nil {
return httpErrors.NewInternalServerError(fmt.Errorf("Failed to get cloudAccount"), "", "")
}
tksCloudAccountId = cluster.CloudAccountId.String()
if strings.Contains(cloudAccount.Name, domain.CLOUD_ACCOUNT_INCLUSTER) {
tksCloudAccountId = "NULL"
}
}

workflowId, err := u.argo.SumbitWorkflowFromWftpl(
Expand Down Expand Up @@ -626,7 +629,7 @@ func (u *ClusterUsecase) GetNodes(ctx context.Context, clusterId domain.ClusterI
return out, err
}

command := fmt.Sprintf("curl -fL %s/api/packages/%s/generic/byoh_hostagent_install/%s/byoh_hostagent-install-%s.sh | sh -s %s-",
command := fmt.Sprintf("curl -fL %s/api/packages/%s/generic/byoh_hostagent_install/%s/byoh_hostagent-install-%s.sh | sh -s -- --role %s-",
viper.GetString("external-gitea-url"),
viper.GetString("git-account"),
string(cluster.ID),
Expand Down

0 comments on commit e34183e

Please sign in to comment.