Граф коммитов

118 Коммитов

Автор SHA1 Сообщение Дата
dependabot[bot] 8a80c8e776
deps: bump google.golang.org/grpc from 1.58.0 to 1.59.0 (#2325)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.0 to 1.59.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.58.0...v1.59.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-02 21:38:40 +00:00
dependabot[bot] a5405440af
deps: bump golang.org/x/net from 0.15.0 to 0.17.0 (#2293)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-01 10:01:20 -05:00
Quang Nguyen d34c61f940
feat: CNS RequestIPAddress branching for MT/V2 (#2300)
* fix overlay IPAM not reporting version

* revert file and var naming, add correct path to makefile

* proposal design for multitenant IPAM flow

* change podipinfo + linter issue

* pointer issues for printf

* update IPAM branching

* remove comments

* pod client placeholder

* address lint issue for httpservicefake

* getting pod info in validator

* linter issue

* update network container contract

* renaming

* mtpnc changes

* rebase

* revert file and var naming, add correct path to makefile

* add default route

* add unit tests

* update unit tests for ipam

* go get to fix linter

* go mod tidy

* update routes

* update routes

* remove stale comments + remove redundant method

* add contexts + change address type

* addressed review

* embedded client to mock + enum for address type

* fix error

* change addressType to NICType

* change isDefaultRoute to SkipDefaultRoutes

* address comments

* refractor: make changes according to cni/cns contract

* refractor: make adding route its own func + move swift v2 ipam branching to after normal ipam flow

* refractor: change vars naming

* refractor: more var naming

* test: add test for podv6cidr

* refractor: make the returning podIpInfo init cleaner in swiftv2.go

* refractor + tests: add contexts to ipconfigs req validators + set route tests

* refractor: change labels for swift v2 pods

* fix: fix swift v2 UT

* refractor: add v4/v6 distinction for service cidr

* rebase

* revert file and var naming, add correct path to makefile

* rebase

* revert file and var naming, add correct path to makefile

* change podipinfo + linter issue

* update IPAM branching

* pod client placeholder

* getting pod info in validator

* linter issue

* rebase

* revert file and var naming, add correct path to makefile

* refractor: fix conflicts

* refractor: revert podwatcher code changes

* docs: change comment

* refractor: change CIDR to CDIRs

* refractor: parse CIDRs as semicolons separated string from env in SetRoutes

* docs: add minor comment

* refractor: change separator for parsing CIDRs

* feat: add rbac roles

* fix: gofumpt

* fix: update clusterrole

* fix: add namespace to clusterrolebinding

* fix: UT

* fix: add labels toswift v2 clusterrole

* fix: release default ipconfig early if getting swiftv2 ipconfig failed

* test: add more UT

* fix: parsing MTPNC as CIDR instead

* fix: toggle skipDefaultRoutes for infraNic to true

* fix: add route for node cidr in ipv4 podipconfig

* feat: add node cidrs route

* fix: linter

* address comments

* fix: minor logs formatting

* feat: move cns yaml for swiftv2 scenario to a diff file + more logging for swiftv2middleware

* fix: log debugf to printf

* fix: add testmain to avoid nil pointer error for loggers

* Update azure-cns.yaml

Signed-off-by: Quang Nguyen <nguyenquang@microsoft.com>

* fix: move parseCIDRs to a common package, use net/netip instead of net

* fix: exhaustive all switch case for nic type

* fix: exhaustive all switch case for nic type

* refractor: change fmt.Errorf to errors.Wrapf

* fix: add mtpnc status check in validator + use netip package

* fix: minor

* revert: azure-cns.yaml

---------

Signed-off-by: Quang Nguyen <nddangquang@gmail.com>
Signed-off-by: Quang Nguyen <nguyenquang@microsoft.com>
2023-10-31 13:44:59 -04:00
Evan Baker 95cc2d6c47
chore: consolidate core dependencies upgrade (#2213)
* ci: bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* chore: root dependency updates

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-20 14:36:30 -07:00
Evan Baker 1adf24adb5
Add MTPNC reconciler for cache population in Swift V2 (#2164)
add mtpnc watcher

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
2023-08-28 18:50:01 +00:00
Evan Baker 06e3877cdf
Upgrade controller-runtime (#2162)
* upgrade controller-runtime

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>

* update build tools and regen crds

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>

* fix import conflict

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>

---------

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
2023-08-23 08:58:52 -07:00
estebancams 04566d5fca
implement zap for cni (#1933)
* feat: added logger package and replaced old log initialization for the new one

* feat: changed all log lines to new zap logger

* fix: typo

* Update azure-ipam/logger/logger.go

Co-authored-by: Timothy J. Raymond <timraymond@users.noreply.github.com>

* fix: adding constants to describe logger rotations constraints

* Renamed logger New method

* Replaced logAndSend method by log 1st and send then so we can use zap fields

* minor fixes

* added logger init for tests

* replaced Any by Error

* gci ipam_test

* fixed govet errors

* moved component to a zap field

* fixed linit issues

* added log mock

* fix: gci

* fix: added context for logger teardown

* Update cni/log/logger.go

Co-authored-by: Evan Baker <rbtr@users.noreply.github.com>

* moved logger init mock function

* fix: lint findings

---------

Co-authored-by: Esteban Capillo <estebancams@microsoft.com>
Co-authored-by: Timothy J. Raymond <timraymond@users.noreply.github.com>
Co-authored-by: Evan Baker <rbtr@users.noreply.github.com>
2023-07-03 12:01:47 -07:00
Evan Baker 21b5bbeaf5
fix: reconcile initial state from CRD regardless of existing podInfo (#2022)
* fix: reconcile initial state from CRD regardless of existing podInfo

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>

* fix: add test for no state and pending release in NNC

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>

* fix: add test for restoring state and pending release in NNC

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>

---------

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
2023-06-22 14:11:57 -05:00
Evan Baker 40022dab86
add retry to nnc update during scaledown (#1970)
* add retry to nnc update during scaledown

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>

* test for panic in pool monitor

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>

---------

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
2023-05-22 10:01:09 -07:00
dependabot[bot] a8fa438e82
deps: bump github.com/docker/docker from 20.10.8+incompatible to 20.10.24+incompatible (#1891) 2023-04-05 00:14:10 +00:00
dependabot[bot] 044f16dc15
deps: bump github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets from 0.7.1 to 0.11.0 (#1693) 2023-03-21 20:44:15 +00:00
dependabot[bot] b77f715274
deps: bump k8s.io/client-go from 0.26.1 to 0.26.3 (#1858) 2023-03-20 20:35:19 +00:00
dependabot[bot] 1b19e81bc7
deps: bump golang.org/x/crypto from 0.2.0 to 0.7.0 (#1836) 2023-03-14 20:00:16 +00:00
dependabot[bot] 2d1d551b72
deps: bump golang.org/x/net from 0.4.0 to 0.7.0 (#1813) 2023-03-06 20:20:08 +00:00
Evan Baker 1d390a1f75
remove vendor again (#1835)
* remove vendor (again)

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>

* update mockgen usage for novendor

Signed-off-by: GitHub <noreply@github.com>

---------

Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
Signed-off-by: GitHub <noreply@github.com>
2023-03-06 12:14:37 -06:00
dependabot[bot] e8d91c9e77
deps: bump google.golang.org/grpc from 1.50.1 to 1.52.0 (#1761) 2023-01-25 00:21:17 +00:00
dependabot[bot] 93497a5542
deps: bump github.com/labstack/echo/v4 from 4.9.0 to 4.10.0 (#1737) 2023-01-20 19:40:11 +00:00
dependabot[bot] e783f6437b
deps: bump github.com/spf13/cobra from 1.6.0 to 1.6.1 (#1759) 2023-01-12 21:40:42 +00:00
dependabot[bot] e981347d7b
deps: bump github.com/spf13/viper from 1.12.0 to 1.14.0 (#1753) 2023-01-11 18:37:03 +00:00
dependabot[bot] e86c188d46
deps: bump sigs.k8s.io/controller-runtime from 0.12.3 to 0.14.1 (#1749) 2023-01-11 00:37:46 +00:00
ZetaoZhuang e6eadd3379
feat: expose getHomeAzInfo api in cns to retrieve node home az infos from NMAgent (#1642) 2022-12-08 08:23:41 -08:00
dependabot[bot] 6cc023a13a
deps: bump go.uber.org/zap from 1.21.0 to 1.23.0 (#1637)
Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.21.0 to 1.23.0.
- [Release notes](https://github.com/uber-go/zap/releases)
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/zap/compare/v1.21.0...v1.23.0)

---
updated-dependencies:
- dependency-name: go.uber.org/zap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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>
2022-10-07 13:57:03 -05:00
dependabot[bot] 895aeb4223
deps: bump github.com/labstack/echo/v4 from 4.7.2 to 4.9.0 (#1641) 2022-10-04 02:36:56 +00:00
dependabot[bot] ef92188bf5
deps: bump google.golang.org/grpc from 1.47.0 to 1.49.0 (#1545) 2022-09-29 18:01:49 +00:00
dependabot[bot] 9ea291a1cb
deps: bump github.com/Azure/azure-sdk-for-go/sdk/azcore from 1.1.0 to 1.1.3 (#1573) 2022-09-29 16:19:03 +00:00
Evan Baker 2417b7effc
update github.com/containernetworking/cni (#1537)
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
2022-08-22 09:15:53 -07:00
Quang Nguyen 877970022a
Fix CNS Program iptables for delegated IPAM (#1499)
* rebase

* rebase

* rebase

* adding snat iptables rules using coreos lib

* fix iptables cmd not running

* docs

* added conflist back

* change chain name from SWIFT to SWIFT-POSTROUTING

* update go.mod

* split internalapi into linux and windows

* add imports

* fix iptables programming login

* fix iptables programming logic

* change program iptables rules logic
2022-08-15 13:00:32 -07:00
QxBytes d57e24ee25
feat: Add native linux endpoint client to prep removing OVS (#1471)
* Native Endpoint Client Add Endpoints

* AddEndpointRules, ConfigureContainerInterfacesAndRoutes

* Changed interface names, log statements

nw.extIf.Name > eth0 (eth0)
eth0.vlanid > eth0.X (eth0.1)
%s%s hostIfName > vnet (A1veth0)
%s%s-2 contIfName > container (B1veth0)

* Renaming, using lib to set ns

* Namespace "path" is /var/run/netns/<NS>

* Loopback set up, Remove auto kernel subnet route

* Cannot set link to up if it's in another NS

* Multiple containers on same VNET NS

* Delete Endpoint routes on Delete

* Minimizing netns usage

* Moving NS Exec Code

* Further minimized netns.Set usage

* Moved helper methods down, drafted tests

* Removed DevName from Route Info, more tests

* Test existing vnet ns, delete endpoint

* NetNS interface for testing

* Separated tests by namespace

* Endpoints delete if they cannot be moved into NS

* Namespace netns tests

* Added Native Client to deleteEndpointImpl

* Deletion of Endpoints Impl and Tests

* Cleaned code (Tests ok)

* Moved mock/netns to package (Tests ok)

* Fixing Netns (wip)

Moved netnsinterface to consumer package (network).
Removed "Netns" from "NewNetns" and "NewMockNetns" as it is unambiguous.
Changed uintptr to int and casted the int to uintptr when needed later.

* Using errors.Wrap for error context (wip)

* Removed sentence case (wip)

* Removing variable predeclaration

* Removed NewNativeEndpointClient

Directly instantiating struct because nothing special happens in NewNativeEndpointClient

* Removed generics from ExecuteInNS

* Removed uintptr from mocknetns, tests compile

Forgot to remove uintptr from mocknetns

* Fix tests, lint

* Fixes from linter

Works on VMSS

* Replacing references to ethX with vlan veth

* Removed unnecessary log

* Removed unnecessary mac, fix tests

* Mockns method name enum

* Unable to use GetNetworkInterfaceByName due to NS

If I use GetNetworkInterface, I need to be in the vnet NS, but that means I will need to call ExecuteInNS, which causes tests to fail.

* Fixes from linter

* Assume if NS exists, vlan veth exists

Tests ok

* Fixes for Linter

* Fix delete tests

* Fix delete tests bug

* Go mod tidy for linting

Hopefully this fixes the windows lint error

* No lint on vishvananda netns

Maybe this will fix the windows linter?

* Build linux only for netns package

Maybe this fixes the linter error?

* Remove nolint to see if linter fails

* Moved netns interface to caller, generalized tests

Tests ok, Native ok

* Typos

* Reordered if statement, unwrapped arp

Tests ok, ping ok, wget ok

* Renamed veth, fixed logs

* Made deleteEndpoints logic clearer, renamed error

* Renamed eth0 to primaryHostIfName, vlanEth to vlanIf
2022-08-02 14:54:10 -07:00
dependabot[bot] b931932b2d
deps: bump sigs.k8s.io/controller-runtime from 0.12.2 to 0.12.3 (#1457) 2022-07-09 01:53:59 +00:00
dependabot[bot] 4a92ecaca2
deps: bump github.com/stretchr/testify from 1.7.5 to 1.8.0 (#1451) 2022-07-08 20:35:57 +00:00
dependabot[bot] fa487c4255
deps: bump github.com/hashicorp/go-version from 1.5.0 to 1.6.0 (#1447) 2022-06-30 17:51:48 +00:00
dependabot[bot] 99b22a61cd
deps: bump github.com/stretchr/testify from 1.7.4 to 1.7.5 (#1444) 2022-06-27 18:51:46 +00:00
dependabot[bot] a483949463
deps: bump sigs.k8s.io/controller-runtime from 0.12.1 to 0.12.2 (#1445) 2022-06-27 17:36:39 +00:00
dependabot[bot] a539bbd3bb
deps: bump k8s.io/klog/v2 from 2.60.1 to 2.70.0 (#1443) 2022-06-24 18:00:49 +00:00
dependabot[bot] 4c706bd4cf
deps: bump github.com/stretchr/testify from 1.7.1 to 1.7.4 (#1438) 2022-06-22 19:08:43 +00:00
dependabot[bot] 0e1b1bcb1c
deps: bump github.com/spf13/cobra from 1.4.0 to 1.5.0 (#1439) 2022-06-22 15:56:47 +00:00
dependabot[bot] 88e2e74c99
deps: bump k8s.io/apiextensions-apiserver from 0.24.1 to 0.24.2 (#1434) 2022-06-21 01:12:01 +00:00
dependabot[bot] 15c7240fa9
deps: bump k8s.io/client-go from 0.24.1 to 0.24.2 (#1436) 2022-06-19 21:28:35 +00:00
dependabot[bot] eff7baaec4
deps: bump github.com/Azure/azure-sdk-for-go/sdk/azidentity (#1433) 2022-06-18 00:40:43 +00:00
dependabot[bot] c3728ea20c
deps: bump github.com/Azure/azure-sdk-for-go/sdk/azcore (#1435) 2022-06-17 19:13:44 +00:00
Ramiro 69f851a25a
adding a cert refresher construct (#1426) 2022-06-16 23:32:33 +00:00
dependabot[bot] f6e7863a77
deps: bump google.golang.org/grpc from 1.46.2 to 1.47.0 (#1408) 2022-06-07 16:02:43 +00:00
dependabot[bot] 344a356386
deps: bump github.com/Azure/azure-sdk-for-go/sdk/azcore (#1422) 2022-06-06 22:28:09 +00:00
Ramiro 5e6f76aaf7
Adding Keyvault Shim (#1346)
* adding az sdk dependencies and tidying mod file

* adding keyvault shim

* example usage application for kv shim

* adding tests, cleaning up

* fixing linter errors

* updating go mod
2022-06-03 00:21:57 +00:00
dependabot[bot] 0419391153
deps: bump github.com/spf13/viper from 1.11.0 to 1.12.0 (#1407) 2022-05-27 22:11:25 +00:00
dependabot[bot] 4d4e07cfbd
deps: bump k8s.io/apiextensions-apiserver from 0.24.0 to 0.24.1 (#1404) 2022-05-27 18:35:19 +00:00
dependabot[bot] 2c3f9fb0ca
deps: bump k8s.io/client-go from 0.24.0 to 0.24.1 (#1405) 2022-05-26 21:40:30 +00:00
dependabot[bot] 642d361a73
deps: bump github.com/prometheus/client_golang from 1.12.1 to 1.12.2 (#1379) 2022-05-26 02:00:17 +00:00
dependabot[bot] 4a599154ee
deps: bump github.com/hashicorp/go-version from 1.4.0 to 1.5.0 (#1393) 2022-05-19 20:45:10 +00:00
dependabot[bot] 47268cca62
deps: bump sigs.k8s.io/controller-runtime from 0.12.0 to 0.12.1 (#1388)
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.12.0 to 0.12.1.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md)
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.12.0...v0.12.1)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-19 10:40:11 -05:00