Skip to content

Commit

Permalink
[backport 1.x] fix: resolve helm lint errors with extraObjects (#608
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 1.31.1 and 1.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 f85802e commit 2c47724
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
---
## [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`
Expand Down Expand Up @@ -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
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: 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
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
---
## [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`
Expand Down Expand Up @@ -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
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: 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
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 2c47724

Please sign in to comment.