envoyproxy / envoyproxy/gateway
HTTPRoute status updater does not remove non-targeted Gateway
- Dominant language
- Go
- Stars
- 3k
- Forks
- 864
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 140
Description
*Description*:
>What issue is being seen? Describe what should be happening instead of
the bug, for example: The expected value isn't returned, etc.
If the HTTPRoute targeted a Gateway resource (`spec.parentRefs`) but then it does not target it anymore, the `status.parents` still has reference to the non-targeted Gateway in it.
In the example below, the `gateway-notfound` is not in the `spec.parentRefs` anymore, but is still present in the `status.parents`.
```
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
...
spec:
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: gateway-1
namespace: envoy-gateway-ns
sectionName: https
...
status:
parents:
- conditions:
...
parentRef:
group: gateway.networking.k8s.io
kind: Gateway
name: gateway-notfound
namespace: envoy-gateway-ns
sectionName: https
- conditions:
...
parentRef:
group: gateway.networking.k8s.io
kind: Gateway
name: gateway-1
namespace: envoy-gateway-ns
sectionName: https
```
Found it through the EG dashboards, where Targeted Parents show 8 but the Attached Parents is a higher number (9)
*Repro steps*:
> Include sample requests, environment, etc. All data and inputs
required to reproduce the bug.
>**Note**: If there are privacy concerns, sanitize the data prior to
sharing.
*Environment*:
>Include the environment like gateway version, envoy version and so on.
*Logs*:
>Include the access logs and the Envoy logs.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.