lib/promscrape/discovery/kubernetes: do not print an empty kubeconfig_file option in yaml at /config page

This commit is contained in:
Aliaksandr Valialkin 2022-10-28 21:33:07 +03:00
parent 9565dbed34
commit 454baf84d6
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -24,7 +24,7 @@ type SDConfig struct {
Role string `yaml:"role"`
// The filepath to kube config.
// If defined any cluster connection information from HTTPClientConfig is ignored.
KubeConfigFile string `yaml:"kubeconfig_file"`
KubeConfigFile string `yaml:"kubeconfig_file,omitempty"`
HTTPClientConfig promauth.HTTPClientConfig `yaml:",inline"`
ProxyURL *proxy.URL `yaml:"proxy_url,omitempty"`