diff --git a/charts/opensearch/CHANGELOG.md b/charts/opensearch/CHANGELOG.md index 5dfe426f..56d0c87d 100644 --- a/charts/opensearch/CHANGELOG.md +++ b/charts/opensearch/CHANGELOG.md @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- ## [Unreleased] ### Added +### Changed +### Deprecated +### Removed +### Fixed +### Security +--- +## [1.5.6] +### Added +**BREAKING CHANGE** +This version introduces a change in the service name definitions that will break Helm upgrades due to changes in the `StatefulSet`. + +To resolve: Simply delete the existing statefulset in the cluster and ensure the PVC is retained (by default, this should be the case). `kubectl delete sts opensearch-cluster-master` +After deleting the statefulset and upgrading the helm chart again, the new replacement statefulset will be created and should consume the same PVC as before. + ### Changed ### Deprecated ### Removed diff --git a/charts/opensearch/Chart.yaml b/charts/opensearch/Chart.yaml index 4bdfad9f..fa3cea1b 100644 --- a/charts/opensearch/Chart.yaml +++ b/charts/opensearch/Chart.yaml @@ -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.5 +version: 1.5.6 # 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 diff --git a/charts/opensearch/templates/_helpers.tpl b/charts/opensearch/templates/_helpers.tpl index 07274ca9..6c47e408 100755 --- a/charts/opensearch/templates/_helpers.tpl +++ b/charts/opensearch/templates/_helpers.tpl @@ -78,6 +78,14 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} {{- end -}} +{{- define "opensearch.serviceName" -}} +{{- if eq .Values.nodeGroup "master" }} +{{- include "opensearch.masterService" . }} +{{- else }} +{{- include "opensearch.uname" . }} +{{- end }} +{{- end -}} + {{- define "opensearch.endpoints" -}} {{- $replicas := int (toString (.Values.replicas)) }} {{- $uname := (include "opensearch.uname" .) }} diff --git a/charts/opensearch/templates/ingress.yaml b/charts/opensearch/templates/ingress.yaml index 67a12e4b..7a4d0da8 100644 --- a/charts/opensearch/templates/ingress.yaml +++ b/charts/opensearch/templates/ingress.yaml @@ -1,5 +1,5 @@ {{- if .Values.ingress.enabled -}} -{{- $fullName := include "opensearch.uname" . -}} +{{- $fullName := include "opensearch.serviceName" . -}} {{- $servicePort := .Values.httpPort -}} {{- $ingressPath := .Values.ingress.path -}} {{- $ingressApiIsStable := eq (include "opensearch.ingress.isStable" .) "true" -}} diff --git a/charts/opensearch/templates/service.yaml b/charts/opensearch/templates/service.yaml index 7bc81862..ffad0cd3 100644 --- a/charts/opensearch/templates/service.yaml +++ b/charts/opensearch/templates/service.yaml @@ -2,11 +2,7 @@ kind: Service apiVersion: v1 metadata: -{{- if eq .Values.nodeGroup "master" }} - name: {{ template "opensearch.masterService" . }} -{{- else }} - name: {{ template "opensearch.uname" . }} -{{- end }} + name: {{ template "opensearch.serviceName" . }} labels: {{- include "opensearch.labels" . | nindent 4 }} {{- if .Values.service.labels }} @@ -42,11 +38,7 @@ spec: kind: Service apiVersion: v1 metadata: -{{- if eq .Values.nodeGroup "master" }} - name: {{ template "opensearch.masterService" . }}-headless -{{- else }} - name: {{ template "opensearch.uname" . }}-headless -{{- end }} + name: {{ template "opensearch.serviceName" . }}-headless labels: {{- include "opensearch.labels" . | nindent 4 }} {{- if .Values.service.labelsHeadless }} diff --git a/charts/opensearch/templates/statefulset.yaml b/charts/opensearch/templates/statefulset.yaml index 135eae7f..5f621fd1 100644 --- a/charts/opensearch/templates/statefulset.yaml +++ b/charts/opensearch/templates/statefulset.yaml @@ -8,7 +8,7 @@ metadata: annotations: majorVersion: "{{ include "opensearch.majorVersion" . }}" spec: - serviceName: {{ template "opensearch.uname" . }}-headless + serviceName: {{ template "opensearch.serviceName" . }}-headless selector: matchLabels: {{- include "opensearch.selectorLabels" . | nindent 6 }}