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

Make metrics server port configurable #510

Conversation

douglas-c
Copy link

Adds a flag to the controller to support configuring a non-default port for the metrics collection.

This resolves an issue where running secretgen-controller with hostNetwork=true may lead to port conflicts on the node.

Fixes #509

Testing Done:

  • Built and ensured passing unit tests locally
  • Deployed in a Kind cluster and loaded Docker image onto cluster
  • Edited Deployment to add new container arg: -metrics-bind-address=:8093
  • Confirmed new secretgen-controller Pod logged the change:
...
{"level":"info","ts":"2023-12-07T21:19:22Z","logger":"controller-runtime.metrics","msg":"Metrics server is starting to listen","addr":":8093"}
{"level":"info","ts":"2023-12-07T21:19:22Z","logger":"sg.entrypoint","msg":"setting up controllers"}
{"level":"info","ts":"2023-12-07T21:19:22Z","logger":"sg.entrypoint","msg":"starting manager"}
{"level":"info","ts":"2023-12-07T21:19:22Z","msg":"Starting server","path":"/metrics","kind":"metrics","addr":"[::]:8093"}
...

Adds a flag to the controller to support configuring a non-default port for the
metrics collection.

This resolves an issue where running secretgen-controller with hostNetwork=true
may lead to port conflicts on the node.

Testing Done:
 - Built and ensured passing tests locally
 - Deployed in a Kind cluster and loaded Docker image onto cluster
 - Edited Deployment to add new container arg: -metrics-bind-address=:8093
 - Confirmed new secretgen-controller Pod logged the change:
    ... "msg":"Metrics server is starting to listen","addr":":8093"} ...

Signed-off-by: Doug Cook <[email protected]>
@rohitagg2020 rohitagg2020 merged commit d806899 into carvel-dev:develop Dec 8, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

secretgen-controller should allow configuration of the metrics server port
2 participants