Skip to content

bug: Control API does not return health check data (RC5 in standalone mode) #2630

@kayx23

Description

@kayx23

Current Behavior

When using standalone mode, Control API does not return health check data.

Image

Expected Behavior

When using etcd, Control API returns meaningful health check data:

Image

Standalone mode should return health check data as well.

Steps to Reproduce

  1. Start RC5 in standalone mode
  2. Start two sample upstream services (e.g. nginx)
  3. Configure a route to the upstream with health check:
apiVersion: apisix.apache.org/v2
kind: ApisixUpstream
metadata:
  namespace: ingress-apisix
  name: nginx
spec:
  ingressClassName: apisix
  externalNodes:
  - type: Domain
    name: nginx1
    port: 8080
  - type: Domain
    name: nginx2
    port: 8081
  healthCheck:
    active:
      type: http
      httpPath: /
      healthy:
        interval: 2s
        successes: 1
      unhealthy:
        interval: 1s
        timeout: 3
---
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
  namespace: ingress-apisix
  name: example-hc-route
spec:
  ingressClassName: apisix
  http:
  - name: nginx-hc
    match:
      paths:
      - /
    upstreams:
    - name: nginx
  1. Enable the Control API service and port-forward.
helm get values -n ingress-apisix apisix --all > values.yaml

update values file sections:

apisix:
  enabled: true
control:
  enabled: true

helm upgrade:

helm upgrade -n ingress-apisix apisix apisix/apisix -f values.yaml

port forward:

kubectl port-forward service/apisix-control 9090:9090 &
  1. send a request to the route to start health check:
curl "http://127.0.0.1:9080/"
  1. check health check data using Control API:
curl "http://127.0.0.1:9090/v1/healthcheck"

Environment

RC5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions