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

Adding Ingress PathType #2

Closed
wants to merge 1 commit into from

Conversation

robscott
Copy link
Collaborator

@robscott robscott commented Nov 6, 2019

@robscott robscott changed the base branch from ingressv1 to ingressv1b December 10, 2019 23:23
@robscott robscott changed the base branch from ingressv1b to ingressv1 December 10, 2019 23:23
@robscott robscott changed the title [WIP] Adding Ingress PathType Adding Ingress PathType Dec 11, 2019
@robscott robscott marked this pull request as ready for review December 11, 2019 01:07
@robscott
Copy link
Collaborator Author

@cmluciano I think this is ready for review after #1 is merged in. If it's easier I can just merge all the things myself and review can happen on the main ingressv1 branch.

@robscott
Copy link
Collaborator Author

@cmluciano Thanks for merging that previous PR! I've rebased this on that and it should be ready for a look whenever you have time.

@cmluciano
Copy link
Owner

@robscott Have a review in progress that I will try to submit tomorrow.

@robscott
Copy link
Collaborator Author

Sounds good, thanks!

@robscott
Copy link
Collaborator Author

I've updated the implementation here to use the first approach/option I outlined in the corresponding enhancements PR here: kubernetes/enhancements#1413. Open to other options/approaches here, just wanted to get some reasonable validation in place.

@robscott robscott mentioned this pull request Dec 19, 2019
Copy link
Owner

@cmluciano cmluciano left a comment

Choose a reason for hiding this comment

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

Couple of nits and questions

pkg/apis/networking/types.go Outdated Show resolved Hide resolved
pkg/apis/networking/types.go Outdated Show resolved Hide resolved
pkg/apis/networking/types.go Outdated Show resolved Hide resolved
staging/src/k8s.io/api/networking/v1/types.go Outdated Show resolved Hide resolved
@robscott robscott force-pushed the ingressv1-pathtype branch 3 times, most recently from bab47ce to f6b4815 Compare December 20, 2019 01:14
Copy link

@thockin thockin left a comment

Choose a reason for hiding this comment

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

I only skimmed this for now.

How do we want to do API reviews on this branch? It seems like it would be easier to do them one concept at a time, rather than all of it together.

Assuming that is true, please ping me when the PRs are ready, and I'll review.

This one was just cursory and needs more detailed review.

pkg/apis/networking/types.go Show resolved Hide resolved
pkg/apis/networking/types.go Outdated Show resolved Hide resolved
pkg/apis/networking/types.go Outdated Show resolved Hide resolved
@robscott robscott force-pushed the ingressv1-pathtype branch 3 times, most recently from eab504d to ff8d5a6 Compare January 21, 2020 23:33
@robscott
Copy link
Collaborator Author

@cmluciano @thockin Thanks for the initial reviews! This is ready for another round of reviews when you have time.

pkg/apis/networking/types.go Show resolved Hide resolved
pkg/apis/networking/v1beta1/conversion.go Outdated Show resolved Hide resolved
pkg/apis/extensions/v1beta1/conversion.go Outdated Show resolved Hide resolved
pkg/apis/networking/validation/validation.go Outdated Show resolved Hide resolved
pkg/apis/networking/validation/validation.go Outdated Show resolved Hide resolved
if err != nil {
allErrs = append(allErrs, field.Invalid(fldPath.Child("paths").Index(i).Child("path"), rule.Path, "must be a valid regex"))

if *path.PathType == networking.PathTypeExact || *path.PathType == networking.PathTypePrefix {
Copy link

Choose a reason for hiding this comment

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

Is there more we can or should validate here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Potentially yes. The KEP does not specify any additional validation, but there could be value in at least validating that the characters provided for these path types are URL safe. Happy to add that here and in the KEP if you think it would be valuable. It doesn't seem like there is any universally safe limit we could apply to the length here, but open to ideas on what else would make sense to validate here.

pkg/apis/networking/validation/validation.go Show resolved Hide resolved
@cmluciano cmluciano self-assigned this Jan 29, 2020
@robscott robscott changed the base branch from ingressv1 to master January 30, 2020 23:39
@robscott
Copy link
Collaborator Author

Thanks for the reviews @cmluciano and @thockin! This is ready for another look whenever you have time.

@robscott robscott closed this Feb 12, 2020
cmluciano pushed a commit that referenced this pull request Jun 10, 2020
@robscott robscott deleted the ingressv1-pathtype branch March 11, 2021 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants