kubemetricsenv.go 721 B

12345678910111213141516171819202122
  1. package env
  2. const (
  3. KubecostMetricsPodEnabledEnvVar = "KUBECOST_METRICS_POD_ENABLED"
  4. KubecostMetricsPodPortEnvVar = "KUBECOST_METRICS_PORT"
  5. ExportClusterCacheEnabledEnvVar = "EXPORT_CLUSTER_CACHE_ENABLED"
  6. )
  7. func GetKubecostMetricsPort() int {
  8. return GetInt(KubecostMetricsPodPortEnvVar, 9005)
  9. }
  10. // IsKubecostMetricsPodEnabled returns true if the kubecost metrics pod is deployed
  11. func IsKubecostMetricsPodEnabled() bool {
  12. return GetBool(KubecostMetricsPodEnabledEnvVar, false)
  13. }
  14. // IsExportClusterCacheEnabled is set to true if the metrics pod should export the cluster cache
  15. // data to a target file location
  16. func IsExportClusterCacheEnabled() bool {
  17. return GetBool(ExportClusterCacheEnabledEnvVar, false)
  18. }