Skip to content

Commit

Permalink
feat: add storage class name to helmargs
Browse files Browse the repository at this point in the history
- Add `scName` variable to store the name of the default storage class
- Update `helmargs` to include `global.storageClass` if `scName` is not empty

Signed-off-by: ysicing <[email protected]>
  • Loading branch information
ysicing committed Jun 6, 2024
1 parent 8b6274c commit 50fabbf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/quickon/quickon.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,12 @@ func (m *Meta) Init() error {
m.Log.Debug("waiting for storage to be ready...")
waitsc := time.Now()
// wait.BackoffUntil TODO
scName := ""
for {
sc, _ := m.kubeClient.GetDefaultSC(ctx)
if sc != nil {
m.Log.Donef("default storage %s is ready", sc.Name)
scName = sc.Name
break
}
time.Sleep(time.Second * 5)
Expand Down Expand Up @@ -336,6 +338,9 @@ func (m *Meta) Init() error {
hostdomain = fmt.Sprintf("console.%s", hostdomain)
}
}
if len(scName) > 0 {
helmargs = append(helmargs, "--set", fmt.Sprintf("global.storageClass=%s", scName))
}

if m.OffLine {
helmargs = append(helmargs, "--set", "cloud.host=http://market-cne-market-api.quickon-system.svc:8088")
Expand Down

0 comments on commit 50fabbf

Please sign in to comment.