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

Authpolicy/v1beta3 #924

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

Boomatang
Copy link
Contributor

@Boomatang Boomatang commented Oct 9, 2024

Closes: #809

This change introduces the AuthPolicy v1beta3.

The RouteSelector has being removed from the API. There is still work required to bring in the Section Name to the API.

In the Docs only the reference to the RouteSelector has being removed from the reference sections. The guides have not being updated to use v1betat3. I expect this to happen with or shortly after the adding of the Section Name.

A number of integration test have been removed which depend on or directly tested the behavior around the RouteSelector.

@Boomatang Boomatang added size/large area/api Changes user facing APIs labels Oct 9, 2024
@Boomatang Boomatang self-assigned this Oct 9, 2024
First pass at adding v1beta3.
This is not expected to compile.

Signed-off-by: Jim Fitzpatrick <[email protected]>
Signed-off-by: Jim Fitzpatrick <[email protected]>
Remove the reference to the RouteSelector from the reference docs.

Signed-off-by: Jim Fitzpatrick <[email protected]>
Signed-off-by: Jim Fitzpatrick <[email protected]>
Signed-off-by: Jim Fitzpatrick <[email protected]>
Copy link
Contributor

@guicassolato guicassolato left a comment

Choose a reason for hiding this comment

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

Can we also delete api/v1beta2/route_selectors.go?

@@ -1,4 +1,4 @@
package v1beta2
package v1beta3
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can also remove all +kubebuilder:validation:MaxProperties=10 markers. They were added to keep the CRD within the complexity budget when we first introduced reoute selectors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yap can update this. I expect this will should also effect some tests also.

// GetRulesHostnames
// in v1beta2 this returned the list of route selectors
// in v1beta3 this should work with section name, once implemented.
func (ap *AuthPolicy) GetRulesHostnames() []string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there anything left that still depends on this? Maybe it's required to fully implement some interface by the actual method is no longer being used? (I didn't check.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to dig a bit more into this one.

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 needs to be there to implement an interface

Copy link
Contributor

@KevFan KevFan left a comment

Choose a reason for hiding this comment

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

Looks good generally but I think there's some changes missing 🧑‍💻

Can we also update the api version of the guides where an AuthPolicy is used as it's now using the wrong api version?

Can we rename and update the authpolicy v1beta2 sample to v1beta3 so that the example is still shown in the generated csv?

@Boomatang
Copy link
Contributor Author

@KevFan The sample authpolicy that I can update no problem.

I don't feel updating the guides right now is the best thing to do right now. These guides will need to be again updated when the section name is introduced. I had the intentional decision not to update guides till we had the section name in place.

@Boomatang
Copy link
Contributor Author

Can we also delete api/v1beta2/route_selectors.go?

@guicassolato yes, I had it remove and reintroduced it when trying to fix test. I most have forgotten to remove it afterwards. It was never meant to make it into this PR.

Signed-off-by: Jim Fitzpatrick <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Changes user facing APIs size/large
Projects
Status: Ready For Review
Development

Successfully merging this pull request may close these issues.

AuthPolicy v1beta3
3 participants