-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OVS driver installation in initContainer for Antrea Windows agent
By integrating the OVS driver installation into an initContainer, we ensure that the necessary driver is installed before the main containers start, and the driver's presence is checked only once during the pod's lifecycle. Signed-off-by: Shuyang Xin <gavinx@vmware.com>
- Loading branch information
1 parent
d4922f0
commit 26df20f
Showing
6 changed files
with
66 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
build/yamls/windows/containerd-with-ovs/conf/Install-OVSDriver-Containerd.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
$ErrorActionPreference = "Stop" | ||
mkdir -force c:/openvswitch/driver | ||
$mountPath = $env:CONTAINER_SANDBOX_MOUNT_POINT | ||
$mountPath = ($mountPath.Replace('\', '/')).TrimEnd('/') | ||
$OVSDriverDir = "$mountPath\openvswitch\driver" | ||
|
||
# Check if OVSExt driver is already installed | ||
$driverStatus = netcfg -q ovsext | ||
if ($driverStatus -like '*not installed*') { | ||
# Install OVS Driver | ||
$result = netcfg -l $OVSDriverDir/ovsext.inf -c s -i OVSExt | ||
if ($result -like '*failed*') { | ||
Write-Host "Failed to install OVSExt driver: $result" | ||
exit 1 | ||
} else { | ||
Write-Host "OVSExt driver has been installed" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters