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 Namespace scoped NetworkPolicy CRD #775

Merged
merged 6 commits into from
Jun 4, 2020

Conversation

Dyanngg
Copy link
Contributor

@Dyanngg Dyanngg commented Jun 1, 2020

The scope of this PR is as follows:

  • Generate code for Antrea NP and ExternalEntity types
  • Add Antrea NetworkPolicy and ExternalEntity CRD yamls in dev mode
    OpenAPIv3 validation schema to validate NP spec and ensure AppliedTo and Priority (1-10000) fields are mandatory
  • Update RBAC for antrea-controller in dev mode
  • Add Antrea NetworkPolicy and ExternalEntity CRD types

@antrea-bot
Copy link
Collaborator

Thanks for your PR.
Unit tests and code linters are run automatically every time the PR is updated.
E2e, conformance and network policy tests can only be triggered by a member of the vmware-tanzu organization. Regular contributors to the project should join the org.

The following commands are available:

  • /test-e2e: to trigger e2e tests.
  • /skip-e2e: to skip e2e tests.
  • /test-conformance: to trigger conformance tests.
  • /skip-conformance: to skip conformance tests.
  • /test-networkpolicy: to trigger networkpolicy tests.
  • /skip-networkpolicy: to skip networkpolicy tests.
  • /test-windows-conformance: to trigger windows conformance tests.
  • /skip-windows-conformance: to skip windows conformance tests.
  • /test-all: to trigger all tests.
  • /skip-all: to skip all tests.

These commands can only be run by members of the vmware-tanzu organization.

pkg/apis/core/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/apis/core/v1alpha1/types.go Show resolved Hide resolved
@suwang48404 suwang48404 requested a review from tnqn June 3, 2020 05:43
@suwang48404
Copy link
Contributor

hi @tnqn @jianjuns

This PR is from Abishek, other than changing ExternalEndpoint to Endpoint, do u have any other comments that u'd like us to address?

Thx, Su

@Dyanngg Dyanngg force-pushed the ns-anp branch 5 times, most recently from d6b52dd to 1ed1e74 Compare June 3, 2020 18:53
pkg/apis/core/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/apis/core/v1alpha1/webhook.go Show resolved Hide resolved
- Nameport.protocol is no longer a pointer --> consistent with k8s core.servicePort
- ExternalEndPoint.ip is a string ---> so it is readable to end user.
- Add "omitempty" to all fields ---> we potentially can have some fields unset.
- added webhook methods ---> allows ExternalEntity to hookup to webhook service.
@Dyanngg Dyanngg requested a review from jianjuns June 3, 2020 23:24
@suwang48404
Copy link
Contributor

/test-all

@suwang48404
Copy link
Contributor

/test-e2e

@suwang48404
Copy link
Contributor

/test-windows-conformance

@suwang48404 suwang48404 merged commit 08a2198 into antrea-io:master Jun 4, 2020
GraysonWu pushed a commit to GraysonWu/antrea that referenced this pull request Sep 22, 2020
* Add API types for Namespaced Antrea NetworkPolicy

* Update priority to float64

Add new CRD yamls only when explicitly set.

* Update apigroup for ExternalEndpoint CRD

Move ExternalEndpoint to core group.

* Fix name mismatch for externalNode field

* Move security and core group to v1alpha1

Address comments.

* Minor patches to ANP CRD types

- Nameport.protocol is no longer a pointer --> consistent with k8s core.servicePort
- ExternalEndPoint.ip is a string ---> so it is readable to end user.
- Add "omitempty" to all fields ---> we potentially can have some fields unset.
- added webhook methods ---> allows ExternalEntity to hookup to webhook service.

Co-authored-by: Abhishek Raut <rauta@vmware.com>
Co-authored-by: Su Wang <suw@vmware.com>
GraysonWu pushed a commit to GraysonWu/antrea that referenced this pull request Sep 23, 2020
* Add API types for Namespaced Antrea NetworkPolicy

* Update priority to float64

Add new CRD yamls only when explicitly set.

* Update apigroup for ExternalEndpoint CRD

Move ExternalEndpoint to core group.

* Fix name mismatch for externalNode field

* Move security and core group to v1alpha1

Address comments.

* Minor patches to ANP CRD types

- Nameport.protocol is no longer a pointer --> consistent with k8s core.servicePort
- ExternalEndPoint.ip is a string ---> so it is readable to end user.
- Add "omitempty" to all fields ---> we potentially can have some fields unset.
- added webhook methods ---> allows ExternalEntity to hookup to webhook service.

Co-authored-by: Abhishek Raut <rauta@vmware.com>
Co-authored-by: Su Wang <suw@vmware.com>
@Dyanngg Dyanngg deleted the ns-anp branch October 29, 2020 18:38
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.

None yet

7 participants