Skip to content

Commit

Permalink
fix: resolve helm lint errors with extraObjects (#607)
Browse files Browse the repository at this point in the history
* 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] helm/helm#10149
[2] helm/helm#10149 (comment)

Signed-off-by: Martin Rowe <[email protected]>

* Bump version to 2.26.1 and 2.24.1

Signed-off-by: Martin Rowe <[email protected]>

---------

Signed-off-by: Martin Rowe <[email protected]>
  • Loading branch information
cyanidium authored Oct 24, 2024
1 parent d4fd258 commit b5d7058
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 8 deletions.
12 changes: 11 additions & 1 deletion charts/opensearch-dashboards/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [2.24.1]
### Added
### Changed
### Deprecated
### Removed
### Fixed
- Resolved `helm lint` errors with extraObjects
### Security
---
## [2.24.0]
### Added
- Updated OpenSearch Dashboards appVersion to 2.17.1
Expand Down Expand Up @@ -412,7 +421,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-2.24.0...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.24.1...HEAD
[2.24.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.24.0...opensearch-dashboards-2.24.1
[2.24.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.23.0...opensearch-dashboards-2.24.0
[2.23.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.22.0...opensearch-dashboards-2.23.0
[2.22.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.21.1...opensearch-dashboards-2.22.0
Expand Down
2 changes: 1 addition & 1 deletion charts/opensearch-dashboards/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2.24.0
version: 2.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
Expand Down
4 changes: 2 additions & 2 deletions charts/opensearch-dashboards/templates/extraManifests.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{ range .Values.extraObjects }}
---
{{- if typeIs "string" . }}
{{- tpl . $ }}
{{ tpl . $ }}
{{- else }}
{{- tpl (toYaml .) $ }}
{{ tpl (toYaml .) $ }}
{{- end }}
{{ end }}
12 changes: 11 additions & 1 deletion charts/opensearch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [2.26.1]
### Added
### Changed
### Deprecated
### Removed
### Fixed
- Resolved `helm lint` errors with extraObjects
### Security
---
## [2.26.0]
### Added
- Updated OpenSearch appVersion to 2.17.1
Expand Down Expand Up @@ -503,7 +512,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-2.26.0...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.26.1...HEAD
[2.26.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.26.0...opensearch-2.26.1
[2.26.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.25.0...opensearch-2.26.0
[2.25.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.24.1...opensearch-2.25.0
[2.24.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.24.0...opensearch-2.24.1
Expand Down
2 changes: 1 addition & 1 deletion charts/opensearch/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2.26.0
version: 2.26.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
Expand Down
4 changes: 2 additions & 2 deletions charts/opensearch/templates/extraManifests.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{ range .Values.extraObjects }}
---
{{- if typeIs "string" . }}
{{- tpl . $ }}
{{ tpl . $ }}
{{- else }}
{{- tpl (toYaml .) $ }}
{{ tpl (toYaml .) $ }}
{{- end }}
{{ end }}

0 comments on commit b5d7058

Please sign in to comment.