-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to disable probe #1519
Allow to disable probe #1519
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1519 +/- ##
==========================================
- Coverage 79.22% 79.10% -0.12%
==========================================
Files 40 40
Lines 1800 1809 +9
==========================================
+ Hits 1426 1431 +5
- Misses 272 275 +3
- Partials 102 103 +1
☔ View full report in Codecov by Sentry. |
@@ -183,6 +184,11 @@ func replaceProbes(override *base.WorkloadOverride, ps *corev1.PodTemplateSpec) | |||
FailureThreshold: override.FailureThreshold, | |||
TerminationGracePeriodSeconds: override.TerminationGracePeriodSeconds, | |||
} | |||
if *overrideProbe == (v1.Probe{}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if my logic got something wrong:
Line 179 overrideProbe := &v1.Probe{...}, *overrideProbe is for sure equal to (v1.Probe{}). so Line 192 will never reach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L192 will still reachable.
- The new logic happens only when users didn't specify any override probe. (=
overrideProbe
is empty.) - L192 will be reached when users specify some override probe && the target manifest does not have any probe. (=
overrideProbe
is not empty but the manifest'scontainers[i].ReadinessProbe
is empty.)
@@ -204,6 +210,11 @@ func replaceProbes(override *base.WorkloadOverride, ps *corev1.PodTemplateSpec) | |||
FailureThreshold: override.FailureThreshold, | |||
TerminationGracePeriodSeconds: override.TerminationGracePeriodSeconds, | |||
} | |||
if *overrideProbe == (v1.Probe{}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same to the above comment.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: houshengbo, nak3 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Proposed Changes
Currently it is not possible to disable {readiness,liveness}Probes. It is a problem for kourier gateway.
(Kourier's proble uses admin interface so users cannot change the admin config (
admin.address
) for debug without disabling the probe. More specifically please find/tmp/envoy.admin
in bootstrap.yaml and 300-gateway.yaml)Hence this patch changes to disable probe when users explicitly set the empty overrideProbe.
For example, if they have the following setting:
then, drop livenessProbes from 3scale-kourier-gateway deployment.
Release Note