Skip to content

Commit

Permalink
add plugins.removeList to allow remove plugins (#526)
Browse files Browse the repository at this point in the history
* add plugins.removeList to allow remove plugins

resolved #383

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* check if opensearch plugin exists before removing

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* bump version and add changelog

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* update changelog

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* Update version

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Update charts version

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
  • Loading branch information
ruanyl and peterzhuamazon authored Jan 2, 2025
1 parent 452261e commit 74706b8
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 5 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.26.0]
### Added
- Added plugins.removeList to allow remove plugins
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [2.25.0]
### Added
- Updated OpenSearch Dashboards appVersion to 2.18.0
Expand Down Expand Up @@ -430,7 +439,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.25.0...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.26.0...HEAD
[2.26.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.25.0...opensearch-dashboards-2.26.0
[2.25.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-2.24.1...opensearch-dashboards-2.25.0
[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
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.25.0
version: 2.26.0

# 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
5 changes: 5 additions & 0 deletions charts/opensearch-dashboards/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ spec:
- |
#!/usr/bin/bash
set -e
{{- range $plugin := .Values.plugins.removeList }}
if ./bin/opensearch-dashboards-plugin list | grep -q {{ $plugin }}; then
./bin/opensearch-dashboards-plugin remove {{ $plugin }}
fi
{{- end }}
{{- range $plugin := .Values.plugins.installList }}
./bin/opensearch-dashboards-plugin install {{ $plugin }}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions charts/opensearch-dashboards/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ plugins:
enabled: false
installList: []
# - example-fake-plugin-downloadable-url
removeList: []
# - examplePluginName

# ServiceMonitor Configuration for Prometheus
# Enabling this option will create a ServiceMonitor resource that allows Prometheus to scrape metrics from the OpenSearch service.
Expand Down
14 changes: 12 additions & 2 deletions 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.30.0]
### Added
- Added plugins.removeList to allow remove plugins
### Changed
### Deprecated
### Removed
### Fixed
### Security
---
## [2.29.0]
### Added
- Ability to set a basic auth configuration to the `serviceMonitor`
Expand Down Expand Up @@ -548,9 +557,10 @@ 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.29.0...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.30.0...HEAD
[2.29.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.29.0...opensearch-2.30.0
[2.29.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.28.0...opensearch-2.29.0
[2.28.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.27.0...opensearch-2.28.0
[2.28.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.27.1...opensearch-2.28.0
[2.27.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.27.0...opensearch-2.27.1
[2.27.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.26.1...opensearch-2.27.0
[2.26.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-2.26.0...opensearch-2.26.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.29.0
version: 2.30.0

# 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: 6 additions & 0 deletions charts/opensearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,12 @@ spec:
#!/usr/bin/env bash
set -euo pipefail
{{- range $plugin := .Values.plugins.removeList }}
if ./bin/opensearch-plugin list | grep -q {{ $plugin }}; then
./bin/opensearch-plugin remove {{ $plugin }}
fi
{{- end }}
{{- range $plugin := .Values.plugins.installList }}
./bin/opensearch-plugin install -b {{ $plugin }}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions charts/opensearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@ plugins:
enabled: false
installList: []
# - example-fake-plugin
removeList: []
# - example-fake-plugin

# -- Array of extra K8s manifests to deploy
extraObjects: []
Expand Down

0 comments on commit 74706b8

Please sign in to comment.