fix golint failures of pkg/kubelet/configmap pkg/kubelet/custommetrics

This commit is contained in:
SataQiu
2019-05-20 09:56:19 +08:00
parent afd928b8bc
commit 80bee6d965
4 changed files with 6 additions and 3 deletions

View File

@@ -24,13 +24,15 @@ import (
)
const (
// CustomMetricsDefinitionContainerFile is the file in container that stores Custom Metrics definition
CustomMetricsDefinitionContainerFile = "definition.json"
// CustomMetricsDefinitionDir is the dir where Custom Metrics definition is stored
CustomMetricsDefinitionDir = "/etc/custom-metrics"
)
// GetCAdvisorCustomMetricsDefinitionPath returns a path to a cAdvisor-specific custom metrics configuration.
// Alpha implementation.
// Returns a path to a cAdvisor-specific custom metrics configuration.
func GetCAdvisorCustomMetricsDefinitionPath(container *v1.Container) (*string, error) {
// Assumes that the container has Custom Metrics enabled if it has "/etc/custom-metrics" directory
// mounted as a volume. Custom Metrics definition is expected to be in "definition.json".