From 803e93f72c3933e0998368c75c188f2503a507c6 Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Mon, 31 Jan 2022 22:04:03 +0000 Subject: [PATCH] [installer]: add the Installer config to a configmap for debugging --- installer/pkg/components/gitpod/configmap.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/installer/pkg/components/gitpod/configmap.go b/installer/pkg/components/gitpod/configmap.go index 157bc3e79b8bfb..a6ad388875b8d7 100644 --- a/installer/pkg/components/gitpod/configmap.go +++ b/installer/pkg/components/gitpod/configmap.go @@ -20,15 +20,20 @@ type Gitpod struct { } func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { - gpcfg := Gitpod{ + gpversions := Gitpod{ VersionManifest: ctx.VersionManifest, } - fc, err := common.ToJSONString(gpcfg) + config, err := common.ToJSONString(ctx.Config) if err != nil { return nil, fmt.Errorf("failed to marshal Gitpod config: %w", err) } + versions, err := common.ToJSONString(gpversions) + if err != nil { + return nil, fmt.Errorf("failed to marshal Gitpod versions: %w", err) + } + return []runtime.Object{ &corev1.ConfigMap{ TypeMeta: common.TypeMetaConfigmap, @@ -38,7 +43,8 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { Labels: common.DefaultLabels(Component), }, Data: map[string]string{ - "config.json": string(fc), + "config.json": string(config), + "versions.json": string(versions), }, }, }, nil