Skip to content

Commit

Permalink
[0.18] Readyness probe in broker ingress (knative#4483)
Browse files Browse the repository at this point in the history
* Fix knative#4473

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Massage the filter yaml

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
  • Loading branch information
slinkydeveloper authored and matzew committed Nov 7, 2020
1 parent 83b1de0 commit 92165a5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,18 @@ spec:
- name: filter
terminationMessagePolicy: FallbackToLogsOnError
image: ko://knative.dev/eventing/cmd/mtbroker/filter
livenessProbe:
readinessProbe: &probe
failureThreshold: 3
httpGet:
path: /healthz
port: 8080
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 2
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
<<: *probe
initialDelaySeconds: 5
resources:
requests:
cpu: 100m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,18 @@ spec:
- name: ingress
terminationMessagePolicy: FallbackToLogsOnError
image: ko://knative.dev/eventing/cmd/mtbroker/ingress
livenessProbe:
readinessProbe: &probe
failureThreshold: 3
httpGet:
path: /healthz
port: 8080
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 2
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
<<: *probe
initialDelaySeconds: 5
resources:
requests:
cpu: 100m
Expand Down
2 changes: 1 addition & 1 deletion pkg/mtbroker/ingress/ingress_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (h *Handler) getChannelAddress(name, namespace string) (string, error) {
}

func (h *Handler) Start(ctx context.Context) error {
return h.Receiver.StartListen(ctx, health.WithLivenessCheck(h))
return h.Receiver.StartListen(ctx, health.WithLivenessCheck(health.WithReadinessCheck(h)))
}

func (h *Handler) ServeHTTP(writer http.ResponseWriter, request *http.Request) {
Expand Down

0 comments on commit 92165a5

Please sign in to comment.