-
Notifications
You must be signed in to change notification settings - Fork 137
Closed
Labels
area/gateway/coreRelates to all Core features of GatewayRelates to all Core features of GatewayenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersrefinedRequirements are refined and the issue is ready to be implemented.Requirements are refined and the issue is ready to be implemented.
Milestone
Description
When updating the status of the Gateway and setting the status for each listener (https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.GatewayStatus ), NKG doesn't preserve the order of the listeners as they appear in the spec https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.GatewaySpec
This is to a bug. However, preserving the order can help the user who reads the status to comprehend and navigate it more easily.
FIXME in the code https://github.com/nginxinc/nginx-gateway-kubernetes/blob/890fddb787ff3560b9b743647a36b649d498ae51/internal/status/gateway.go#L19
Examples:
Gateway:
apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
name: gateway
labels:
domain: k8s-gateway.nginx.org
spec:
gatewayClassName: nginx
listeners:
- name: first
port: 80
protocol: HTTP
hostname: "*.example.com"
- name: second
port: 80
protocol: HTTP
hostname: "*.example.org"
- name: third
port: 80
protocol: HTTP
hostname: "*.example.co.uk"
- name: fourth
port: 80
protocol: HTTP
hostname: "*.nginx.org"
- name: fifth
port: 80
protocol: HTTP
hostname: "*.f5.com"
Status for listeners:
Listeners:
Attached Routes: 0
Conditions:
Last Transition Time: 2023-07-07T17:40:34Z
Message: Listener is accepted
Observed Generation: 1
Reason: Accepted
Status: True
Type: Accepted
Last Transition Time: 2023-07-07T17:40:34Z
Message: Listener is programmed
Observed Generation: 1
Reason: Programmed
Status: True
Type: Programmed
Last Transition Time: 2023-07-07T17:40:34Z
Message: All references are resolved
Observed Generation: 1
Reason: ResolvedRefs
Status: True
Type: ResolvedRefs
Last Transition Time: 2023-07-07T17:40:34Z
Message: No conflicts
Observed Generation: 1
Reason: NoConflicts
Status: False
Type: Conflicted
Name: fifth
Supported Kinds:
Group: gateway.networking.k8s.io
Kind: HTTPRoute
Attached Routes: 0
Conditions:
Last Transition Time: 2023-07-07T17:40:34Z
Message: Listener is accepted
Observed Generation: 1
Reason: Accepted
Status: True
Type: Accepted
Last Transition Time: 2023-07-07T17:40:34Z
Message: Listener is programmed
Observed Generation: 1
Reason: Programmed
Status: True
Type: Programmed
Last Transition Time: 2023-07-07T17:40:34Z
Message: All references are resolved
Observed Generation: 1
Reason: ResolvedRefs
Status: True
Type: ResolvedRefs
Last Transition Time: 2023-07-07T17:40:34Z
Message: No conflicts
Observed Generation: 1
Reason: NoConflicts
Status: False
Type: Conflicted
Name: first
Supported Kinds:
Group: gateway.networking.k8s.io
Kind: HTTPRoute
Attached Routes: 0
Conditions:
Last Transition Time: 2023-07-07T17:40:34Z
Message: Listener is accepted
Observed Generation: 1
Reason: Accepted
Status: True
Type: Accepted
Last Transition Time: 2023-07-07T17:40:34Z
Message: Listener is programmed
Observed Generation: 1
Reason: Programmed
Status: True
Type: Programmed
Last Transition Time: 2023-07-07T17:40:34Z
Message: All references are resolved
Observed Generation: 1
Reason: ResolvedRefs
Status: True
Type: ResolvedRefs
Last Transition Time: 2023-07-07T17:40:34Z
Message: No conflicts
Observed Generation: 1
Reason: NoConflicts
Status: False
Type: Conflicted
Name: fourth
Supported Kinds:
Group: gateway.networking.k8s.io
Kind: HTTPRoute
Attached Routes: 0
Conditions:
Last Transition Time: 2023-07-07T17:40:34Z
Message: Listener is accepted
Observed Generation: 1
Reason: Accepted
Status: True
Type: Accepted
Last Transition Time: 2023-07-07T17:40:34Z
Message: Listener is programmed
Observed Generation: 1
Reason: Programmed
Status: True
Type: Programmed
Last Transition Time: 2023-07-07T17:40:34Z
Message: All references are resolved
Observed Generation: 1
Reason: ResolvedRefs
Status: True
Type: ResolvedRefs
Last Transition Time: 2023-07-07T17:40:34Z
Message: No conflicts
Observed Generation: 1
Reason: NoConflicts
Status: False
Type: Conflicted
Name: second
Supported Kinds:
Group: gateway.networking.k8s.io
Kind: HTTPRoute
Attached Routes: 0
Conditions:
Last Transition Time: 2023-07-07T17:40:34Z
Message: Listener is accepted
Observed Generation: 1
Reason: Accepted
Status: True
Type: Accepted
Last Transition Time: 2023-07-07T17:40:34Z
Message: Listener is programmed
Observed Generation: 1
Reason: Programmed
Status: True
Type: Programmed
Last Transition Time: 2023-07-07T17:40:34Z
Message: All references are resolved
Observed Generation: 1
Reason: ResolvedRefs
Status: True
Type: ResolvedRefs
Last Transition Time: 2023-07-07T17:40:34Z
Message: No conflicts
Observed Generation: 1
Reason: NoConflicts
Status: False
Type: Conflicted
Name: third
Supported Kinds:
Group: gateway.networking.k8s.io
Kind: HTTPRoute
Acceptance criteria:
- Preserve the order
Metadata
Metadata
Assignees
Labels
area/gateway/coreRelates to all Core features of GatewayRelates to all Core features of GatewayenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersrefinedRequirements are refined and the issue is ready to be implemented.Requirements are refined and the issue is ready to be implemented.