Skip to content

Active Health check requires expectedStatuses field to work #4089

@luvk1412

Description

@luvk1412

Description:

According to HTTPActiveHealthChecker, expectedStatuses is not required, but if we create a BTP without this field, policy gets accepted but following error logs can be seen in envoy gateway and active health check also doesn't work.

2024-08-20T22:35:46.590Z	ERROR	gateway-api	runner/runner.go:186	unable to validate xds ir, skipped sending it	{"runner": "gateway-api", "error": "field HTTPHealthChecker.ExpectedStatuses should be specified\nfield HTTPHealthChecker.ExpectedStatuses should be specified"}
2024-08-20T22:35:46.590Z	ERROR	watchable	message/watchutil.go:56	observed an error	{"runner": "gateway-api", "error": "field HTTPHealthChecker.ExpectedStatuses should be specified\nfield HTTPHealthChecker.ExpectedStatuses should be specified"}

Repro steps:

Create a BTP with following config and observe eg logs

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
  name: btp
spec:
  targetRef:
    group: gateway.networking.k8s.io
    kind: HTTPRoute
    name: backend-routes
  healthCheck:
    active:
      type: HTTP
      http:
        path: /status

Expectation

Either of the below 2:

  • Default should be added as it is not being added, or
  • Change the expectedStatuses to be a required field and hence policy should not get accepted if not mentioned

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions