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

feat: implement L4 traffic matching #2

Closed
wants to merge 29 commits into from
Closed

Conversation

shaneutt
Copy link
Owner

@shaneutt shaneutt commented Jan 3, 2022

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

This implements GEP 735.

Does this PR introduce a user-facing change?:

- optional L4 traffic matching has been added for `TCPRoute` and `UDPRoute`

shaneutt and others added 29 commits December 2, 2021 16:23
A recent commit changed the directory name for the stable CRDs from
"v1alpha2" to "stable". The result is that CI I had running that was
deploying the CRDs via kustomize is now failing. This patch changes
the resource list of the kustomize configuration to point to the new
location of the CRDs.
Current docs explains about `spec.to.name` as:

```
Name is the name of the referent. When unspecified or empty, this policy
refers to all resources of the specified Group and Kind in the local
namespace.
```

However, the ReferencePolicy with empty value:

```shell
kubectl apply -f - <<EOF
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: ReferencePolicy
metadata:
  name: allow-gateways-to-ref-secrets
  namespace: default
spec:
  from:
  - group: gateway.networking.k8s.io
    kind: Gateway
    namespace: istio-system
  to:
  - group: ""
    kind: Secret
    name: ""
EOF
```

get the following error.

`The ReferencePolicy "allow-gateways-to-ref-secrets" is invalid: spec.to.name: Invalid value: "": spec.to.name in body should be at least 1 chars long`

It should be fine to support only "unspecified" case. So, this patch removes "empty" from docs.
Fix ReferencePolicy docs about empty value in `spec.to.name`
Signed-off-by: Nick Young <[email protected]>
Puts back controller-gen logic to generate the zz_generated.deepcopy.go
file for v1alpha2 CRDs.

Signed-off-by: Steve Sloka <[email protected]>
Update version of golangci-lint as well as remove deprecated linters.
Also creating new docs page to mirror GEP content.
…lines

Updating versioning guidelines to allow for bug fixes in patch releases
…-fix

Fixing bug where namespace could be unspecified in ReferencePolicy
* Validating HTTPRouteFilter type consistency

* fixing Makefile regression

* relaxing validation constraints to simplify switch statement

* adding default type validation

* refactoring validateHTTPRouteSpec

* fixing paths

* adding HTTPRouteFilter URLRewrite validation

* validating route filters are not empty

* simplying validation with validateHTTPRouteFilters

* removing reflect.DeepEqual as is not necessary

* validate route filters are not nil

* small fixes

* fixing empty filter test
The HTTPRoute validation tests were directly calling internal API
functions to try to pinpoint the set of tests that they expected to
be run. This is a risky pattern, because there's nothing that ensures
that the internal functions are actually wired up to the validation
logic correctly.

This change establishes a new pattern, where each test can set up fixtures
in theor own way (for the sake of brevity), but the test is always driven
by the top-level validation call. This exposed a number of bugs where
the validation functions were not wired up correctly.

In the future, this can be improved by updating the tests to supply
specific expecations on the returned errors rather than just the error
count.

Signed-off-by: James Peach <[email protected]>
@shaneutt shaneutt changed the title - feat: implement L4 traffic matching feat: implement L4 traffic matching Jan 3, 2022
@shaneutt shaneutt closed this Jan 3, 2022
shaneutt pushed a commit that referenced this pull request Sep 18, 2023
…Gateway to Backend...) Update with API details (kubernetes-sigs#2113)

* GEP-1897 Update with API details

* GEP-1897 Update with API details - suggested changes #1

* Update geps/gep-1897.md

Co-authored-by: Rob Scott <[email protected]>

* Update geps/gep-1897.md

Co-authored-by: Rob Scott <[email protected]>

* GEP-1897 Update with API details - suggested changes #2

* GEP-1897 Update with API details - suggested changes #3

* GEP-1897 Update with API details - suggested changes 4

* GEP-1897 Update with API details - suggested changes 5

* GEP-1897 Update with API details - suggested changes 7

* GEP-1897 Update with API details - suggested changes 8

* GEP-1897 Update with API details - suggested changes 9

* GEP-1897 Update with API details - suggested changes 10

* GEP-1897 Update with API details - suggested changes 11

---------

Co-authored-by: Rob Scott <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants