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

add support for Ingress pathType #1772

Merged
merged 1 commit into from
Feb 19, 2021

Conversation

M00nF1sh
Copy link
Collaborator

@M00nF1sh M00nF1sh commented Jan 22, 2021

Add support for Ingress pathType introduced in K8s 1.18+: https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types

  1. The pathType will default to be ImplementationSpecific if unspecified.
  2. For ImplementationSpecific PathType:
    1. path can contain wildcards: "*" or "?"
    2. the generated path pattern will be same as path specified in IngressSpec
  3. For Exact PathType:
    1. path shouldn't contains any wildcards: "*" or "?"
    2. the generated path pattern will be same as path specified in IngressSpec.
  4. For Prefix PathType:
    1. path shouldn't contains any wildcards: "*" or "?"
    2. for /, the generated path pattern will be "/*"
    3. for /abc/def, the generated path pattern will be "/abc/def" and "/abc/def/*"
    4. for /abc/def/, the generated path pattern will be "/abc/def" and "/abc/def/*"

Test done:

  1. unit tests
  2. tested with Ingresses with path & path type defined in UTs, and observed the desired behaviors.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 22, 2021
@codecov-io
Copy link

codecov-io commented Jan 22, 2021

Codecov Report

Merging #1772 (d8a4fc7) into main (dd8f8c6) will increase coverage by 0.18%.
The diff coverage is 92.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1772      +/-   ##
==========================================
+ Coverage   47.14%   47.32%   +0.18%     
==========================================
  Files         110      110              
  Lines        6033     6058      +25     
==========================================
+ Hits         2844     2867      +23     
- Misses       2926     2927       +1     
- Partials      263      264       +1     
Impacted Files Coverage Δ
pkg/ingress/model_build_listener_rules.go 44.52% <92.30%> (+9.80%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd8f8c6...d8a4fc7. Read the comment docs.

@M00nF1sh
Copy link
Collaborator Author

/test pull-aws-load-balancer-controller-e2e-test

2 similar comments
@M00nF1sh
Copy link
Collaborator Author

/test pull-aws-load-balancer-controller-e2e-test

@M00nF1sh
Copy link
Collaborator Author

/test pull-aws-load-balancer-controller-e2e-test

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kishorj, M00nF1sh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 19, 2021
@M00nF1sh M00nF1sh added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 19, 2021
@k8s-ci-robot k8s-ci-robot merged commit 59b6a88 into kubernetes-sigs:main Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants