Description
What would you like to be added:
Add support for --metric-annotations-allowlist and --metric-labels-allowlist arguments to be picked up from configmap instead of directly specifying in the deployment yaml.
Why is this needed:
This would help to update the annotation and label allowlist with just configmap deployment instead of changing the deployment yaml.
Describe the solution you'd like
Add a configmap for kube-state metrics that is included in the deployment yaml and mounted either in a file or loaded in the env variable. This file/env variable will be used in the container args for specifying --metric-annotations-allowlist and --metric-labels-allowlist instead of directly using the values in deployment yaml. The container keeps watch on the configmap and whenever the configmap is updated, the container restarts to pick up the latest values to use as argument
Additional context
This feature will help us update multiple clusters that we manage by simply updating configmaps instead of updating the deployment yaml