Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package route

import (
"k8s.io/apiserver/pkg/util/feature"
"k8s.io/component-base/featuregate"

openshiftfeatures "github.com/openshift/api/features"
routecommon "github.com/openshift/library-go/pkg/route"
)

Expand All @@ -21,7 +17,7 @@ var _ RouteValidationOptionGetter = &RouteValidationOpts{}
func NewRouteValidationOpts() *RouteValidationOpts {
return &RouteValidationOpts{
opts: routecommon.RouteValidationOptions{
AllowExternalCertificates: feature.DefaultMutableFeatureGate.Enabled(featuregate.Feature(openshiftfeatures.FeatureGateRouteExternalCertificate)),
Copy link
Member

Choose a reason for hiding this comment

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

Now that AllowExternalCertificates is always true; I think a proper cleanup would require removal of this field from the library-go as well.

https://github.com/openshift/library-go/blob/b6adacbfccda0d306d5a725c554bee0319d26f20/pkg/route/common.go#L20-L22

Copy link
Member Author

Choose a reason for hiding this comment

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

Just gave it a try: openshift/library-go#2122

AllowExternalCertificates: true,
Copy link
Member

Choose a reason for hiding this comment

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

Please amend the commit to use the UPSTREAM: <carry>: ... pattern (see the README.openshift.md file in the root dir for details).

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @bertinatto. Can you confirm if my new commit follows the expected pattern correctly?

Copy link
Member

Choose a reason for hiding this comment

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

Looks OK, @jcmoraisjr!

I'll tagging and leaving a hold so that Jacob can coordinate with the kube 1.35 merge.

@jacobsee feel free to remove the hold when you want to merge.

/lgtm
/remove-label backports/unvalidated-commits

Copy link
Member

Choose a reason for hiding this comment

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

@bertinatto given this structure is being removed in https://github.com/openshift/library-go/pull/2122/files I think this whole opts should be removed from here as well, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Wondering how far should we get on this - whether the supporting interface and struct implementation should be preserved (future use?), or the whole validation_opts.go removed altogether instead (PR more noisy).

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems we need to wait for library-go being merged first, since a refactored method is being caled here:

return routevalidation.ValidateRoute(ctx, routeObj, r.sarGetter().SubjectAccessReviews(), r.secretsGetter(), r.routeValidationOptsGetter().GetValidationOptions())

Merging library-go, then bump it on o/kubernetes later is a good move? Suggestions?

},
}
}
Expand Down