From b8282d57a9364216a7f9e5e3d567de2b74787360 Mon Sep 17 00:00:00 2001 From: Evan Baker Date: Fri, 6 Dec 2024 17:13:17 +0000 Subject: [PATCH] fix: let Windows CNS use the InClusterConfig Signed-off-by: Evan Baker --- cns/Dockerfile | 2 -- cns/azure-cns-windows.yaml | 2 -- test/integration/manifests/cns/daemonset-windows.yaml | 4 ---- 3 files changed, 8 deletions(-) diff --git a/cns/Dockerfile b/cns/Dockerfile index 7ab48d8d08d..5212e2cefd1 100644 --- a/cns/Dockerfile +++ b/cns/Dockerfile @@ -32,8 +32,6 @@ EXPOSE 10090 # skopeo inspect docker://mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0 --format "{{.Name}}@{{.Digest}}" FROM mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image@sha256:b4c9637e032f667c52d1eccfa31ad8c63f1b035e8639f3f48a510536bf34032b as windows -COPY --from=builder /azure-container-networking/cns/kubeconfigtemplate.yaml kubeconfigtemplate.yaml -COPY --from=builder /azure-container-networking/npm/examples/windows/setkubeconfigpath.ps1 setkubeconfigpath.ps1 COPY --from=builder /go/bin/azure-cns /azure-cns.exe ENTRYPOINT ["azure-cns.exe"] EXPOSE 10090 diff --git a/cns/azure-cns-windows.yaml b/cns/azure-cns-windows.yaml index 1b0eba16cd8..3ea5e39f119 100644 --- a/cns/azure-cns-windows.yaml +++ b/cns/azure-cns-windows.yaml @@ -38,14 +38,12 @@ spec: command: ["powershell.exe"] args: [ - '.\setkubeconfigpath.ps1', ";", 'powershell.exe', '.\azure-cns.exe', '-c', "tcp://$(CNSIpAddress):$(CNSPort)", '-t', "$(CNSLogTarget)", '-o', "$(CNSLogDir)", '-storefilepath', "$(CNSStoreFilePath)", '-config-path', "%CONTAINER_SANDBOX_MOUNT_POINT%\\$(CNS_CONFIGURATION_PATH)", - '--kubeconfig', '.\kubeconfig', ] volumeMounts: - name: log diff --git a/test/integration/manifests/cns/daemonset-windows.yaml b/test/integration/manifests/cns/daemonset-windows.yaml index 04e2aaa3fa6..43b9bc857ff 100644 --- a/test/integration/manifests/cns/daemonset-windows.yaml +++ b/test/integration/manifests/cns/daemonset-windows.yaml @@ -52,8 +52,6 @@ spec: command: ["powershell.exe"] args: [ - '.\setkubeconfigpath.ps1', - ";", '.\azure-cns.exe', "-c", "tcp://$(CNSIpAddress):$(CNSPort)", @@ -65,8 +63,6 @@ spec: "$(CNSStoreFilePath)", "-config-path", "%CONTAINER_SANDBOX_MOUNT_POINT%\\$(CNS_CONFIGURATION_PATH)", - "--kubeconfig", - '.\kubeconfig', ] volumeMounts: - name: log