Skip to content

Commit

Permalink
Adding the telemetry config to the cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
vipul-21 committed Jul 13, 2023
1 parent c602fad commit 640d509
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions cni/build/windows.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ FROM mcr.microsoft.com/windows/servercore:${OS_VERSION}
SHELL ["powershell", "-command"]
COPY --from=builder /azure-container-networking/azure-vnet.exe azure-vnet.exe
COPY --from=builder /azure-container-networking/azure-vnet-telemetry.exe azure-vnet-telemetry.exe
COPY --from=builder /azure-container-networking/telemetry/azure-vnet-telemetry.config azure-vnet-telemetry.config
COPY --from=builder /azure-container-networking/azure-vnet-ipam.exe azure-vnet-ipam.exe

# This would be replaced with dropgz version of windows.
Expand Down
5 changes: 5 additions & 0 deletions hack/scripts/updatecni.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Write-Host $env:CONTAINER_SANDBOX_MOUNT_POINT
$sourceCNI = $env:CONTAINER_SANDBOX_MOUNT_POINT + "azure-vnet.exe"
$sourceIpam = $env:CONTAINER_SANDBOX_MOUNT_POINT + "azure-vnet-ipam.exe"
$sourceTelemetry = $env:CONTAINER_SANDBOX_MOUNT_POINT + "azure-vnet-telemetry.exe"
$sourceTelemetryConfig = $env:CONTAINER_SANDBOX_MOUNT_POINT + "azure-vnet-telemetry.config"

$sourceCNIVersion = & "$sourceCNI" -v
$currentVersion = ""
Expand Down Expand Up @@ -36,6 +37,10 @@ if ($currentTelemetryVersion -ne $sourceTelemetryVersion){
Write-Host "copying azure-vnet-telemetry to windows node..."
Remove-Item "C:\k\azurecni\bin\azure-vnet-telemetry.exe"
Copy-Item $sourceTelemetry -Destination "C:\k\azurecni\bin"

Write-Host "copying azure-vnet-telemetry.config to windows node..."
Remove-Item "C:\k\azurecni\bin\azure-vnet-telemetry.config"
Copy-Item $sourceTelemetryConfig -Destination "C:\k\azurecni\bin"
}

## check CNI was already installed so not to get stuck in a infinite loop of rebooting
Expand Down
3 changes: 3 additions & 0 deletions test/integration/manifests/cni/cni-installer-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
- azure.conflist
- -o
- /etc/cni/net.d/10-azure.conflist
- azure-vnet-telemetry.config
- -o
- /opt/cni/bin/azure-vnet-telemetry.config
volumeMounts:
- name: cni-bin
mountPath: /opt/cni/bin
Expand Down

0 comments on commit 640d509

Please sign in to comment.