Skip to content

Commit

Permalink
[0.18] Readyness probe in broker ingress (#4483)
Browse files Browse the repository at this point in the history
* Fix #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 Nov 6, 2020
1 parent 650a0f8 commit 911edb6
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 911edb6

Please sign in to comment.