-
Notifications
You must be signed in to change notification settings - Fork 33
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
Authpolicy/v1beta3 #924
Conversation
8517495
to
14e4762
Compare
There was a problem hiding this 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
?
// 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 { |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this 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?
@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. |
@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. |
01d0322
to
1ac1104
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall 👍 Left 2 comments 🧑💻
1ac1104
to
cf84c59
Compare
api/v1beta3/authpolicy_types.go
Outdated
@@ -57,24 +54,10 @@ type AuthSchemeSpec struct { | |||
// Callback functions. | |||
// Authorino sends callbacks at the end of the auth pipeline to the endpoints specified in this config. | |||
// +optional | |||
// +kubebuilder:validation:MaxProperties=10 | |||
Callbacks map[string]CallbackSpec `json:"callbacks,omitempty"` | |||
} | |||
|
|||
type CommonAuthRuleSpec struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we remove this type too maybe? If we do, then types such as AuthenticationSpec
, MetadataSpec
, etc, can all go away, and get back to using directly their Authorino counterparts.
If you say too much would break in the current controllers and/or tests, never mind then. Rather, let's leave as-is. It won't matter too much anyway, since soon the entire reconciliation of AuthPolicies v1beta3 is about to be refactored (and the policy type itself by extension). I only mentioned in case it can help make the refactor cleaner later on, but it's your call.
Maybe I'm being naive here, but with this PR (unlike #875), we should be able to "just" |
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]>
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]>
Signed-off-by: Jim Fitzpatrick <[email protected]>
Signed-off-by: Jim Fitzpatrick <[email protected]>
Signed-off-by: Jim Fitzpatrick <[email protected]>
Signed-off-by: Jim Fitzpatrick <[email protected]>
754c701
to
0e7cb42
Compare
@guicassolato using sed would be the fastest way to do this, but there is reference to the route selectors in the guides. So it is not just a matter of doing a find and replace. I will work on that refactor now. That said I think we can merge the current changes without the docs update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
No problem, @Boomatang. If you prefer this way, I'm OK with it. Let's just make sure we don't cut a release of the Operator before fixing those references in the docs. Especially if the route selectors are mentioned, then IMO it's imperative that we remove them as soon as possible. cc @maleck13 |
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.