Skip to content

Commit f759374

Browse files
authored
[backport 1.x] Backport for healthchecks PR #329 (#333)
* Add healthcheck probes to charts (#329) * Adding missing healthcheck probe configurations Signed-off-by: Luis Schweigard <luis.schweigard@gmail.com> Signed-off-by: Luis Schweigard <luis.schweigard@maibornwolff.de> * Bumping chart versions and adding changes to CHANGELOG.md Signed-off-by: Luis Schweigard <luis.schweigard@gmail.com> Signed-off-by: Luis Schweigard <luis.schweigard@maibornwolff.de> * Making opensearch liveness probe optional Signed-off-by: Luis Schweigard <luis.schweigard@maibornwolff.de> * Configuring livenessProbe to be optional for opensearch-dashboards chart Signed-off-by: Luis Schweigard <luis.schweigard@maibornwolff.de> * Adapting readme files Signed-off-by: Luis Schweigard <luis.schweigard@maibornwolff.de> * Changing opensearch dashboard lifecycle checks to tcpSocket Signed-off-by: Luis Schweigard <luis.schweigard@maibornwolff.de> * Adding changelog Signed-off-by: Luis Schweigard <luis.schweigard@maibornwolff.de> Signed-off-by: Luis Schweigard <luis.schweigard@gmail.com> Signed-off-by: Luis Schweigard <luis.schweigard@maibornwolff.de> * Chart version bump Signed-off-by: Luis Schweigard <luis.schweigard@maibornwolff.de> Signed-off-by: Luis Schweigard <luis.schweigard@gmail.com> Signed-off-by: Luis Schweigard <luis.schweigard@maibornwolff.de>
1 parent fda407a commit f759374

File tree

10 files changed

+96
-8
lines changed

10 files changed

+96
-8
lines changed

charts/opensearch-dashboards/CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
### Fixed
1414
### Security
1515
---
16+
## [1.8.4]
17+
### Added
18+
- Healthchecks
19+
### Changed
20+
### Deprecated
21+
### Removed
22+
### Fixed
23+
### Security
24+
---
1625
## [1.8.3]
1726
### Added
1827
- Template configmap content by tpl function
@@ -306,7 +315,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
306315
### Fixed
307316
### Security
308317

309-
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-1.8.3...HEAD
318+
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-dashboards-1.8.4...HEAD
319+
[1.8.4]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.8.3...opensearch-1.8.4
310320
[1.8.3]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.8.2...opensearch-1.8.3
311321
[1.8.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.8.1...opensearch-1.8.2
312322
[1.8.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.8.0...opensearch-1.8.1

charts/opensearch-dashboards/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.8.3
18+
version: 1.8.4
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/opensearch-dashboards/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,14 @@
7676
| `updateStrategy` | The [updateStrategy][] for the StatefulSet. By default Kubernetes will wait for the cluster to be green after upgrading each pod. Setting this to `OnDelete` will allow you to manually delete each pod during upgrades | `RollingUpdate` |
7777
| `extraObjects` | Array of extra K8s manifests to deploy | list `[]` |
7878
| `autoscaling` | Prerequisite: Install/Configure metrics server, to install use `kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml`, See https://github.com/kubernetes-sigs/metrics-server. Configurable pod autoscaling stratergy to scale based on `targetCPUUtilizationPercentage`, configure `minReplicas` and `maxReplicas` for desired scaling | false |
79+
| `livenessProbe` | Configuration fields for the liveness [probe][] | see [exampleLiveness][] in `values.yaml`
80+
| `readinessProbe` | Configuration fields for the readiness [probe][] | see [exampleReadiness][] in `values.yaml`
81+
| `startupProbe` | Configuration fields for the startup [probe][] | see [exampleStartup][] in `values.yaml` |
82+
83+
84+
[probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes
85+
86+
87+
[exampleStartup]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch-dashboards/values.yaml#17
88+
[exampleLiveness]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch-dashboards/values.yaml#27
89+
[exampleReadiness]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch-dashboards/values.yaml#37

charts/opensearch-dashboards/templates/deployment.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,20 @@ spec:
9191
{{ toYaml .Values.securityContext | indent 10 }}
9292
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
9393
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
94+
{{- if .Values.readinessProbe }}
95+
readinessProbe:
96+
{{ toYaml .Values.readinessProbe | indent 10 }}
97+
{{- end }}
98+
{{- if .Values.livenessProbe }}
99+
livenessProbe:
100+
{{ toYaml .Values.livenessProbe | indent 10 }}
101+
{{- end }}
102+
{{- if semverCompare ">=1.16-0" .Capabilities.KubeVersion.Version }}
103+
{{- if .Values.readinessProbe }}
104+
startupProbe:
105+
{{ toYaml .Values.startupProbe | indent 10 }}
106+
{{- end }}
107+
{{- end }}
94108
env:
95109
{{- if .Values.opensearchURL }}
96110
- name: OPENSEARCH_URL

charts/opensearch-dashboards/values.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,33 @@ image:
1414
tag: ""
1515
pullPolicy: "IfNotPresent"
1616

17+
startupProbe:
18+
tcpSocket:
19+
port: 5601
20+
periodSeconds: 10
21+
timeoutSeconds: 5
22+
failureThreshold: 20
23+
successThreshold: 1
24+
initialDelaySeconds: 10
25+
26+
livenessProbe:
27+
tcpSocket:
28+
port: 5601
29+
periodSeconds: 20
30+
timeoutSeconds: 5
31+
failureThreshold: 10
32+
successThreshold: 1
33+
initialDelaySeconds: 10
34+
35+
readinessProbe:
36+
tcpSocket:
37+
port: 5601
38+
periodSeconds: 20
39+
timeoutSeconds: 5
40+
failureThreshold: 10
41+
successThreshold: 1
42+
initialDelaySeconds: 10
43+
1744
imagePullSecrets: []
1845
nameOverride: ""
1946
fullnameOverride: ""

charts/opensearch/CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
### Fixed
1313
### Security
1414

15+
---
16+
## [1.14.2]
17+
### Added
18+
- Healthchecks
19+
### Changed
20+
### Deprecated
21+
### Removed
22+
### Fixed
23+
### Security
1524
---
1625
## [1.14.1]
1726
### Added
@@ -485,7 +494,8 @@ config:
485494
### Fixed
486495
### Security
487496

488-
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.14.1...HEAD
497+
[Unreleased]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.14.2...HEAD
498+
[1.14.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.14.1...opensearch-1.14.2
489499
[1.14.1]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.14.0...opensearch-1.14.1
490500
[1.14.0]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.13.2...opensearch-1.14.0
491501
[1.13.2]: https://github.com/opensearch-project/helm-charts/compare/opensearch-1.13.1...opensearch-1.13.2

charts/opensearch/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.14.1
18+
version: 1.14.2
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/opensearch/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ helm uninstall my-release
106106
| `updateStrategy` | The [updateStrategy][] for the StatefulSet. By default Kubernetes will wait for the cluster to be green after upgrading each pod. Setting this to `OnDelete` will allow you to manually delete each pod during upgrades | `RollingUpdate` |
107107
| `volumeClaimTemplate` | Configuration for the [volumeClaimTemplate for StatefulSets][]. You will want to adjust the storage (default `30Gi` ) and the `storageClassName` if you are using a different storage class | see [values.yaml][] |
108108
| `extraObjects` | Array of extra K8s manifests to deploy | list `[]` | |
109-
| `readinessProbe` | Configuration fields for the readiness [probe][] | see [example][] in `values.yaml`
110-
| `startupProbe` | Configuration fields for the [probe][] | see [sample][] in `values.yaml` |
109+
| `livenessProbe` | Configuration fields for the liveness [probe][] | see [exampleLiveness][] in `values.yaml`
110+
| `readinessProbe` | Configuration fields for the readiness [probe][] | see [exampleReadiness][] in `values.yaml`
111+
| `startupProbe` | Configuration fields for the startup [probe][] | see [exampleStartup][] in `values.yaml` |
111112

112113

113114

@@ -168,6 +169,7 @@ helm uninstall my-release
168169

169170
[probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes
170171

171-
[example]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch/values.yaml#L336
172+
[exampleStartup]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch/values.yaml#332
173+
[exampleLiveness]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch/values.yaml#340
174+
[exampleReadiness]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch/values.yaml#349
172175

173-
[sample]: https://github.com/opensearch-project/helm-charts/blob/main/charts/opensearch/values.yaml#L328

charts/opensearch/templates/statefulset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,10 @@ spec:
308308
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
309309
readinessProbe:
310310
{{ toYaml .Values.readinessProbe | indent 10 }}
311+
{{- if .Values.livenessProbe }}
312+
livenessProbe:
313+
{{ toYaml .Values.livenessProbe | indent 10 }}
314+
{{- end }}
311315
{{- if semverCompare ">=1.16-0" .Capabilities.KubeVersion.Version }}
312316
startupProbe:
313317
{{ toYaml .Values.startupProbe | indent 10 }}

charts/opensearch/values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,16 @@ startupProbe:
336336
periodSeconds: 10
337337
timeoutSeconds: 3
338338
failureThreshold: 30
339+
340+
livenessProbe: {}
341+
# periodSeconds: 20
342+
# timeoutSeconds: 5
343+
# failureThreshold: 10
344+
# successThreshold: 1
345+
# initialDelaySeconds: 10
346+
# tcpSocket:
347+
# port: 9200
348+
339349
readinessProbe:
340350
tcpSocket:
341351
port: 9200

0 commit comments

Comments
 (0)