diff --git a/config/brokers/mt-channel-broker/deployments/broker-filter.yaml b/config/brokers/mt-channel-broker/deployments/broker-filter.yaml index 6b07a6fb069..13bce767bf7 100644 --- a/config/brokers/mt-channel-broker/deployments/broker-filter.yaml +++ b/config/brokers/mt-channel-broker/deployments/broker-filter.yaml @@ -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 diff --git a/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml b/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml index d342e4b6f83..d95bcc84aac 100644 --- a/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml +++ b/config/brokers/mt-channel-broker/deployments/broker-ingress.yaml @@ -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 diff --git a/pkg/mtbroker/ingress/ingress_handler.go b/pkg/mtbroker/ingress/ingress_handler.go index 7fb0d73d4df..baef7a848f0 100644 --- a/pkg/mtbroker/ingress/ingress_handler.go +++ b/pkg/mtbroker/ingress/ingress_handler.go @@ -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) {