Skip to content

Conversation

@zeeke
Copy link
Contributor

@zeeke zeeke commented Oct 11, 2024

This PR contains no changes but is needed to avoid conflicts in future merge syncs.

Until now, changes have been pulled from u/s using git cherry picks, which might bring errors.

After this PR, change can be pulled downstream with

$ git remote -v
openshift       https://github.com/openshift/multus-networkpolicy.git (fetch)
openshift       https://github.com/openshift/multus-networkpolicy.git (push)
upstream        https://github.com/k8snetworkplumbingwg/multi-networkpolicy-iptables.git (fetch)
upstream        https://github.com/k8snetworkplumbingwg/multi-networkpolicy-iptables.git (push)

$ git switch -c ds-merge-sync openshift/masterr
$ git merge upstream/master

cc @pliurh @bpickard22

s1061123 and others added 30 commits February 10, 2021 02:22
This change introduces pod-iptables option to store iptables-rules
in pod's network namespace. This helps administrator/engineer to
troubleshooting.
…tables

Add pod-iptables option to store pod iptables
Fix some timing issue and change memory limit
Add namespace check between pod and multi-networkpolicy
Add ginkgo test to the suite with only default values.
Add `renderProtocol` function with fallback logic.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
Use TCP as default for Port.Protocol
Fix to work namespacveSelector policy, without labelSelector
* Add test case for namespace selector

The case is about having two namespaces with pods
and net-attach-def and a multi networkpolicy that
goes through namespace borders.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>

* Add test case with net-attach-def in other ns

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
* Add object information to update events

This should make it clearer what k8s object the
daemon is working on.

Increase verbosity threshlod for invoke handlers logs.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>

* Improve error logging

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
"go getting" github.com/mgechev/revive can lead to unreproducible
builds, as it download the latest "dev" version. Stick to the latest
(v1.2.1) version.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
* Log filter rules

Logging iptables rules before applying them
can be useful to debug complex scenarios.
Setting verbosity level to 6 as they can be
quite cumbersome.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>

* Clean up logging code

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
This change refines policy rule generation to introduce conntrack
and support multiple policies in a pod. Fix openshift#17 and openshift#18
Refine policy generation routine to support multiple policies
Update github action to fit to latest golang
Remove docker from support runtime due to obsolated
…t#31)

Bumps [github.com/containernetworking/cni](https://github.com/containernetworking/cni) from 0.7.1 to 0.8.1.
- [Release notes](https://github.com/containernetworking/cni/releases)
- [Commits](containernetworking/cni@v0.7.1...v0.8.1)

---
updated-dependencies:
- dependency-name: github.com/containernetworking/cni
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot bot and others added 10 commits November 2, 2023 16:09
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps google.golang.org/protobuf from 1.30.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
If a policy rule has a `from` (or `to`) selector that matches no pods,
the subject pod has to not be reached by  (or has to not reach) any pods.

The following example helps clarify the reasons behind these:
Given a scenario  with 3 pods (A, B, C) and a rule like:
```
podSelector:
    matchLabels:
      name: A
  ingress:
  - from:
    - podSelector:
        matchLabels:
          name: B
  policyTypes:
  - Ingress
```
Pod A can be reached only by pod B. Pod C can't reach A, and this has to be
ensured even if pod B is deleted.

Add an end-to-end test case to validate this scenario and adjust unit
tests accordingly.

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
Make sure that policies with no valid peers are enforced
@bpickard22
Copy link
Contributor

/approve

@bpickard22
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 25, 2024
@zeeke zeeke closed this Oct 26, 2024
@zeeke zeeke reopened this Oct 26, 2024
Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed lgtm Indicates that a PR is ready to be merged. labels Oct 30, 2024
@zeeke
Copy link
Contributor Author

zeeke commented Oct 30, 2024

Sounds like a bare minimum file change is needed to make Prow merge PRs.
Added 3fef088

@openshift-ci
Copy link

openshift-ci bot commented Oct 30, 2024

@zeeke: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@cgoncalves
Copy link

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 31, 2024
@openshift-ci
Copy link

openshift-ci bot commented Oct 31, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bpickard22, cgoncalves, zeeke

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

The pull request process is described here

Details 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

@openshift-merge-bot openshift-merge-bot bot merged commit 82c7731 into openshift:master Oct 31, 2024
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: multus-networkpolicy
This PR has been included in build ose-multus-networkpolicy-container-v4.18.0-202410311337.p0.g82c7731.assembly.stream.el9.
All builds following this will include this PR.

@zeeke zeeke mentioned this pull request Feb 4, 2025
zeeke added a commit to zeeke/multus-networkpolicy that referenced this pull request Mar 4, 2025
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants