Skip to content

Commit

Permalink
OCPBUGS-22833: Vendor package update (openshift#39)
Browse files Browse the repository at this point in the history
* Add pod-iptables option to store pod iptables

This change introduces pod-iptables option to store iptables-rules
in pod's network namespace. This helps administrator/engineer to
troubleshooting.

* Fix owners file

* Update CI pipeline

* Add label to Dockerfile

* Update github action to simplify

* Use GITHUB_TOKEN for push packages

* Update slack URL in README

* fix workflows

* Fix some timing issue and change memory limit

* Add namespace check between pod and multi-networkpolicy

* Use TCP as default for Port.Protocol

Add ginkgo test to the suite with only default values.
Add `renderProtocol` function with fallback logic.

Signed-off-by: Andrea Panattoni <[email protected]>

* Fix to work namespacveSelector policy, without labelSelector

* Support for `NamespaceSelector` (openshift#16)

* 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 <[email protected]>

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

Signed-off-by: Andrea Panattoni <[email protected]>

* Improve logging in server.go (openshift#19)

* 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 <[email protected]>

* Improve error logging

Signed-off-by: Andrea Panattoni <[email protected]>

* Add IPv6 support in TODO list

* Set specific version for `revive` tool (openshift#20)

"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 <[email protected]>

* Log filter rules (openshift#23)

* 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 <[email protected]>

* Clean up logging code

Signed-off-by: Andrea Panattoni <[email protected]>

* Refine policy generation routine to support multiple policies

This change refines policy rule generation to introduce conntrack
and support multiple policies in a pod. Fix openshift#17 and openshift#18

* Fix capabilities (openshift#25)

fix openshift#24

* Update github action to fit to latest golang

* Remove docker from support runtime due to obsolated

* Bump github.com/containernetworking/cni from 0.7.1 to 0.8.1 (openshift#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] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump vendor packages.

* Graceful shutdown for daemonset (openshift#32)

* Remove unused errCh

`server.Run()` is not a blocking function and returns always `nil`.
There is no need for a struct field channel.

Signed-off-by: Andrea Panattoni <[email protected]>

* Allow stopping the server

Add signal handler for SIGTERM and SIGINT to main.go.
Add Stop() method to Options to forward os signals.
Add a channel to stop `syncRunner` and clean iptables afterward.

Signed-off-by: Andrea Panattoni <[email protected]>

Signed-off-by: Andrea Panattoni <[email protected]>

* Add sync-period option for fast sync

* Remove deprecated parameters in deploy.yml

* Add e2e test

* e2e-test: Add script to update server image (openshift#35)

Add a script to redeploy the server in the kind cluster. It is
useful to quickly test new changes without tearing down the
cluster and bringing it up again.

Signed-off-by: Andrea Panattoni <[email protected]>

Signed-off-by: Andrea Panattoni <[email protected]>

* Fix yaml syntax error in GH workflow (openshift#36)

Signed-off-by: Andrea Panattoni <[email protected]>

Signed-off-by: Andrea Panattoni <[email protected]>

* Add CodeQL workflow for GitHub code scanning (openshift#38)

Co-authored-by: LGTM Migrator <[email protected]>

* Add NOTICE file for Apache license 2.0 (openshift#39)

This change adds NOTICE file in repository as [1].

[1]: https://infra.apache.org/apply-license.html#new

* IPv6 support in multi-networkpolicy-iptables (openshift#40)

* Support IPv6 networks (openshift#27)

Make Server generates rules for both IP family.
Make iptableBuffer aware of the IP family it is managing, in
order to skip wrong addresses.

Add unit and e2e tests for IPv6 and dual stack networks.

Remove IPv6 item from TODO

Signed-off-by: Andrea Panattoni <[email protected]>

Signed-off-by: Andrea Panattoni <[email protected]>

* fix merge-conflict to rebase

* Add e2e ipv6 ingress tests

* IPv6 fix  for NDP and DHCPv6 (openshift#37)

* Add Requirements section to README

Signed-off-by: Andrea Panattoni <[email protected]>

* Allow ipv6 Neighbor Discovery Protocol

NDP leverages icmpv6 packets to discover hosts
IPv6 addresses. This kind of packet must be allowed
between hosts, otherwise some policy-allowed traffic
may get blocked.

Adjust unit tests expected output strings.

See https://www.rfc-editor.org/rfc/rfc2373

Signed-off-by: Andrea Panattoni <[email protected]>

* Allow DHCPv6 traffic

Signed-off-by: Andrea Panattoni <[email protected]>

* Refine icmp/dhcpv6 code

Signed-off-by: Andrea Panattoni <[email protected]>
Co-authored-by: Tomofumi Hayashi <[email protected]>

* Use string instead of byte in unit-test cases

In real code, use bytes for performance, however, we don't care
about performance for unit-test, hence change bytes to string
for ease of troubleshooting.

* Make INGRESS/EGRESS-COMMON configurable by command line option

This change makes MULTI-{INGRESS,EGRESS}-COMMON chain configurable
to provide a way to support various v4/v6 network.

* Fix CodeQL warnings

* Update docs/configurations.md

Co-authored-by: Nikhil Simha <[email protected]>

* Update docs/configurations.md

Co-authored-by: Nikhil Simha <[email protected]>

* Wait for sync between policy/iptables in e2e tests

---------

Signed-off-by: Andrea Panattoni <[email protected]>
Co-authored-by: Andrea Panattoni <[email protected]>
Co-authored-by: Nikhil Simha <[email protected]>

* Fix github action

* Avoid using cri-api `v1alpha2` (openshift#43)

As of v1.26.0 kubernetes removed support for api cri-api
v1alpha2
kubernetes/kubernetes#110618

Signed-off-by: Andrea Panattoni <[email protected]>

* Fix typo in container registry domain (openshift#44)

* Update go mod to security vulnerability

Update golang.org/x/text to v0.3.8 for vulnerability.

* Fix github action

* Update vendors to fix dependabot alerts

* Add ipblock bat tests in e2e (openshift#48)

This change introduces ipblock tests in e2e and enables v6
ingress tests in e2e as well.

* Fix iptables rules in multiple items in ingress/egress (openshift#49)

This change fixes iptables rules for multiple items
in ingress/egress. It also adds e2e tests for that.
fix openshift#45

* Update golang to 1.20

* Fix end2end tests (openshift#53)

* e2e: Save kind logs as artifacts

Saving `kind export logs` output when
end-to-end job fails helps debugging flakes
and test failures.

Signed-off-by: Andrea Panattoni <[email protected]>

* build: set CGO_ENABLED=0

Setting CGO_ENABLED=0 for go builds
produces GLIBC independant binaries.

Signed-off-by: Andrea Panattoni <[email protected]>

---------

Signed-off-by: Andrea Panattoni <[email protected]>

* Infer PolicyTypes if missing (openshift#50)

* Infer PolicyTypes if missing

In cases where Spec.PolicyTypes is not specified, it should
default to the existence of Ingress or Egress rules.

Updating end2end tests to cover also this scenario.

Signed-off-by: Andrea Panattoni <[email protected]>

* e2e: Wait for policy sync during setup

Signed-off-by: Andrea Panattoni <[email protected]>

---------

Signed-off-by: Andrea Panattoni <[email protected]>

* Bump google.golang.org/grpc from 1.38.0 to 1.53.0 (openshift#52)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.38.0 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.38.0...v1.53.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update e2e environments (openshift#54)

* Fix linter warning (openshift#55)

* Bump gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0 (openshift#57)

Bumps gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0.

---
updated-dependencies:
- dependency-name: gopkg.in/yaml.v3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/containernetworking/plugins from 0.8.5 to 0.8.6 (openshift#56)

Bumps [github.com/containernetworking/plugins](https://github.com/containernetworking/plugins) from 0.8.5 to 0.8.6.
- [Release notes](https://github.com/containernetworking/plugins/releases)
- [Commits](containernetworking/plugins@v0.8.5...v0.8.6)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update vendor and golang version (openshift#58)

* Bump google.golang.org/grpc from 1.53.0 to 1.56.3 (openshift#59)

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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update vendor packages (openshift#60)

---------

Signed-off-by: Andrea Panattoni <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Doug Smith <[email protected]>
Co-authored-by: Andrea Panattoni <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: lgtm-com[bot] <43144390+lgtm-com[bot]@users.noreply.github.com>
Co-authored-by: LGTM Migrator <[email protected]>
Co-authored-by: Nikhil Simha <[email protected]>
Co-authored-by: Peter Stöckli <[email protected]>
  • Loading branch information
8 people authored Nov 2, 2023
1 parent b5f5e0f commit dc64637
Show file tree
Hide file tree
Showing 72 changed files with 3,878 additions and 1,988 deletions.
12 changes: 7 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/onsi/gomega v1.10.1
github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
google.golang.org/grpc v1.53.0
google.golang.org/grpc v1.56.3
k8s.io/api v0.22.8
k8s.io/apimachinery v0.22.8
k8s.io/client-go v0.22.8
Expand All @@ -29,7 +29,7 @@ require (
github.com/go-logr/logr v0.4.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
Expand All @@ -41,15 +41,15 @@ require (
github.com/nxadm/tail v1.4.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down Expand Up @@ -93,3 +93,5 @@ replace (
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.22.8
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.22.8
)

replace github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.11.1
52 changes: 11 additions & 41 deletions go.sum

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion vendor/github.com/golang/protobuf/jsonpb/decode.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 0 additions & 71 deletions vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go

This file was deleted.

12 changes: 8 additions & 4 deletions vendor/golang.org/x/oauth2/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions vendor/golang.org/x/oauth2/internal/token.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 32 additions & 1 deletion vendor/golang.org/x/oauth2/oauth2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions vendor/golang.org/x/oauth2/token.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 19 additions & 6 deletions vendor/google.golang.org/grpc/CONTRIBUTING.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions vendor/google.golang.org/grpc/attributes/attributes.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/google.golang.org/grpc/balancer/balancer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dc64637

Please sign in to comment.