nginxinc / docker-nginx-controller

Docker support for NGINX Controller Agent in Containers
Apache License 2.0
29 stars 26 forks source link

Wrong ENV_CONTROLLER_API_URL format #72

Open fabriziofiorucci opened 2 years ago

fabriziofiorucci commented 2 years ago

Hello, I noticed that setting in the deployment manifest:

    env:
      - name: ENV_CONTROLLER_API_URL
        value: "https://nc-apim.f5.ff.lan/1.4/"

doesn't allow the controller agent communicate with NGINX Controller, whereas:

    env:
      - name: ENV_CONTROLLER_API_URL
        value: "nc-apim.f5.ff.lan:443"

works as expected. Is this a bug or am I missing something?

Thank you, FF

1996sajal commented 2 years ago

Hey @fabriziofiorucci, So in agent.cong ENV_CONTROLLER_API_URL is replaced by api_url. Here is a sample of the value in the agent.conf. So the second code snippet is correct.

[cloud]
api_url = ctrl_fqdn:443
api_timeout = 5.0
max_retention = 360
fabriziofiorucci commented 2 years ago

@1996sajal that's correct. in the main readme, section 4.5, the variable description is:

The NGINX Controller API URL. The new instance will use the specified API URL to locate the NGINX Controller host.

I think this might be made clearer by mentioning "fqdn and port" instead of "URL".

thanks!