Skip to content

Commit

Permalink
add plugins.removeList to allow remove plugins
Browse files Browse the repository at this point in the history
resolved opensearch-project#383

Signed-off-by: Yulong Ruan <[email protected]>
  • Loading branch information
ruanyl committed Mar 13, 2024
1 parent 0dfa606 commit 4f45f22
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/opensearch-dashboards/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ spec:
- |
#!/usr/bin/bash
set -e
{{- range $plugin := .Values.plugins.removeList }}
./bin/opensearch-dashboards-plugin remove {{ $plugin }}
{{- 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 @@ -274,3 +274,5 @@ plugins:
enabled: false
installList: []
# - example-fake-plugin-downloadable-url
removeList: []
# - securityDashboards
6 changes: 6 additions & 0 deletions charts/opensearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,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 @@ -489,6 +489,8 @@ plugins:
enabled: false
installList: []
# - example-fake-plugin
removeList: []
# - opensearch-ml

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

0 comments on commit 4f45f22

Please sign in to comment.