kubewarden-controller
kubewarden-controller copied to clipboard
Move metrics port configuration from env to cli flag
Is your feature request related to a problem?
We provide a way to configure the port where the Policy Server will be exposing metrics to be collected, by using an environment variable. However, this is the only env variable we expose, as the controller configuration is done by using cli flags.
Solution you'd like
We need to move the metrics configuration logic to the cmd/main.go
file by using cli flags instead of using the golang init()
function, and pass it to the reconciler as a member of the reconciler struct.
This involves changing the helm chart as well: 2 https://github.com/kubewarden/helm-charts/blob/76dd5ccad7b11a4346ab8fa58371f8f259511636/charts/kubewarden-controller/templates/deployment.yaml#L53
Alternatives you've considered
No response
Anything else?
No response