Skip to content

Commit

Permalink
fix: deprecated api migration versions (#162)
Browse files Browse the repository at this point in the history
build: add changelog & bump version

Signed-off-by: Michael Rödel <[email protected]>
  • Loading branch information
etenzy authored Dec 11, 2021
1 parent f478eeb commit 6354a09
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
9 changes: 9 additions & 0 deletions charts/opensearch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [1.5.3]
### Added
### Changed
### Deprecated
### Removed
### Fixed
- Fixed behavior for `PodSecurityPolicy` in the opensearch chart [Issue #157](https://github.com/opensearch-project/helm-charts/issues/157)
### Security
---
## [1.5.2]
### Added
### Changed
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.5.2
version: 1.5.3

# 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
6 changes: 2 additions & 4 deletions charts/opensearch/templates/podsecuritypolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{{- if semverCompare "<1.25-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if .Values.podSecurityPolicy.create -}}
{{- $fullName := include "opensearch.uname" . -}}
{{- if semverCompare ">=1.21-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: policy/v1
{{- else -}}
apiVersion: policy/v1beta1
{{- end }}
kind: PodSecurityPolicy
metadata:
name: {{ default $fullName .Values.podSecurityPolicy.name | quote }}
Expand All @@ -17,3 +14,4 @@ spec:
- vm.max_map_count
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 6354a09

Please sign in to comment.