Skip to content

Commit 877f6a6

Browse files
committed
agent: test liveness probe
1 parent 3a7330c commit 877f6a6

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

charts/agent/templates/agent-deploy.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ spec:
112112
readOnly: true
113113
subPath: lb-config.json
114114
{{- end }}
115-
{{- if and .livenessProbe .livenessProbe.enabled }}
115+
{{- if .livenessProbe }}
116+
{{- if .livenessProbe.enabled }}
116117
livenessProbe:
117118
{{- if .livenessProbe.exec }}
118119
exec:
@@ -134,6 +135,7 @@ spec:
134135
failureThreshold: {{ .livenessProbe.failureThreshold }}
135136
{{- end }}
136137
{{- end }}
138+
{{- end }}
137139
volumes:
138140
{{- if .clientCertSecret }}
139141
- name: tls

charts/agent/tests/agent-livenessprobe_test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ tests:
2929
asserts:
3030
- isKind:
3131
of: Deployment
32-
- exists:
32+
- isNotNull:
3333
path: spec.template.spec.containers[0].livenessProbe
3434
- equal:
3535
path: spec.template.spec.containers[0].livenessProbe.initialDelaySeconds
@@ -55,7 +55,7 @@ tests:
5555
asserts:
5656
- isKind:
5757
of: Deployment
58-
- notExists:
58+
- isNull:
5959
path: spec.template.spec.containers[0].livenessProbe
6060

6161

0 commit comments

Comments
 (0)