Skip to content

Commit

Permalink
[installer]: correct the stored config to include apiVersion
Browse files Browse the repository at this point in the history
This also changes the format from JSON to YAML
  • Loading branch information
Simon Emms committed Mar 2, 2022
1 parent 05217c7 commit 7731d8b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions install/installer/pkg/components/gitpod/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"

"github.com/gitpod-io/gitpod/installer/pkg/common"
"github.com/gitpod-io/gitpod/installer/pkg/config"
"github.com/gitpod-io/gitpod/installer/pkg/config/versions"

corev1 "k8s.io/api/core/v1"
Expand All @@ -24,7 +25,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
VersionManifest: ctx.VersionManifest,
}

config, err := common.ToJSONString(ctx.Config)
cfg, err := config.Marshal(config.CurrentVersion, ctx.Config)
if err != nil {
return nil, fmt.Errorf("failed to marshal Gitpod config: %w", err)
}
Expand All @@ -43,7 +44,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
Labels: common.DefaultLabels(Component),
},
Data: map[string]string{
"config.json": string(config),
"config.yaml": string(cfg),
"versions.json": string(versions),
},
},
Expand Down

0 comments on commit 7731d8b

Please sign in to comment.