Skip to content

Commit

Permalink
fix #160: change structure of image key in values.yaml for both opens…
Browse files Browse the repository at this point in the history
…earch and opensearch-dashboard (#184)

* fix #160: change structure of image key

Signed-off-by: dmpe <[email protected]>

* Change version

Signed-off-by: Peter Zhu <[email protected]>

Co-authored-by: Peter Zhu <[email protected]>
  • Loading branch information
dmpe and peterzhuamazon authored Jan 7, 2022
1 parent e875ba4 commit 63847ee
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 40 deletions.
13 changes: 11 additions & 2 deletions charts/opensearch-dashboards/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
### Fixed
### Security

---
## [1.2.0]
### Added
### Changed
- Changed structure of `image` keys in `values.yaml` file to use helm's default (`image.repository`, `image.tag`, `image.pullPolicy`)
### Deprecated
### Removed
### Fixed
### Security
---
## [1.1.2]
### Added
Expand Down Expand Up @@ -107,7 +115,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-1.1.2...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-1.2.0...HEAD
[1.2.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.1.2...opensearch-1.2.0
[1.1.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.1.1...opensearch-1.1.2
[1.1.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.1.0...opensearch-1.1.1
[1.1.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.0.8...opensearch-1.1.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: 1.1.2
version: 1.2.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
4 changes: 2 additions & 2 deletions charts/opensearch-dashboards/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ spec:
- name: dashboards
securityContext:
{{ toYaml .Values.securityContext | indent 10 }}
image: "{{ .Values.image }}:{{ .Values.imageTag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
env:
{{- if .Values.opensearchURL }}
- name: OPENSEARCH_URL
Expand Down
9 changes: 5 additions & 4 deletions charts/opensearch-dashboards/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
opensearchHosts: "https://opensearch-cluster-master:9200"
replicaCount: 1

image: "opensearchproject/opensearch-dashboards"
# override image tag, which is .Chart.AppVersion by default
imageTag: ""
imagePullPolicy: "IfNotPresent"
image:
repository: "opensearchproject/opensearch-dashboards"
# override image tag, which is .Chart.AppVersion by default
tag: ""
pullPolicy: "IfNotPresent"

imagePullSecrets: []
nameOverride: ""
Expand Down
16 changes: 13 additions & 3 deletions charts/opensearch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
### Fixed
### Security
---
## [1.6.0]
### Added
### Changed
- Changed structure of `image` keys in `values.yaml` file to use helm's default (`image.repository`, `image.tag`, `image.pullPolicy`)
### Deprecated
### Removed
### Fixed
### Security

---
## [1.5.8]
Expand All @@ -35,10 +44,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [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`.
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.
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
Expand Down Expand Up @@ -286,7 +295,8 @@ config:
### Fixed
### Security

[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.5.8...HEAD
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.6.0...HEAD
[1.6.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.5.8...opensearch-1.6.0
[1.5.8]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.5.7...opensearch-1.5.8
[1.5.7]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.5.6...opensearch-1.5.7
[1.5.6]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.5.5...opensearch-1.5.6
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.8
version: 1.6.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
8 changes: 4 additions & 4 deletions charts/opensearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ helm uninstall my-release
| `fullnameOverride` | Overrides the `clusterName` and `nodeGroup` when used in the naming of resources. This should only be used when using a single `nodeGroup`, otherwise you will have name conflicts | `""` |
| `hostAliases` | Configurable [hostAliases][] | `[]` |
| `httpPort` | The http port that Kubernetes will use for the healthchecks and the service. If you change this you will also need to set `http.port` in `extraEnvs` | `9200` |
| `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` |
| `image.pullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` |
| `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` |
| `imageTag` | The OpenSearch Docker image tag | `1.0.0` |
| `image` | The OpenSearch Docker image | `opensearchproject/opensearch` |
| `image.tag` | The OpenSearch Docker image tag | `1.0.0` |
| `image.repository` | The OpenSearch Docker image | `opensearchproject/opensearch` |
| `ingress` | Configurable [ingress][] to expose the OpenSearch service. See [values.yaml][] for an example | see [values.yaml][] |
| `initResources` | Allows you to set the [resources][] for the `initContainer` in the StatefulSet | `{}` |
| `keystore` | Allows you map Kubernetes secrets into the keystore. | `[]` |
Expand Down Expand Up @@ -114,7 +114,7 @@ helm uninstall my-release

[hostAliases]: https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/

[imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images
[image.pullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images
[imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
[ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/
[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
Expand Down
9 changes: 5 additions & 4 deletions charts/opensearch/ci/ci-ingress-class-name-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ hostAliases: []
# - "foo.local"
# - "bar.local"

image: "opensearchproject/opensearch"
# override image tag, which is .Chart.AppVersion by default
imageTag: ""
imagePullPolicy: "IfNotPresent"
image:
repository: "opensearchproject/opensearch"
# override image tag, which is .Chart.AppVersion by default
tag: ""
pullPolicy: "IfNotPresent"

podAnnotations: {}
# iam.amazonaws.com/role: es-cluster
Expand Down
9 changes: 5 additions & 4 deletions charts/opensearch/ci/ci-rbac-enabled-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ hostAliases: []
# - "foo.local"
# - "bar.local"

image: "opensearchproject/opensearch"
# override image tag, which is .Chart.AppVersion by default
imageTag: ""
imagePullPolicy: "IfNotPresent"
image:
repository: "opensearchproject/opensearch"
# override image tag, which is .Chart.AppVersion by default
tag: ""
pullPolicy: "IfNotPresent"

podAnnotations: {}
# iam.amazonaws.com/role: es-cluster
Expand Down
11 changes: 7 additions & 4 deletions charts/opensearch/ci/ci-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,13 @@ hostAliases: []
# - "foo.local"
# - "bar.local"

image: "opensearchproject/opensearch"
# override image tag, which is .Chart.AppVersion by default
imageTag: ""
imagePullPolicy: "IfNotPresent"

image:
repository: "opensearchproject/opensearch"
# override image tag, which is .Chart.AppVersion by default
tag: ""
pullPolicy: "IfNotPresent"


podAnnotations: {}
# iam.amazonaws.com/role: es-cluster
Expand Down
2 changes: 1 addition & 1 deletion charts/opensearch/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.majorVersion }}
{{- .Values.majorVersion }}
{{- else }}
{{- $version := semver (coalesce .Values.imageTag .Chart.AppVersion "1") }}
{{- $version := semver (coalesce .Values.image.tag .Chart.AppVersion "1") }}
{{- $version.Major }}
{{- end }}
{{- end }}
Expand Down
12 changes: 6 additions & 6 deletions charts/opensearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ spec:
{{- end }}
{{ if .Values.keystore }}
- name: keystore
image: "{{ template "opensearch.dockerRegistry" . }}{{ .Values.image }}:{{ .Values.imageTag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
image: "{{ template "opensearch.dockerRegistry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
command:
- sh
- -c
Expand Down Expand Up @@ -289,8 +289,8 @@ spec:
bash opensearch-docker-entrypoint.sh
{{- end }}
image: "{{ template "opensearch.dockerRegistry" . }}{{ .Values.image }}:{{ .Values.imageTag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
image: "{{ template "opensearch.dockerRegistry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.image.PullPolicy }}"
ports:
- name: http
containerPort: {{ .Values.httpPort }}
Expand Down Expand Up @@ -396,8 +396,8 @@ spec:
{{- if eq .Values.roles.master "true" }}
# This sidecar will prevent slow master re-election
- name: opensearch-master-graceful-termination-handler
image: "{{ template "opensearch.dockerRegistry" . }}{{ .Values.image }}:{{ .Values.imageTag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
image: "{{ template "opensearch.dockerRegistry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
command:
- "sh"
- -c
Expand Down
9 changes: 5 additions & 4 deletions charts/opensearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ hostAliases: []
# - "foo.local"
# - "bar.local"

image: "opensearchproject/opensearch"
# override image tag, which is .Chart.AppVersion by default
imageTag: ""
imagePullPolicy: "IfNotPresent"
image:
repository: "opensearchproject/opensearch"
# override image tag, which is .Chart.AppVersion by default
tag: ""
pullPolicy: "IfNotPresent"

podAnnotations: {}
# iam.amazonaws.com/role: es-cluster
Expand Down

0 comments on commit 63847ee

Please sign in to comment.