gloo icon indicating copy to clipboard operation
gloo copied to clipboard

Advanced Http Health Check JSON values are quoted

Open dhawton opened this issue 2 years ago • 0 comments

Gloo Edge Version

1.10.x (latest stable)

Kubernetes Version

1.21.x

Describe the bug

When using advanced http healthchecks, JSON parsed body keys have quotations that must be checked in the regex.

Steps to reproduce the bug

  1. Deploy a cluster with httpbin
  2. Add a healthcheck to the following:
  healthChecks:
  - healthyThreshold: 1
    interval: 1s
    timeout: 10s
    unhealthyThreshold: 1
    httpHealthCheck:
      path: /get
      responseAssertions:
        noMatchHealth: degraded
        responseMatchers:
        - matchHealth: unhealthy
          responseMatch:
            body: {}
            jsonKey:
              path:
              - key: origin
            regex: ^10\.8\.0\.20$
  1. The upstream will be marked degraded (per the noMatchHealth setting)
  2. Now change the regex to ^"10.8.0.20"$ and you'll notice the upstream is marked as unhealthy again as expected

Expected Behavior

Quotes shouldn't need to be checked for, or if they are, circumstances where they are should be documented.

Additional Context

No response

dhawton avatar Mar 22 '22 17:03 dhawton