Skip to content

Commit

Permalink
fix(agent): GKE Autopilot do not accept HTTP probe (#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
mavimo authored Dec 1, 2023
1 parent 8972ecf commit b8c3e33
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ sources:
- https://app.sysdigcloud.com/#/settings/user
- https://github.com/draios/sysdig
type: application
version: 1.17.2
version: 1.17.3
2 changes: 2 additions & 0 deletions charts/agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,11 @@ true
{{- end }}
{{- define "agent.enableHttpProbes" }}
{{- if not (include "agent.gke.autopilot" .) }}
{{- 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 }}
{{- if semverCompare ">= 12.18.0-0" .Values.image.tag }}
{{- printf "true" -}}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
35 changes: 35 additions & 0 deletions charts/agent/tests/readiness_probe_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,38 @@ tests:
- equal:
path: spec.template.spec.containers[0].readinessProbe.periodSeconds
value: 3

- it: "Do not use the HTTP Readiness Probe on GKE Autopilot"
set:
global:
gke:
autopilot: true
template: templates/daemonset.yaml
asserts:
- equal:
path: spec.template.spec.containers[*].readinessProbe
value:
exec:
command:
- test
- -e
- /opt/draios/logs/running
initialDelaySeconds: 90
periodSeconds: 3

- it: "Do not use the HTTP Readiness Probe on GKE Autopilot"
set:
gke:
autopilot: true
template: templates/daemonset.yaml
asserts:
- equal:
path: spec.template.spec.containers[*].readinessProbe
value:
exec:
command:
- test
- -e
- /opt/draios/logs/running
initialDelaySeconds: 90
periodSeconds: 3

0 comments on commit b8c3e33

Please sign in to comment.