From 98772be737bb1c914f34c1339ad7718b2a4cbb9b Mon Sep 17 00:00:00 2001 From: Roman Hros Date: Thu, 30 May 2024 10:48:55 +0200 Subject: [PATCH] :bug: Fix templating of cluster-addon-values.yaml (#130) * Fix templating of cluster-addon-values.yaml Fixes #116 Signed-off-by: Roman Hros --------- Signed-off-by: Roman Hros --- pkg/cmd/create.go | 2 +- tests/cluster-stacks/docker/ferrol/cluster-addon-values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/create.go b/pkg/cmd/create.go index ea02dd12..64164e6d 100644 --- a/pkg/cmd/create.go +++ b/pkg/cmd/create.go @@ -284,7 +284,7 @@ func (c *CreateOptions) generateRelease() error { } } else { // Copy the cluster-addon-values.yaml config to release if old way - clusterAddonData, err := os.ReadFile(filepath.Join(c.ClusterStackPath, "cluster-addon-values.yaml")) + clusterAddonData, err := os.ReadFile(filepath.Join(".tmp", "cluster-addon-values.yaml")) if err != nil { return fmt.Errorf("failed to read cluster-addon-values.yaml: %w", err) } diff --git a/tests/cluster-stacks/docker/ferrol/cluster-addon-values.yaml b/tests/cluster-stacks/docker/ferrol/cluster-addon-values.yaml index e0033983..57227523 100644 --- a/tests/cluster-stacks/docker/ferrol/cluster-addon-values.yaml +++ b/tests/cluster-stacks/docker/ferrol/cluster-addon-values.yaml @@ -2,4 +2,4 @@ values: | metrics-server: commonLabels: domain: "{{ .Cluster.spec.controlPlaneEndpoint.host }}" - clusterAddonVersion: "v2" + clusterAddonVersion: "<< .ClusterAddonVersion >>"