Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Out-of-the-box "Agent mode" support for antctl on Windows (antrea-io#…
…3645) * Out-of-the-box "Agent mode" support for antctl At the moment is is possible to run antctl in Agent mode from a Windows Node on which Antrea is runing, but it requires setting the following environment variables manually: ``` > $Env:POD_NAME="antrea-agent" > $Env:KUBERNETES_SERVICE_HOST="<ClusterIP>" > $Env:KUBERNETES_SERVICE_PORT="443" ``` This is not very convenient and it is not documented either. Additionally, there is no reason to require KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT in Agent mode. This requirement is caused by a bug in the antctl code: when antctl is running inside a Pod, there is no need to resolve the "in-cluster" Kubeconfig, as we generate this config manually to connect to the Antrea API server. In order to make antctl work out-of-the-box for that case, we change the logic which decides what the antctl "runtime mode" is: if the antctl binary is running on Windows and if a loopback client token exists, we assume that this is a Windows Node which is running the Antrea Agent. Fixes antrea-io#2104 Signed-off-by: Antonin Bas <[email protected]> * Run antctl e2e tests for clusters with Windows Nodes Signed-off-by: Antonin Bas <[email protected]>
- Loading branch information