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

19 Коммитов

Автор SHA1 Сообщение Дата
Paul Yu fc933e2453
Add UTs for CNI Windows Policy (#2965)
* enhance cni policy UTs

* add UTs for policy windows

* add a new UT

* add more windows policy UTs

* add new UTs

* add new UTs

* add new UTs
2024-08-30 03:29:56 +00:00
Paul Yu ae690d2a70
add accelnet support on CNI (#2853)
* add accelnet support for CNI

* add uts for AccelnetNIC on CNI

* add more uts

* fix an ut

* fix uts

* add ut to endpoint_test

* add endpoint impl test cases for accelnet

* gofummpt windows test

* fix logic of accelnet

* fix logic of accelnet

* modify uts

* remove  an ut

* fix one ut issue

* accelnet interface should set default route

* fix some uts

* remove an ib ut

* fix comments

* fix comments and add uts

* add more uts

* fix an linter issue

* fix comments

* add comment for iov flag

* fix comments

* add endpoint deletion

* add HNSV2 check

* add UT to make sure endpoint and networ deletion called

* add a new test to make infraNIC network is not deleted

* add errMsg

* fix error msg

* add windows test cases for endpoint state deletion

* fix linter issue

* fix a linter issue

* remove hardcode hcniov flag

* comments fix

* add uts for transparent network deletion

* fix comment when hns id is empty

* fix the UT when hns id is empty

* skip linter issue

* change the delegatedVMNIC to NodeNetworkInterfaceFrontendNIC

* fix an ut

* fix add accelnet policy setting ut
2024-08-07 19:08:00 +00:00
Paul Yu 246fee4bd0
[CNI] restruct CNI logger (#2226)
* small change for zap log restruct
2023-09-19 23:02:28 +00:00
Paul Yu 44dc74e5ec
[CNI] Migrate network and platform package logging to zap (#2209)
* network package zap logger

* add zaplogger for platform
2023-09-16 00:14:44 +00:00
tamilmani1989 75e1239132
Remove duplicate logs (#1375)
* removed cni read config log

* removed duplicated and spam logs

* addressed comment

* commit

* reverting back to old permission

* revert files baxck to original state

* addressing hunter comments
2022-05-19 10:00:52 -07:00
tamilmani1989 82f4b391a1
feat: [CNI] Enable DSR policy for windows singletenancy (AKS) by default (#1116)
* added dsr changes for windows

* fixed lint and added unit test
removed unused error

* skip adding dsr policy for hnsv1

* addressed comments
lint fix

* fixed windows uts
2021-11-29 10:12:32 -08:00
Jaeryn 01085728bb
fix: Add NAT Policies for Windows AKS-Swift Scenario (#1036)
* Add DNS NAT policy for windows AKS-Swift scenario

* Addressing comments

Co-authored-by: Jaeryn <tsun.chu@microsoft.com>
2021-10-20 13:58:10 -07:00
Sotiris Nanopoulos 4d27a9f6c0
feat: Adds support for HNS L4WFPProxyPolicy (#1003)
Fixes #1002

Allow the cni plugin to marshall and apply L4WFPProxyPolicy
to Windows endpoints.

Tested on Kubernetes v1.19 with AKS-engine and docker/containerd runtime

Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
2021-09-27 12:11:59 -05:00
Evan Baker 96bec09d41
chore: appease the linter (3/?), the big gofumpt (#987)
* gofumpt -w -s .

* small addtl cleanups after gofumpt

* rerun after rebase
2021-09-02 16:33:18 -05:00
Ashvin Deodhar 9a352f261e
fix: ACLPolicy check for hnsv2 (#815)
Current code is incorrectly checking against EndpointPolicyType.
2021-03-08 11:56:36 -08:00
Adelina Tuvenie 01bbbe6fad
Use PortMappingPolicySetting (#689)
In order to support VIPs for container Port Mappings, we should
use PortMappingPolicySetting type from HNSv2 instead of the old
NatPolicy from HNSv1.
2020-11-09 10:33:27 -08:00
vivekagg-MSFT cc2aab5dea
Support for ACL (Hnsv2) (#705)
* initial changes

* remove extraneous code

* Add ACL and wireserver ACL

* add ACLs

* default acls

* address comments

* addressed comment
2020-11-04 16:35:45 -08:00
Jaeryn 9d6b6c9194
Fix NATing on *COW (HnsV2) Scenarios (#596)
* For HnsV2 we will only add outbound nat policy for single tenant scenario or if enableSnatForDns is true.

* adding comments to detail results of determineSnat func

Co-authored-by: Jaeryn <tsun.chu@microsoft.com>
2020-07-15 16:14:34 -07:00
jaer-tsun 43d2c684d1
Setup SNAT Configuration Based on Azure Host Support (#401)
* Save enable snat on host settings after querying NMagent version

* Adding changes to exclude outbound snat for win cni if new NMAgent is running

* try to acquire lock file when writing to disableSnatOnHost.json

* addressed some of Tamilmani's comments

* Adding snat for DNS if current NMAgent does not support it yet

* Adding DNS NAT changes for Windows CNI

* vendoring HCSShim changes that support destination based SNATing

* Reverting k8s.io/api dependencies from master branch to last working version

* Addressing Tamilmani's comments

* syncing with an older version of k8s.io dependencies

* verify valid windows version before Dns NAT.

* only remove snat on windows when host has full support

* addressing Tamilmani's comments

* addressing Tamilmani's comments

* rebased and re-depped
2019-11-14 12:01:04 -08:00
Ashvin Deodhar edd2ae7c8b
Support hyper-v and process based containers with cricontainerd (*COW) (#417)
Support hyper-v and process based containers with cricontainerd (*COW)
2019-10-18 06:58:27 -07:00
Ashvin Deodhar 3f1216ef26 Fix Endpoint policy regression (#268)
Fix endpoint policy regression
2018-11-20 10:51:18 -08:00
Ashvin Deodhar bfb3eaafa7 Implement multitenancy for windows (#259)
* Implement multitenancy for windows
2018-10-31 14:34:04 -07:00
Yongli Chen f0f090e525
This PR moves cni related code from network package to cni. (#131)
* configure dnssuffix & dnsServerList

* add dns info to conflist

* change case for dns info

* remove hardcoding

* remove hardcoding

* parse k8s pod info

* add AdditionalArgs and Dns info to conflist

* serialize policies

* program route info

* start addressign ipam ip leak

* fix 1) ip inconsistency in k8s & pod. 2) IP leak in IPAM.

* remove comments

* separate windows & linux

* remove dnsServers

* remove comments

* address comments

* add dns verification

* abstract linux policy struct

* remove setPolicies

* separte Windows & Linux code

* change package

* add policy structure to Linux

* move policy code to policy.go

* fix network_linux func signature

* restructure policy pkg
2018-05-03 19:02:53 -07:00
Yongli Chen 0bbce8daa9 Support k8s DNS & endpoint policy (#127)
* configure dnssuffix & dnsServerList

* add dns info to conflist

* change case for dns info

* remove hardcoding

* remove hardcoding

* parse k8s pod info

* add AdditionalArgs and Dns info to conflist

* serialize policies

* program route info

* start addressign ipam ip leak

* fix 1) ip inconsistency in k8s & pod. 2) IP leak in IPAM.

* remove comments

* separate windows & linux

* remove dnsServers

* remove comments

* address comments

* add dns verification

* abstract linux policy struct

* remove setPolicies
2018-05-03 14:57:31 -07:00