Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
paulyufan2 committed Jan 29, 2025
1 parent 683e7b4 commit 3789fe8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cns/middlewares/k8sSwiftV2.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ func (k *K8sSWIFTv2Middleware) AddRoutes(cidrs []string, gatewayIP string) []cns
}

// Both Linux and Windows CNS gets infravnet and service CIDRs from configuration env
func (k *K8sSWIFTv2Middleware) GetCidrs() (v4Cidrs, v6Cidrs []string, err error) {
func (k *K8sSWIFTv2Middleware) GetCidrs() ([]string, []string, error) { //nolint
v4Cidrs := []string{}
v6Cidrs := []string{}

// Get and parse infraVNETCIDRs from env
infraVNETCIDRs, err := configuration.InfraVNETCIDRs()
if err != nil {
Expand Down
5 changes: 4 additions & 1 deletion cns/middlewares/k8sSwiftV2_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ func (k *K8sSWIFTv2Middleware) setRoutes(podIPInfo *cns.PodIpInfo) error {
// Linux CNS gets pod CIDRs from configuration env
// Containerd reassigns the IP to the adapter and kernel configures the pod cidr route by default on Windows VM
// Hence the windows swiftv2 scenario does not require pod cidr
func (k *K8sSWIFTv2Middleware) GetPodCidrs() (v4PodCidrs, v6PodCidrs []string, err error) {
func (k *K8sSWIFTv2Middleware) GetPodCidrs() ([]string, []string, error) { //nolint
v4PodCidrs := []string{}
v6PodCidrs := []string{}

// Get and parse podCIDRs from env
podCIDRs, err := configuration.PodCIDRs()
if err != nil {
Expand Down

0 comments on commit 3789fe8

Please sign in to comment.