Skip to content

Commit

Permalink
fix: pass interface rather than string values to helm (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkeven authored Oct 17, 2024
1 parent 4e23ba5 commit 45ae2c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions pkg/apiserver/handler_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ func (h *Handler) enableServiceSync(req *restful.Request, resp *restful.Response
}

vals := make(map[string]interface{})
vals["bfl"] = map[string]string{
vals["bfl"] = map[string]interface{}{
"username": owner,
"nodeName": bfl.Spec.NodeName,
}

// appCache hostpath to mount with apps
vals["userspace"] = map[string]string{
vals["userspace"] = map[string]interface{}{
"appCache": fmt.Sprintf("%s/Cache", pvPath),
"userData": fmt.Sprintf("%s/Home", pvPath),
}
Expand Down Expand Up @@ -105,12 +105,12 @@ func (h *Handler) enableServiceBackup(req *restful.Request, resp *restful.Respon
}

vals := make(map[string]interface{})
vals["bfl"] = map[string]string{
vals["bfl"] = map[string]interface{}{
"username": owner,
"nodeName": bfl.Spec.NodeName,
}

vals["userspace"] = map[string]string{
vals["userspace"] = map[string]interface{}{
"appCache": fmt.Sprintf("%s/Cache", pvPath),
"userData": fmt.Sprintf("%s/Home", pvPath),
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/users/userspace/v1/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (c *Creator) installSysApps(ctx context.Context, bflPod *corev1.Pod) error

bflDocURL := fmt.Sprintf("//%s:%d/bfl/apidocs.json", ip, port)

vals["bfl"] = map[string]string{
vals["bfl"] = map[string]interface{}{
"username": c.user,
"nodeName": bflPod.Spec.NodeName,
"url": bflDocURL,
Expand All @@ -210,11 +210,11 @@ func (c *Creator) installSysApps(ctx context.Context, bflPod *corev1.Pod) error

// pvc to mount with filebrowser
pvPath := pv.Spec.HostPath.Path
vals["pvc"] = map[string]string{
vals["pvc"] = map[string]interface{}{
"userspace": pvcData.userspacePvc,
}

vals["userspace"] = map[string]string{
vals["userspace"] = map[string]interface{}{
"appCache": pvcData.appCacheHostPath,
"userData": fmt.Sprintf("%s/Home", pvPath),
"appData": fmt.Sprintf("%s/Data", pvPath),
Expand Down Expand Up @@ -253,7 +253,7 @@ func (c *Creator) installSysApps(ctx context.Context, bflPod *corev1.Pod) error
if err != nil {
return err
}
vals["kubesphere"] = map[string]string{
vals["kubesphere"] = map[string]interface{}{
"redis_password": string(redisSecret.Data["auth"]),
}

Expand Down Expand Up @@ -282,7 +282,7 @@ func (c *Creator) installLauncher(ctx context.Context, userspace string) (string
vals := make(map[string]interface{})

k, s := c.genAppkeyAndSecret("bfl")
vals["bfl"] = map[string]string{
vals["bfl"] = map[string]interface{}{
"username": c.user,
"appKey": k,
"appSecret": s,
Expand Down

0 comments on commit 45ae2c2

Please sign in to comment.