Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HTTPRoute status to match API standard #239

Merged
merged 1 commit into from
May 12, 2023

Conversation

solmonk
Copy link
Contributor

@solmonk solmonk commented May 10, 2023

What type of PR is this?

bug

Which issue does this PR fix:

This will make httproutes to be properly recognized as "accepted", in external integrations such as ExternalDNS.

What does this PR do / Why do we need it:

This is required if we go ExternalDNS integration path, and will also help later as we support more addons.

If an issue # is not available please add repro steps and logs from aws-gateway-controller showing the issue:

Testing done on this change:
In a manual test setting on kubectl get httproute byoc-parking -o yaml:

apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  annotations:
    application-networking.k8s.aws/lattice-assigned-domain-name: byoc-parking-default-04dbcef00d405a0fd.7d67968.vpc-lattice-svcs.us-west-2.on.aws
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"gateway.networking.k8s.io/v1beta1","kind":"HTTPRoute","metadata":{"annotations":{},"name":"byoc-parking","namespace":"default"},"spec":{"hostnames":["parking.my-test.com"],"parentRefs":[{"name":"my-hotel","sectionName":"http"}],"rules":[{"backendRefs":[{"kind":"Service","name":"parking-ver2","port":8090}]}]}}
  creationTimestamp: "2023-05-09T22:16:14Z"
  finalizers:
  - httproute.k8s.aws/resources
  generation: 1
  name: byoc-parking
  namespace: default
  resourceVersion: "1847234"
  uid: 32997b22-4b5e-4195-8373-92ea8ec8b6ab
spec:
  hostnames:
  - parking.my-test.com
  parentRefs:
  - group: gateway.networking.k8s.io
    kind: Gateway
    name: my-hotel
    sectionName: http
  rules:
  - backendRefs:
    - group: ""
      kind: Service
      name: parking-ver2
      port: 8090
      weight: 1
    matches:
    - path:
        type: PathPrefix
        value: /
status:
  parents:
  - conditions:
    - lastTransitionTime: "2023-05-09T22:16:39Z"
      message: 'DNS Name: byoc-parking-default-04dbcef00d405a0fd.7d67968.vpc-lattice-svcs.us-west-2.on.aws'
      reason: Accepted
      status: "True"
      type: Accepted
    controllerName: application-networking.k8s.aws/gateway-api-controller
    parentRef:
      group: gateway.networking.k8s.io
      kind: Gateway
      name: my-hotel

Automation added to e2e:

Will this PR introduce any new dependencies?:
no

Will this break upgrades or downgrades. Has updating a running cluster been tested?:

Does this PR introduce any user-facing change?:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@solmonk solmonk requested a review from liwenwu-amazon May 10, 2023 19:59
@coveralls
Copy link

coveralls commented May 10, 2023

Pull Request Test Coverage Report for Build 4940827311

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 31.941%

Totals Coverage Status
Change from base Build 4877197379: 0.0%
Covered Lines: 3196
Relevant Lines: 10006

💛 - Coveralls

@liwenwu-amazon
Copy link
Contributor

Can you re-run gateway API conformance test for this change?

@solmonk
Copy link
Contributor Author

solmonk commented May 10, 2023

Conformance test result was the same as the report - all previously passing tests were also passing.

@liwenwu-amazon
Copy link
Contributor

can u also make sure existing e2e test still passing? thanks

@solmonk
Copy link
Contributor Author

solmonk commented May 11, 2023

can confirm e2e test is still passing.

@solmonk solmonk merged commit 0843336 into aws:main May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants