Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing opensearch helmchart conditions when there is only cluster_manager role specified to nodes #380

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions charts/opensearch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
---
## [2.11.1]
### Added
### Changed
### Deprecated
### Removed
### Fixed
- masterTerminationFix option when cluster_manager is specified
- singleNode condition cluster_manager is specified
### Security
---
## [2.11.0]
### 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: 2.11.0
version: 2.11.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/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
{{- if (and (has "master" .Values.roles) (not .Values.singleNode)) }}
{{- if (and (or (has "master" .Values.roles) (has "cluster_manager" .Values.roles)) (not .Values.singleNode)) }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to add description in README.md as well for the same. Also echoing on the question by @prudhvigodithi how is it impacting and what are the failures we are seeing. Good to capture it in the github issue

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can provide some input on the question posed by @prudhvigodithi . I recently was deploying Opensearch for the first time and was having issues when there was more than one replica. I had been attempting to use all inclusive language, to include specifying a new roles key in my values.yaml where I replaced the master role with cluster_manger. I tracked down the issue to these conditional renderings in the helm chart. I solved it by just using the non-inclusive language.

- name: cluster.initial_master_nodes
value: "{{ template "opensearch.endpoints" . }}"
{{- end }}
Expand Down Expand Up @@ -459,7 +459,7 @@ spec:
{{- end }}
{{- end }}
{{- if .Values.masterTerminationFix }}
{{- if has "master" .Values.roles }}
{{- if or (has "master" .Values.roles) (has "cluster_manager" .Values.roles) }}
# This sidecar will prevent slow master re-election
- name: opensearch-master-graceful-termination-handler
image: "{{ template "opensearch.dockerRegistry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down