From 2e0fbfd7688157508601e1058151e8a9814617a2 Mon Sep 17 00:00:00 2001 From: Micaiah Martin Date: Fri, 21 Jun 2024 11:32:43 -0600 Subject: [PATCH] Fix issue with only a single feature flag defined. - Ensure that the last item doesn't have a trailing comma. - Update .gitignore to ignore test values for now --- .gitignore | 1 + .../self-host/templates/pre-install-hook-feature-flags.yaml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a33dfd3a..0dff84a2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .cr-index # Create a folder for placing user test files (Useful for the Dev Container) values/* +test_values.yaml diff --git a/charts/self-host/templates/pre-install-hook-feature-flags.yaml b/charts/self-host/templates/pre-install-hook-feature-flags.yaml index 420fa05b..ce80c864 100644 --- a/charts/self-host/templates/pre-install-hook-feature-flags.yaml +++ b/charts/self-host/templates/pre-install-hook-feature-flags.yaml @@ -7,8 +7,11 @@ data: flags.json: | { "flagValues": { + {{- $first := true }} {{- range $key, $value := .Values.featureFlags }} - "{{ $key }}": {{ $value | quote }}, + {{- if not $first }},{{ end }} + "{{ $key }}": {{ $value | quote }} + {{- $first = false }} {{- end }} } }