Skip to content

Conversation

meyskens
Copy link
Contributor

This PR updates our Gateway API to v0.7.0. This includes the new vendor changes as well as all fixes we needed to pass the additional conformance tests in individual commits.

Fixes: #25474

Support Gateway API v0.7.0

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label May 26, 2023
@meyskens meyskens added release-note/minor This PR changes functionality that users may find relevant to operating Cilium. area/servicemesh GH issues or PRs regarding servicemesh labels May 26, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels May 26, 2023
@meyskens meyskens force-pushed the meyskens/gatewayapi070 branch 6 times, most recently from a705072 to 741e3f8 Compare May 26, 2023 16:40
@meyskens meyskens marked this pull request as ready for review May 29, 2023 07:33
@meyskens meyskens requested review from a team as code owners May 29, 2023 07:33
@meyskens meyskens requested review from sayboras and youngnick May 29, 2023 07:33
@meyskens meyskens force-pushed the meyskens/gatewayapi070 branch from 741e3f8 to 801f311 Compare May 29, 2023 08:05
@meyskens meyskens requested review from a team as code owners May 29, 2023 11:14
@meyskens meyskens requested a review from viktor-kurchenko May 29, 2023 11:14
Copy link
Member

@sayboras sayboras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this, also cleaning up my bad code/mistake before 👍

@@ -92,6 +93,8 @@ func (r *httpRouteReconciler) SetupWithManager(mgr ctrl.Manager) error {
For(&gatewayv1beta1.HTTPRoute{}).
// Watch for changes to Backend services
Watches(&source.Kind{Type: &corev1.Service{}}, r.enqueueRequestForBackendService()).
// Watch for changes to Reference Grants
Watches(&source.Kind{Type: &gatewayv1beta1.ReferenceGrant{}}, r.enqueueRequestForRequestGrant()).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@sayboras
Copy link
Member

/test

@meyskens meyskens force-pushed the meyskens/gatewayapi070 branch 2 times, most recently from 64fc503 to e24f5d2 Compare May 29, 2023 14:50
@@ -45,6 +51,29 @@ func gatewayStatusAcceptedCondition(gw *gatewayv1beta1.Gateway, accepted bool, m
}
}

func gatewayStatusProgrammedCondition(gw *gatewayv1beta1.Gateway, scheduled bool, msg string) metav1.Condition {
switch scheduled {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering, why switch not if?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an adaptation from @sayboras's original code, not sure what his reasoning was :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah i might have started with some enum, and then refactored to bool, so switch might be just lazy refactor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have had an idea last night to re-factor this into 1 generic blob to re-use. But that is probably out of scope for this PR.

@meyskens meyskens force-pushed the meyskens/gatewayapi070 branch 2 times, most recently from 023ce23 to bace3b0 Compare May 30, 2023 12:22
@meyskens
Copy link
Contributor Author

/test

meyskens added 15 commits June 6, 2023 11:01
This status condition is now required to be set for Gateway API
conformance.
This status is now set once a gateway has valid config and has an
assidned address

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
This adds a count for the attachedroutes field in the gateway status.

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
Setting gatewayListenerAcceptedCondition is now required to pass
conformance

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
The new conformance tests now explicitly test for removed listeners to
be removed from the status.
We did not do this before, this adds a filter for that.

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
This change sets the resolved reference status to true when they have
been found.

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
when a section is demanded on a gateway reference we should check if it
actually exists. The conformace tests now check against this.

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
This renames the function to check reference grants for certificates to
a less generic name to avoid confusion with the one responsible for
checking route backends.

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
We previously did not perform checks for reference grants when
validating routes. This now extracts this check into a helper which is
re-used in both ingestion code as well as in the route validation code.

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
Previously we would check all references. This would cause the status of
the reference to be overritten in the last one was correct.

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
HTTPRoute is no logner a standard enabled feature in the conformace
tests, This adds this back in our CI tests

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
This PR adds correct ReferenceGrant checks into TLSRoute. It also adds a
check for resource kind in the helper function.

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
Improve the function arguments to the checked route is the last one.

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
This adds IsSecretReferenceAllowed to check the secret reference logic
in one place.

Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
Signed-off-by: Maartje Eyskens <maartje.eyskens@isovalent.com>
@sayboras sayboras force-pushed the meyskens/gatewayapi070 branch from b9a8be9 to 473e031 Compare June 6, 2023 01:02
@sayboras
Copy link
Member

sayboras commented Jun 6, 2023

/test

@sayboras
Copy link
Member

sayboras commented Jun 6, 2023

/test-1.16-4.19

@sayboras sayboras removed the dont-merge/preview-only Only for preview or testing, don't merge it. label Jun 6, 2023
@sayboras sayboras merged commit 1055d59 into cilium:main Jun 6, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jun 6, 2023
mhofstetter added a commit to mhofstetter/cilium that referenced this pull request Nov 6, 2023
This commit adds the missing reference-grant watch to the TLS route controller.

Fixes: cilium#25573 & cilium#25711

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
mhofstetter added a commit to mhofstetter/cilium that referenced this pull request Nov 8, 2023
This commit adds the missing reference-grant watch to the TLS route controller.

Fixes: cilium#25573 & cilium#25711

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
squeed pushed a commit that referenced this pull request Nov 10, 2023
This commit adds the missing reference-grant watch to the TLS route controller.

Fixes: #25573 & #25711

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
gandro pushed a commit to gandro/cilium that referenced this pull request Nov 15, 2023
[ upstream commit 30d3a6f ]

This commit adds the missing reference-grant watch to the TLS route controller.

Fixes: cilium#25573 & cilium#25711

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
sujoshua pushed a commit to sujoshua/cilium that referenced this pull request Nov 16, 2023
This commit adds the missing reference-grant watch to the TLS route controller.

Fixes: cilium#25573 & cilium#25711

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
gandro pushed a commit that referenced this pull request Nov 16, 2023
[ upstream commit 30d3a6f ]

This commit adds the missing reference-grant watch to the TLS route controller.

Fixes: #25573 & #25711

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
pjablonski123 pushed a commit to pjablonski123/cilium that referenced this pull request Dec 15, 2023
This commit adds the missing reference-grant watch to the TLS route controller.

Fixes: cilium#25573 & cilium#25711

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/servicemesh GH issues or PRs regarding servicemesh ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Gateway API to 0.7.0
4 participants