Skip to content

Commit b8c3e33

Browse files
authored
fix(agent): GKE Autopilot do not accept HTTP probe (#1508)
1 parent 8972ecf commit b8c3e33

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

charts/agent/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ sources:
3030
- https://app.sysdigcloud.com/#/settings/user
3131
- https://github.com/draios/sysdig
3232
type: application
33-
version: 1.17.2
33+
version: 1.17.3

charts/agent/templates/_helpers.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,11 @@ true
513513
{{- end }}
514514
515515
{{- define "agent.enableHttpProbes" }}
516+
{{- if not (include "agent.gke.autopilot" .) }}
516517
{{- if regexMatch "^v?([0-9]+)(\\.[0-9]+)?(\\.[0-9]+)?(-([0-9A-Za-z\\-]+(\\.[0-9A-Za-z\\-]+)*))?(\\+([0-9A-Za-z\\-]+(\\.[0-9A-Za-z\\-]+)*))?$" .Values.image.tag }}
517518
{{- if semverCompare ">= 12.18.0-0" .Values.image.tag }}
518519
{{- printf "true" -}}
519520
{{- end }}
520521
{{- end }}
521522
{{- end }}
523+
{{- end }}

charts/agent/tests/readiness_probe_test.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,38 @@ tests:
179179
- equal:
180180
path: spec.template.spec.containers[0].readinessProbe.periodSeconds
181181
value: 3
182+
183+
- it: "Do not use the HTTP Readiness Probe on GKE Autopilot"
184+
set:
185+
global:
186+
gke:
187+
autopilot: true
188+
template: templates/daemonset.yaml
189+
asserts:
190+
- equal:
191+
path: spec.template.spec.containers[*].readinessProbe
192+
value:
193+
exec:
194+
command:
195+
- test
196+
- -e
197+
- /opt/draios/logs/running
198+
initialDelaySeconds: 90
199+
periodSeconds: 3
200+
201+
- it: "Do not use the HTTP Readiness Probe on GKE Autopilot"
202+
set:
203+
gke:
204+
autopilot: true
205+
template: templates/daemonset.yaml
206+
asserts:
207+
- equal:
208+
path: spec.template.spec.containers[*].readinessProbe
209+
value:
210+
exec:
211+
command:
212+
- test
213+
- -e
214+
- /opt/draios/logs/running
215+
initialDelaySeconds: 90
216+
periodSeconds: 3

0 commit comments

Comments
 (0)