Skip to content

Commit

Permalink
vpc-bridge plugin use hard-coded path to k8s connector binary
Browse files Browse the repository at this point in the history
1. Removing env variable AWS_VPC_CNI_K8S_CONNECTOR_BINARY_PATH which
was used by CNI to get path to connector binary.
  • Loading branch information
KlwntSingh authored and jterry75 committed Jul 18, 2023
1 parent c20156f commit 0425e5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
3 changes: 1 addition & 2 deletions plugins/vpc-bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
vpc-bridge CNI plugin for EKS Windows.

## Pre-requisites for running vpc-bridge CNI plugin for EKS Windows
1. Env variable `AWS_VPC_CNI_K8S_CONNECTOR_BINARY_PATH` is required to be set. This will be already set in EKS Windows Optimized AMIs.
Set env variable `AWS_VPC_CNI_K8S_CONNECTOR_BINARY_PATH` to `C:\Program Files\Amazon\EKS\bin\aws-vpc-cni-k8s-connector.exe`.
1. `vpc-bridge` CNI plugin depends on `C:\Program Files\Amazon\EKS\bin\aws-vpc-cni-k8s-connector.exe` for EKS Windows.
8 changes: 1 addition & 7 deletions plugins/vpc-bridge/config/k8s/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import (
)

const (
// Represents Env variable for k8s connector binary path.
envK8sConnectorBinaryPath = "AWS_VPC_CNI_K8S_CONNECTOR_BINARY_PATH"
// Represents default path for k8s connector binary in EKS Windows AMIs.
defaultK8sConnectorBinaryPath = `C:\Program Files\Amazon\EKS\bin\aws-vpc-cni-k8s-connector.exe`

Expand Down Expand Up @@ -104,11 +102,7 @@ func executeK8sConnector(ctx context.Context, podNamespace string, podName strin

// getK8sConnectorBinaryPath returns path to k8s connector binary.
func getK8sConnectorBinaryPath() string {
connectorBinaryPath := os.Getenv(envK8sConnectorBinaryPath)
if connectorBinaryPath == "" {
connectorBinaryPath = defaultK8sConnectorBinaryPath
}
return connectorBinaryPath
return defaultK8sConnectorBinaryPath
}

// getK8sConnectorLogLevel returns the log level for k8s connector binary.
Expand Down

0 comments on commit 0425e5b

Please sign in to comment.