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

fix: pass interface rather than string values to helm #93

Merged
merged 1 commit into from
Oct 17, 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
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
Loading