From 2c47724fb143992b22d2782a88518f2a5a7c2798 Mon Sep 17 00:00:00 2001 From: Martin Rowe Date: Fri, 25 Oct 2024 06:55:06 +1000 Subject: [PATCH] [backport 1.x] fix: resolve `helm lint` errors with `extraObjects` (#608) * Resolve `helm lint` invalid Yaml error If using `extraObjects`, the generated manifest fails `helm lint` with: ```shell [ERROR] templates/extraManifests.yaml: unable to parse YAML: invalid Yaml document separator: apiVersion: apps/v1 ``` This is a known issue [1] just with the go templates used for helm lint and doesn't apply to the actual template that is applied. The fix [2] is to make the whitespace work for both commands. [1] https://github.com/helm/helm/issues/10149 [2] https://github.com/helm/helm/issues/10149#issuecomment-929205040 Signed-off-by: Martin Rowe * Bump version to 1.31.1 and 1.24.1 Signed-off-by: Martin Rowe --------- Signed-off-by: Martin Rowe --- charts/opensearch-dashboards/CHANGELOG.md | 12 +++++++++++- charts/opensearch-dashboards/Chart.yaml | 2 +- .../templates/extraManifests.yaml | 4 ++-- charts/opensearch/CHANGELOG.md | 12 +++++++++++- charts/opensearch/Chart.yaml | 2 +- charts/opensearch/templates/extraManifests.yaml | 4 ++-- 6 files changed, 28 insertions(+), 8 deletions(-) diff --git a/charts/opensearch-dashboards/CHANGELOG.md b/charts/opensearch-dashboards/CHANGELOG.md index 48bc1847..019d3a86 100644 --- a/charts/opensearch-dashboards/CHANGELOG.md +++ b/charts/opensearch-dashboards/CHANGELOG.md @@ -14,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Security --- +## [1.24.1] +### Added +### Changed +### Deprecated +### Removed +### Fixed +- Resolved `helm lint` errors with extraObjects +### Security +--- ## [1.24.0] ### Added - Ability to add additional `labels` to `serviceMonitor` @@ -480,7 +489,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Security -[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-1.24.0...HEAD +[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-1.24.1...HEAD +[1.24.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.24.0...opensearch-1.24.1 [1.24.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.23.0...opensearch-1.24.0 [1.23.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.22.0...opensearch-1.23.0 [1.22.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.21.0...opensearch-1.22.0 diff --git a/charts/opensearch-dashboards/Chart.yaml b/charts/opensearch-dashboards/Chart.yaml index 4ac85b90..9c3694e4 100644 --- a/charts/opensearch-dashboards/Chart.yaml +++ b/charts/opensearch-dashboards/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.24.0 +version: 1.24.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/opensearch-dashboards/templates/extraManifests.yaml b/charts/opensearch-dashboards/templates/extraManifests.yaml index d6abe5fb..c169b9d0 100644 --- a/charts/opensearch-dashboards/templates/extraManifests.yaml +++ b/charts/opensearch-dashboards/templates/extraManifests.yaml @@ -1,8 +1,8 @@ {{ range .Values.extraObjects }} --- {{- if typeIs "string" . }} -{{- tpl . $ }} +{{ tpl . $ }} {{- else }} -{{- tpl (toYaml .) $ }} +{{ tpl (toYaml .) $ }} {{- end }} {{ end }} \ No newline at end of file diff --git a/charts/opensearch/CHANGELOG.md b/charts/opensearch/CHANGELOG.md index 37ea7ba3..962d5a02 100644 --- a/charts/opensearch/CHANGELOG.md +++ b/charts/opensearch/CHANGELOG.md @@ -14,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Security --- +## [1.31.1] +### Added +### Changed +### Deprecated +### Removed +### Fixed +- Resolved `helm lint` errors with extraObjects +### Security +--- ## [1.31.0] ### Added - Ability to add additional `labels` to `serviceMonitor` @@ -715,7 +724,8 @@ config: ### Fixed ### Security -[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.31.0...HEAD +[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.31.1...HEAD +[1.31.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.31.0...opensearch-1.31.1 [1.31.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.30.0...opensearch-1.31.0 [1.30.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.29.0...opensearch-1.30.0 [1.29.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.28.1...opensearch-1.29.0 diff --git a/charts/opensearch/Chart.yaml b/charts/opensearch/Chart.yaml index 5fad64bb..ea031e67 100644 --- a/charts/opensearch/Chart.yaml +++ b/charts/opensearch/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.31.0 +version: 1.31.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/opensearch/templates/extraManifests.yaml b/charts/opensearch/templates/extraManifests.yaml index d6abe5fb..c169b9d0 100644 --- a/charts/opensearch/templates/extraManifests.yaml +++ b/charts/opensearch/templates/extraManifests.yaml @@ -1,8 +1,8 @@ {{ range .Values.extraObjects }} --- {{- if typeIs "string" . }} -{{- tpl . $ }} +{{ tpl . $ }} {{- else }} -{{- tpl (toYaml .) $ }} +{{ tpl (toYaml .) $ }} {{- end }} {{ end }} \ No newline at end of file