diff --git a/cns/Dockerfile b/cns/Dockerfile index 7ab48d8d08..5212e2cefd 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 1b0eba16cd..24d24c5932 100644 --- a/cns/azure-cns-windows.yaml +++ b/cns/azure-cns-windows.yaml @@ -35,17 +35,14 @@ spec: imagePullPolicy: IfNotPresent securityContext: privileged: true - command: ["powershell.exe"] + command: "azure-cns.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 04e2aaa3fa..96b8dc9c40 100644 --- a/test/integration/manifests/cns/daemonset-windows.yaml +++ b/test/integration/manifests/cns/daemonset-windows.yaml @@ -49,12 +49,9 @@ spec: securityContext: privileged: true workingDir: $env:CONTAINER_SANDBOX_MOUNT_POINT - command: ["powershell.exe"] + command: ["azure-cns.exe"] args: [ - '.\setkubeconfigpath.ps1', - ";", - '.\azure-cns.exe', "-c", "tcp://$(CNSIpAddress):$(CNSPort)", "-t", @@ -65,8 +62,6 @@ spec: "$(CNSStoreFilePath)", "-config-path", "%CONTAINER_SANDBOX_MOUNT_POINT%\\$(CNS_CONFIGURATION_PATH)", - "--kubeconfig", - '.\kubeconfig', ] volumeMounts: - name: log @@ -111,7 +106,7 @@ spec: image: acnpublic.azurecr.io/cni-dropgz:latest imagePullPolicy: Always command: - - powershell.exe; $env:CONTAINER_SANDBOX_MOUNT_POINT/dropgz + - $env:CONTAINER_SANDBOX_MOUNT_POINT/dropgz args: - deploy - azure-vnet