Skip to content

Commit

Permalink
Provide location and enhance get spec for k8s cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
seokho-son committed Oct 24, 2024
1 parent c80f484 commit 74c55fb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/core/resource/k8scluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,15 @@ func CreateK8sCluster(nsId string, req *model.TbK8sClusterReq, option string) (m
}
}

spSpecName, err := GetCspResourceName(nsId, model.StrSpec, v.SpecId)
spSpecName := ""
spSpecName, err = GetCspResourceName(nsId, model.StrSpec, v.SpecId)
if err != nil {
log.Err(err).Msg("Failed to Create a K8sCluster")
return emptyObj, err
log.Info().Err(err)
spSpecName, err = GetCspResourceName(model.SystemCommonNs, model.StrSpec, v.SpecId)
if err != nil {
log.Err(err).Msg("Failed to Create a K8sCluster")
return emptyObj, err
}
}

spKpName, err := GetCspResourceName(nsId, model.StrSSHKey, v.SshKeyId)
Expand Down Expand Up @@ -876,6 +881,7 @@ func GetK8sCluster(nsId string, k8sClusterId string) (model.TbK8sClusterInfo, er
CspResourceId: storedTbK8sCInfo.CspResourceId,
Name: storedTbK8sCInfo.Name,
ConnectionName: storedTbK8sCInfo.ConnectionName,
ConnectionConfig: storedTbK8sCInfo.ConnectionConfig,
Description: storedTbK8sCInfo.Description,
CspViewK8sClusterDetail: spClusterRes.SpiderClusterInfo,
}
Expand Down

0 comments on commit 74c55fb

Please sign in to comment.