aws / aws-application-networking-k8s

A Kubernetes controller for Amazon VPC Lattice
https://www.gateway-api-controller.eks.aws.dev/
Apache License 2.0
175 stars 50 forks source link

The Route's status blindly change to ResolvedRefs==True even if the controller was NOT able to resolve all the object references for the Route #544

Closed zijun726911 closed 11 months ago

zijun726911 commented 1 year ago

The Route's status blindly change to ResolvedRefs==True even if the controller was NOT able to resolve all the object references for the Route

How to reproduce it: for the controller version v1.0.1

  1. kubectl apply -f examples/my-hotel-gateway.yaml
  2. Change the content of examples/inventory-route.yaml:
        apiVersion: gateway.networking.k8s.io/v1beta1
        kind: HTTPRoute
        metadata:
          name: inventory
        spec:
          parentRefs:
          - name: my-hotel
            sectionName: http
          rules:
          - backendRefs:
            - name: my-no-existing-service
              kind: Service
              port: 80
              weight: 10
  3. do kubectl apply -f examples/inventory-route.yaml
  4. Wait until the controller reconciled, I could see in the vpc lattice console that the lattice service inventory-default and serviceAssociation created successfully
  5. do kubectl get httproute inventory -o yaml I could see:
    status:
    parents:
    - conditions:
    - lastTransitionTime: "2023-11-24T21:14:23Z"
      message: 'DNS Name: inventory-default-09b2aa51cffc3ccf5.7d67968.vpc-lattice-svcs.us-west-2.on.aws'
      observedGeneration: 1
      reason: Accepted
      status: "True"
      type: Accepted
    - lastTransitionTime: "2023-11-24T21:14:23Z"
      message: 'DNS Name: inventory-default-09b2aa51cffc3ccf5.7d67968.vpc-lattice-svcs.us-west-2.on.aws'
      observedGeneration: 1
      reason: ResolvedRefs
      status: "True"
      type: ResolvedRefs
    controllerName: application-networking.k8s.aws/gateway-api-controller

    ResolvedRefs == True is not correct since my cluster don't have my-no-existing-service k8s Service. Also seem it miss the Programmed status

mikhail-aws commented 11 months ago

Route does not have Programmed status type. Only "Accepted", "PartiallyInvalid", "ResolvedRefs"