Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out-of-the-box "Agent mode" support for antctl on Windows #3645

Merged
merged 2 commits into from Apr 18, 2022

Commits on Apr 14, 2022

  1. 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 <abas@vmware.com>
    antoninbas committed Apr 14, 2022
    Copy the full SHA
    a82c88e View commit details
    Browse the repository at this point in the history
  2. Run antctl e2e tests for clusters with Windows Nodes

    Signed-off-by: Antonin Bas <abas@vmware.com>
    antoninbas committed Apr 14, 2022
    Copy the full SHA
    918984a View commit details
    Browse the repository at this point in the history