Skip to content

Commit 5a08afd

Browse files
jfriedenstabdistro-ci[bot]jessesimpson36
authored
feat(web-modeler): use health endpoint in websockets probes + scheme parameter in restapi/webapp probes (#4032)
Co-authored-by: distro-ci[bot] <122795778+distro-ci[bot]@users.noreply.github.com> Co-authored-by: Jesse Simpson <[email protected]>
1 parent 8a48753 commit 5a08afd

28 files changed

+305
-79
lines changed

charts/camunda-platform-8.6/README.md

Lines changed: 10 additions & 4 deletions
Large diffs are not rendered by default.

charts/camunda-platform-8.6/templates/web-modeler/deployment-restapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ spec:
9494
startupProbe:
9595
httpGet:
9696
path: {{ .Values.webModeler.restapi.startupProbe.probePath }}
97+
scheme: {{ .Values.webModeler.restapi.startupProbe.scheme }}
9798
port: http-management
9899
initialDelaySeconds: {{ .Values.webModeler.restapi.startupProbe.initialDelaySeconds }}
99100
periodSeconds: {{ .Values.webModeler.restapi.startupProbe.periodSeconds }}
@@ -105,6 +106,7 @@ spec:
105106
readinessProbe:
106107
httpGet:
107108
path: {{ .Values.webModeler.restapi.readinessProbe.probePath }}
109+
scheme: {{ .Values.webModeler.restapi.readinessProbe.scheme }}
108110
port: http-management
109111
initialDelaySeconds: {{ .Values.webModeler.restapi.readinessProbe.initialDelaySeconds }}
110112
periodSeconds: {{ .Values.webModeler.restapi.readinessProbe.periodSeconds }}
@@ -116,6 +118,7 @@ spec:
116118
livenessProbe:
117119
httpGet:
118120
path: {{ .Values.webModeler.restapi.livenessProbe.probePath }}
121+
scheme: {{ .Values.webModeler.restapi.livenessProbe.scheme }}
119122
port: http-management
120123
initialDelaySeconds: {{ .Values.webModeler.restapi.livenessProbe.initialDelaySeconds }}
121124
periodSeconds: {{ .Values.webModeler.restapi.livenessProbe.periodSeconds }}

charts/camunda-platform-8.6/templates/web-modeler/deployment-webapp.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ spec:
9191
httpGet:
9292
{{- /* NOTE: WebApp does not support contextPath for health endpoints. */}}
9393
path: {{ .Values.webModeler.webapp.startupProbe.probePath }}
94+
scheme: {{ .Values.webModeler.webapp.startupProbe.scheme }}
9495
port: http-management
9596
initialDelaySeconds: {{ .Values.webModeler.webapp.startupProbe.initialDelaySeconds }}
9697
periodSeconds: {{ .Values.webModeler.webapp.startupProbe.periodSeconds }}
@@ -103,6 +104,7 @@ spec:
103104
httpGet:
104105
{{- /* NOTE: WebApp does not support contextPath for health endpoints. */}}
105106
path: {{ .Values.webModeler.webapp.readinessProbe.probePath }}
107+
scheme: {{ .Values.webModeler.webapp.readinessProbe.scheme }}
106108
port: http-management
107109
initialDelaySeconds: {{ .Values.webModeler.webapp.readinessProbe.initialDelaySeconds }}
108110
periodSeconds: {{ .Values.webModeler.webapp.readinessProbe.periodSeconds }}
@@ -115,6 +117,7 @@ spec:
115117
httpGet:
116118
{{- /* NOTE: WebApp does not support contextPath for health endpoints. */}}
117119
path: {{ .Values.webModeler.webapp.livenessProbe.probePath }}
120+
scheme: {{ .Values.webModeler.webapp.livenessProbe.scheme }}
118121
port: http-management
119122
initialDelaySeconds: {{ .Values.webModeler.webapp.livenessProbe.initialDelaySeconds }}
120123
periodSeconds: {{ .Values.webModeler.webapp.livenessProbe.periodSeconds }}

charts/camunda-platform-8.6/templates/web-modeler/deployment-websockets.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ spec:
7878
protocol: TCP
7979
{{- if .Values.webModeler.websockets.startupProbe.enabled }}
8080
startupProbe:
81-
tcpSocket:
81+
httpGet:
82+
path: {{ .Values.webModeler.websockets.startupProbe.probePath }}
83+
scheme: {{ .Values.webModeler.websockets.startupProbe.scheme }}
8284
port: http
8385
initialDelaySeconds: {{ .Values.webModeler.websockets.startupProbe.initialDelaySeconds }}
8486
periodSeconds: {{ .Values.webModeler.websockets.startupProbe.periodSeconds }}
@@ -88,7 +90,9 @@ spec:
8890
{{- end }}
8991
{{- if .Values.webModeler.websockets.readinessProbe.enabled }}
9092
readinessProbe:
91-
tcpSocket:
93+
httpGet:
94+
path: {{ .Values.webModeler.websockets.readinessProbe.probePath }}
95+
scheme: {{ .Values.webModeler.websockets.readinessProbe.scheme }}
9296
port: http
9397
initialDelaySeconds: {{ .Values.webModeler.websockets.readinessProbe.initialDelaySeconds }}
9498
periodSeconds: {{ .Values.webModeler.websockets.readinessProbe.periodSeconds }}
@@ -98,7 +102,9 @@ spec:
98102
{{- end }}
99103
{{- if .Values.webModeler.websockets.livenessProbe.enabled }}
100104
livenessProbe:
101-
tcpSocket:
105+
httpGet:
106+
path: {{ .Values.webModeler.websockets.livenessProbe.probePath }}
107+
scheme: {{ .Values.webModeler.websockets.livenessProbe.scheme }}
102108
port: http
103109
initialDelaySeconds: {{ .Values.webModeler.websockets.livenessProbe.initialDelaySeconds }}
104110
periodSeconds: {{ .Values.webModeler.websockets.livenessProbe.periodSeconds }}

charts/camunda-platform-8.6/test/unit/web-modeler/deployment_websockets_test.go

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ func (s *WebsocketsDeploymentTemplateTest) TestDifferentValuesInputs() {
7575
}, {
7676
Name: "TestContainerStartupProbe",
7777
Values: map[string]string{
78-
"webModeler.enabled": "true",
79-
"webModeler.restapi.mail.fromAddress": "[email protected]",
80-
"webModeler.websockets.startupProbe.enabled": "true",
78+
"webModeler.enabled": "true",
79+
"webModeler.restapi.mail.fromAddress": "[email protected]",
80+
"webModeler.websockets.startupProbe.enabled": "true",
81+
"webModeler.websockets.startupProbe.probePath": "/healthz",
8182
},
8283
Verifier: func(t *testing.T, output string, err error) {
8384
var deployment appsv1.Deployment
@@ -86,14 +87,16 @@ func (s *WebsocketsDeploymentTemplateTest) TestDifferentValuesInputs() {
8687
// then
8788
probe := deployment.Spec.Template.Spec.Containers[0].StartupProbe
8889

89-
s.Require().Equal("http", probe.TCPSocket.Port.StrVal)
90+
s.Require().Equal("/healthz", probe.HTTPGet.Path)
91+
s.Require().Equal("http", probe.HTTPGet.Port.StrVal)
9092
},
9193
}, {
9294
Name: "TestContainerReadinessProbe",
9395
Values: map[string]string{
94-
"webModeler.enabled": "true",
95-
"webModeler.restapi.mail.fromAddress": "[email protected]",
96-
"webModeler.websockets.readinessProbe.enabled": "true",
96+
"webModeler.enabled": "true",
97+
"webModeler.restapi.mail.fromAddress": "[email protected]",
98+
"webModeler.websockets.readinessProbe.enabled": "true",
99+
"webModeler.websockets.readinessProbe.probePath": "/healthz",
97100
},
98101
Verifier: func(t *testing.T, output string, err error) {
99102
var deployment appsv1.Deployment
@@ -102,14 +105,16 @@ func (s *WebsocketsDeploymentTemplateTest) TestDifferentValuesInputs() {
102105
// then
103106
probe := deployment.Spec.Template.Spec.Containers[0].ReadinessProbe
104107

105-
s.Require().Equal("http", probe.TCPSocket.Port.StrVal)
108+
s.Require().Equal("/healthz", probe.HTTPGet.Path)
109+
s.Require().Equal("http", probe.HTTPGet.Port.StrVal)
106110
},
107111
}, {
108112
Name: "TestContainerLivenessProbe",
109113
Values: map[string]string{
110-
"webModeler.enabled": "true",
111-
"webModeler.restapi.mail.fromAddress": "[email protected]",
112-
"webModeler.websockets.livenessProbe.enabled": "true",
114+
"webModeler.enabled": "true",
115+
"webModeler.restapi.mail.fromAddress": "[email protected]",
116+
"webModeler.websockets.livenessProbe.enabled": "true",
117+
"webModeler.websockets.livenessProbe.probePath": "/healthz",
113118
},
114119
Verifier: func(t *testing.T, output string, err error) {
115120
var deployment appsv1.Deployment
@@ -118,7 +123,33 @@ func (s *WebsocketsDeploymentTemplateTest) TestDifferentValuesInputs() {
118123
// then
119124
probe := deployment.Spec.Template.Spec.Containers[0].LivenessProbe
120125

121-
s.Require().Equal("http", probe.TCPSocket.Port.StrVal)
126+
s.Require().Equal("/healthz", probe.HTTPGet.Path)
127+
s.Require().Equal("http", probe.HTTPGet.Port.StrVal)
128+
},
129+
}, {
130+
// Web Modeler doesn't support contextPath for health endpoints
131+
Name: "TestContainerProbesWithContextPath",
132+
Values: map[string]string{
133+
"webModeler.enabled": "true",
134+
"webModeler.restapi.mail.fromAddress": "[email protected]",
135+
"webModeler.contextPath": "/test",
136+
"webModeler.websockets.startupProbe.enabled": "true",
137+
"webModeler.websockets.startupProbe.probePath": "/start",
138+
"webModeler.websockets.readinessProbe.enabled": "true",
139+
"webModeler.websockets.readinessProbe.probePath": "/ready",
140+
"webModeler.websockets.livenessProbe.enabled": "true",
141+
"webModeler.websockets.livenessProbe.probePath": "/live",
142+
},
143+
Verifier: func(t *testing.T, output string, err error) {
144+
var deployment appsv1.Deployment
145+
helm.UnmarshalK8SYaml(s.T(), output, &deployment)
146+
147+
// then
148+
probe := deployment.Spec.Template.Spec.Containers[0]
149+
150+
s.Require().Equal("/start", probe.StartupProbe.HTTPGet.Path)
151+
s.Require().Equal("/ready", probe.ReadinessProbe.HTTPGet.Path)
152+
s.Require().Equal("/live", probe.LivenessProbe.HTTPGet.Path)
122153
},
123154
}, {
124155
Name: "TestContainerSetSidecar",

charts/camunda-platform-8.6/test/unit/web-modeler/golden/deployment-restapi.golden.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ spec:
9898
readinessProbe:
9999
httpGet:
100100
path: /health/readiness
101+
scheme: HTTP
101102
port: http-management
102103
initialDelaySeconds: 30
103104
periodSeconds: 30

charts/camunda-platform-8.6/test/unit/web-modeler/golden/deployment-webapp.golden.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ spec:
102102
readinessProbe:
103103
httpGet:
104104
path: /health/readiness
105+
scheme: HTTP
105106
port: http-management
106107
initialDelaySeconds: 15
107108
periodSeconds: 30

charts/camunda-platform-8.6/test/unit/web-modeler/golden/deployment-websockets.golden.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ spec:
8686
name: http
8787
protocol: TCP
8888
readinessProbe:
89-
tcpSocket:
89+
httpGet:
90+
path: /up
91+
scheme: HTTP
9092
port: http
9193
initialDelaySeconds: 10
9294
periodSeconds: 30

charts/camunda-platform-8.6/values.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2972,7 +2972,7 @@ webModeler:
29722972
readinessProbe:
29732973
## @param webModeler.restapi.readinessProbe.enabled if true, the readiness probe will be enabled for the restapi container
29742974
enabled: true
2975-
## @param webModeler.restapi.readinessProbe.scheme defines the startup probe schema used on calling the probePath
2975+
## @param webModeler.restapi.readinessProbe.scheme defines the readiness probe schema used on calling the probePath
29762976
scheme: HTTP
29772977
## @param webModeler.restapi.readinessProbe.probePath defines the HTTP endpoint used for the readiness probe
29782978
probePath: /health/readiness
@@ -2991,7 +2991,7 @@ webModeler:
29912991
livenessProbe:
29922992
## @param webModeler.restapi.livenessProbe.enabled if true, the liveness probe will be enabled for the restapi container
29932993
enabled: false
2994-
## @param webModeler.restapi.livenessProbe.scheme defines the startup probe schema used on calling the probePath
2994+
## @param webModeler.restapi.livenessProbe.scheme defines the liveness probe schema used on calling the probePath
29952995
scheme: HTTP
29962996
## @param webModeler.restapi.livenessProbe.probePath defines the HTTP endpoint used for the liveness probe
29972997
probePath: /health/liveness
@@ -3142,7 +3142,7 @@ webModeler:
31423142
readinessProbe:
31433143
## @param webModeler.webapp.readinessProbe.enabled if true, the readiness probe will be enabled for the webapp container
31443144
enabled: true
3145-
## @param webModeler.webapp.readinessProbe.scheme defines the startup probe schema used on calling the probePath
3145+
## @param webModeler.webapp.readinessProbe.scheme defines the readiness probe schema used on calling the probePath
31463146
scheme: HTTP
31473147
## @param webModeler.webapp.readinessProbe.probePath defines the HTTP endpoint used for the readiness probe
31483148
probePath: /health/readiness
@@ -3161,7 +3161,7 @@ webModeler:
31613161
livenessProbe:
31623162
## @param webModeler.webapp.livenessProbe.enabled if true, the liveness probe will be enabled for the webapp container
31633163
enabled: false
3164-
## @param webModeler.webapp.livenessProbe.scheme defines the startup probe schema used on calling the probePath
3164+
## @param webModeler.webapp.livenessProbe.scheme defines the liveness probe schema used on calling the probePath
31653165
scheme: HTTP
31663166
## @param webModeler.webapp.livenessProbe.probePath defines the HTTP endpoint used for the liveness probe
31673167
probePath: /health/liveness
@@ -3299,6 +3299,10 @@ webModeler:
32993299
startupProbe:
33003300
## @param webModeler.websockets.startupProbe.enabled if true, the startup probe will be enabled for the websockets container
33013301
enabled: false
3302+
## @param webModeler.websockets.startupProbe.scheme defines the startup probe schema used on calling the probePath
3303+
scheme: HTTP
3304+
## @param webModeler.websockets.startupProbe.probePath defines the HTTP endpoint used for the startup probe
3305+
probePath: /up
33023306
## @param webModeler.websockets.startupProbe.initialDelaySeconds defines the number of seconds after the container has started before the probe is initiated
33033307
initialDelaySeconds: 10
33043308
## @param webModeler.websockets.startupProbe.periodSeconds defines how often the probe is executed
@@ -3314,6 +3318,10 @@ webModeler:
33143318
readinessProbe:
33153319
## @param webModeler.websockets.readinessProbe.enabled if true, the readiness probe will be enabled for the websockets container
33163320
enabled: true
3321+
## @param webModeler.websockets.readinessProbe.scheme defines the readiness probe schema used on calling the probePath
3322+
scheme: HTTP
3323+
## @param webModeler.websockets.readinessProbe.probePath defines the HTTP endpoint used for the readiness probe
3324+
probePath: /up
33173325
## @param webModeler.websockets.readinessProbe.initialDelaySeconds defines the number of seconds after the container has started before the probe is initiated
33183326
initialDelaySeconds: 10
33193327
## @param webModeler.websockets.readinessProbe.periodSeconds defines how often the probe is executed
@@ -3329,6 +3337,10 @@ webModeler:
33293337
livenessProbe:
33303338
## @param webModeler.websockets.livenessProbe.enabled if true, the liveness probe will be enabled for the websockets container
33313339
enabled: false
3340+
## @param webModeler.websockets.livenessProbe.scheme defines the liveness probe schema used on calling the probePath
3341+
scheme: HTTP
3342+
## @param webModeler.websockets.livenessProbe.probePath defines the HTTP endpoint used for the liveness probe
3343+
probePath: /up
33323344
## @param webModeler.websockets.livenessProbe.initialDelaySeconds defines the number of seconds after the container has started before the probe is initiated
33333345
initialDelaySeconds: 10
33343346
## @param webModeler.websockets.livenessProbe.periodSeconds defines how often the probe is executed

0 commit comments

Comments
 (0)