Documentation ¶
Index ¶
- Constants
- func Get(key string, defaultValue string) string
- func GetAWSAccessKeyID() string
- func GetAWSAccessKeySecret() string
- func GetAWSClusterID() string
- func GetAWSPricingURL() string
- func GetAllocationNodeLabelsEnabled() bool
- func GetAllocationNodeLabelsIncludeList() []string
- func GetAzureBillingAccount() string
- func GetAzureOfferID() string
- func GetBool(key string, defaultValue bool) bool
- func GetCSVEndpoint() string
- func GetCSVPath() string
- func GetCSVRegion() string
- func GetCloudProviderAPIKey() string
- func GetClusterID() string
- func GetClusterProfile() string
- func GetConfigPathWithDefault(defaultValue string) string
- func GetCostAnalyzerVolumeMountPath() string
- func GetDBBasicAuthUserPassword() string
- func GetDBBasicAuthUsername() string
- func GetDBBearerToken() string
- func GetDuration(key string, defaultValue time.Duration) time.Duration
- func GetETLMaxPrometheusQueryDuration() time.Duration
- func GetETLResolution() time.Duration
- func GetExportCSVFile() string
- func GetExportCSVLabelsAll() bool
- func GetExportCSVLabelsList() []string
- func GetExportCSVMaxDays() int
- func GetFloat32(key string, defaultValue float32) float32
- func GetFloat64(key string, defaultValue float64) float64
- func GetInsecureSkipVerify() bool
- func GetInt(key string, defaultValue int) int
- func GetInt16(key string, defaultValue int16) int16
- func GetInt32(key string, defaultValue int32) int32
- func GetInt64(key string, defaultValue int64) int64
- func GetInt8(key string, defaultValue int8) int8
- func GetKubeConfigPath() string
- func GetKubecostConfigBucket() string
- func GetKubecostJobName() string
- func GetKubecostMetricsPort() int
- func GetKubecostNamespace() string
- func GetList(key, delimiter string) []string
- func GetMaxQueryConcurrency() int
- func GetMetricsConfigmapName() string
- func GetMultiClusterBasicAuthPassword() string
- func GetMultiClusterBasicAuthUsername() string
- func GetMultiClusterBearerToken() string
- func GetParsedUTCOffset() time.Duration
- func GetPodName() string
- func GetPricingConfigmapName() string
- func GetPromClusterFilter() string
- func GetPromClusterLabel() string
- func GetPrometheusHeaderXScopeOrgId() string
- func GetPrometheusQueryOffset() time.Duration
- func GetPrometheusRetryOnRateLimitDefaultWait() time.Duration
- func GetPrometheusRetryOnRateLimitMaxRetries() int
- func GetPrometheusServerEndpoint() string
- func GetQueryLoggingFile() string
- func GetRegionOverrideList() []string
- func GetRemotePW() string
- func GetSQLAddress() string
- func GetThanosMaxSourceResolution() string
- func GetThanosOffset() string
- func GetThanosQueryUrl() string
- func GetUInt(key string, defaultValue uint) uint
- func GetUInt16(key string, defaultValue uint16) uint16
- func GetUInt32(key string, defaultValue uint32) uint32
- func GetUInt64(key string, defaultValue uint64) uint64
- func GetUInt8(key string, defaultValue uint8) uint8
- func GetUTCOffset() string
- func IsAggregateCostModelCacheDisabled() bool
- func IsCacheWarmingEnabled() bool
- func IsClusterCacheFileEnabled() bool
- func IsClusterInfoFileEnabled() bool
- func IsETLEnabled() bool
- func IsETLReadOnlyMode() bool
- func IsEmitKsmV1Metrics() bool
- func IsEmitKsmV1MetricsOnly() bool
- func IsEmitNamespaceAnnotationsMetric() bool
- func IsEmitPodAnnotationsMetric() bool
- func IsErrorReportingEnabled() bool
- func IsExportClusterCacheEnabled() bool
- func IsExportClusterInfoEnabled() bool
- func IsIngestingPodUID() bool
- func IsKubecostMetricsPodEnabled() bool
- func IsLogCollectionEnabled() bool
- func IsProductAnalyticsEnabled() bool
- func IsPrometheusRetryOnRateLimitResponse() bool
- func IsRemoteEnabled() bool
- func IsThanosEnabled() bool
- func IsUseCSVProvider() bool
- func IsValuesReportingEnabled() bool
- func LegacyExternalCostsAPIDisabled() bool
- func Set(key string, value string) error
- func SetBool(key string, value bool) error
- func SetDuration(key string, value time.Duration) error
- func SetInt(key string, value int) error
- func SetInt16(key string, value int16) error
- func SetInt32(key string, value int32) error
- func SetInt64(key string, value int64) error
- func SetInt8(key string, value int8) error
- func SetUInt(key string, value uint) error
- func SetUInt16(key string, value uint16) error
- func SetUInt32(key string, value uint32) error
- func SetUInt64(key string, value uint64) error
- func SetUInt8(key string, value uint8) error
Constants ¶
const ( AWSAccessKeyIDEnvVar = "AWS_ACCESS_KEY_ID" AWSAccessKeySecretEnvVar = "AWS_SECRET_ACCESS_KEY" AWSClusterIDEnvVar = "AWS_CLUSTER_ID" AWSPricingURL = "AWS_PRICING_URL" AzureOfferIDEnvVar = "AZURE_OFFER_ID" AzureBillingAccountEnvVar = "AZURE_BILLING_ACCOUNT" KubecostNamespaceEnvVar = "KUBECOST_NAMESPACE" PodNameEnvVar = "POD_NAME" ClusterIDEnvVar = "CLUSTER_ID" ClusterProfileEnvVar = "CLUSTER_PROFILE" PrometheusServerEndpointEnvVar = "PROMETHEUS_SERVER_ENDPOINT" MaxQueryConcurrencyEnvVar = "MAX_QUERY_CONCURRENCY" QueryLoggingFileEnvVar = "QUERY_LOGGING_FILE" RemoteEnabledEnvVar = "REMOTE_WRITE_ENABLED" RemotePWEnvVar = "REMOTE_WRITE_PASSWORD" SQLAddressEnvVar = "SQL_ADDRESS" UseCSVProviderEnvVar = "USE_CSV_PROVIDER" CSVRegionEnvVar = "CSV_REGION" CSVEndpointEnvVar = "CSV_ENDPOINT" CSVPathEnvVar = "CSV_PATH" ConfigPathEnvVar = "CONFIG_PATH" CloudProviderAPIKeyEnvVar = "CLOUD_PROVIDER_API_KEY" DisableAggregateCostModelCache = "DISABLE_AGGREGATE_COST_MODEL_CACHE" EmitPodAnnotationsMetricEnvVar = "EMIT_POD_ANNOTATIONS_METRIC" EmitNamespaceAnnotationsMetricEnvVar = "EMIT_NAMESPACE_ANNOTATIONS_METRIC" EmitKsmV1MetricsEnvVar = "EMIT_KSM_V1_METRICS" EmitKsmV1MetricsOnly = "EMIT_KSM_V1_METRICS_ONLY" ThanosEnabledEnvVar = "THANOS_ENABLED" ThanosQueryUrlEnvVar = "THANOS_QUERY_URL" ThanosOffsetEnvVar = "THANOS_QUERY_OFFSET" ThanosMaxSourceResEnvVar = "THANOS_MAX_SOURCE_RESOLUTION" LogCollectionEnabledEnvVar = "LOG_COLLECTION_ENABLED" ProductAnalyticsEnabledEnvVar = "PRODUCT_ANALYTICS_ENABLED" ErrorReportingEnabledEnvVar = "ERROR_REPORTING_ENABLED" ValuesReportingEnabledEnvVar = "VALUES_REPORTING_ENABLED" DBBasicAuthUsername = "DB_BASIC_AUTH_USERNAME" DBBasicAuthPassword = "DB_BASIC_AUTH_PW" DBBearerToken = "DB_BEARER_TOKEN" MultiClusterBasicAuthUsername = "MC_BASIC_AUTH_USERNAME" MultiClusterBasicAuthPassword = "MC_BASIC_AUTH_PW" MultiClusterBearerToken = "MC_BEARER_TOKEN" InsecureSkipVerify = "INSECURE_SKIP_VERIFY" KubeConfigPathEnvVar = "KUBECONFIG_PATH" UTCOffsetEnvVar = "UTC_OFFSET" CurrentClusterIdFilterEnabledVar = "CURRENT_CLUSTER_ID_FILTER_ENABLED" CacheWarmingEnabledEnvVar = "CACHE_WARMING_ENABLED" ETLEnabledEnvVar = "ETL_ENABLED" ETLMaxPrometheusQueryDurationMinutes = "ETL_MAX_PROMETHEUS_QUERY_DURATION_MINUTES" ETLResolutionSeconds = "ETL_RESOLUTION_SECONDS" LegacyExternalAPIDisabledVar = "LEGACY_EXTERNAL_API_DISABLED" PromClusterIDLabelEnvVar = "PROM_CLUSTER_ID_LABEL" PricingConfigmapName = "PRICING_CONFIGMAP_NAME" MetricsConfigmapName = "METRICS_CONFIGMAP_NAME" KubecostJobNameEnvVar = "KUBECOST_JOB_NAME" KubecostConfigBucketEnvVar = "KUBECOST_CONFIG_BUCKET" ClusterInfoFileEnabledEnvVar = "CLUSTER_INFO_FILE_ENABLED" ClusterCacheFileEnabledEnvVar = "CLUSTER_CACHE_FILE_ENABLED" PrometheusQueryOffsetEnvVar = "PROMETHEUS_QUERY_OFFSET" PrometheusRetryOnRateLimitResponseEnvVar = "PROMETHEUS_RETRY_ON_RATE_LIMIT" PrometheusRetryOnRateLimitMaxRetriesEnvVar = "PROMETHEUS_RETRY_ON_RATE_LIMIT_MAX_RETRIES" PrometheusRetryOnRateLimitDefaultWaitEnvVar = "PROMETHEUS_RETRY_ON_RATE_LIMIT_DEFAULT_WAIT" PrometheusHeaderXScopeOrgIdEnvVar = "PROMETHEUS_HEADER_X_SCOPE_ORGID" IngestPodUIDEnvVar = "INGEST_POD_UID" ETLReadOnlyMode = "ETL_READ_ONLY" AllocationNodeLabelsEnabled = "ALLOCATION_NODE_LABELS_ENABLED" AllocationNodeLabelsIncludeList = "ALLOCATION_NODE_LABELS_INCLUDE_LIST" ExportCSVFile = "EXPORT_CSV_FILE" ExportCSVLabelsList = "EXPORT_CSV_LABELS_LIST" ExportCSVLabelsAll = "EXPORT_CSV_LABELS_ALL" ExportCSVMaxDays = "EXPORT_CSV_MAX_DAYS" )
const ( KubecostMetricsPodEnabledEnvVar = "KUBECOST_METRICS_POD_ENABLED" KubecostMetricsPodPortEnvVar = "KUBECOST_METRICS_PORT" ExportClusterCacheEnabledEnvVar = "EXPORT_CLUSTER_CACHE_ENABLED" ExportClusterInfoEnabledEnvVar = "EXPORT_CLUSTER_INFO_ENABLED" )
const DefaultConfigMountPath = "/var/configs"
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get parses an string from the environment variable key parameter. If the environment variable is empty, the defaultValue parameter is returned.
func GetAWSAccessKeyID ¶
func GetAWSAccessKeyID() string
GetAWSAccessKeyID returns the environment variable value for AWSAccessKeyIDEnvVar which represents the AWS access key for authentication
func GetAWSAccessKeySecret ¶
func GetAWSAccessKeySecret() string
GetAWSAccessKeySecret returns the environment variable value for AWSAccessKeySecretEnvVar which represents the AWS access key secret for authentication
func GetAWSClusterID ¶
func GetAWSClusterID() string
GetAWSClusterID returns the environment variable value for AWSClusterIDEnvVar which represents an AWS specific cluster identifier.
func GetAWSPricingURL ¶
func GetAWSPricingURL() string
GetAWSPricingURL returns an optional alternative URL to fetch AWS pricing data from; for use in airgapped environments
func GetAllocationNodeLabelsEnabled ¶
func GetAllocationNodeLabelsEnabled() bool
func GetAllocationNodeLabelsIncludeList ¶
func GetAllocationNodeLabelsIncludeList() []string
func GetAzureBillingAccount ¶
func GetAzureBillingAccount() string
GetAzureBillingAccount returns the environment variable value for AzureBillingAccountEnvVar which represents the Azure billing account for determining prices. If this is specified customer-specific prices will be downloaded from the consumption price sheet API.
func GetAzureOfferID ¶
func GetAzureOfferID() string
GetAzureOfferID returns the environment variable value for AzureOfferIDEnvVar which represents the Azure offer ID for determining prices.
func GetBool ¶
GetBool parses a bool from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetCSVEndpoint ¶
func GetCSVEndpoint() string
GetCSVEndpoint returns the environment variable value for CSVEndpointEnvVar which represents the endpoint configured for a S3 CSV provider another than AWS S3.
func GetCSVPath ¶
func GetCSVPath() string
GetCSVPath returns the environment variable value for CSVPathEnvVar which represents the key path configured for a CSV provider.
func GetCSVRegion ¶
func GetCSVRegion() string
GetCSVRegion returns the environment variable value for CSVRegionEnvVar which represents the region configured for a CSV provider.
func GetCloudProviderAPIKey ¶
func GetCloudProviderAPIKey() string
GetCloudProviderAPI returns the environment variable value for CloudProviderAPIEnvVar which represents the API key provided for the cloud provider.
func GetClusterID ¶
func GetClusterID() string
GetClusterID returns the environment variable value for ClusterIDEnvVar which represents the configurable identifier used for multi-cluster metric emission.
func GetClusterProfile ¶
func GetClusterProfile() string
GetClusterProfile returns the environment variable value for ClusterProfileEnvVar which represents the cluster profile configured for
func GetConfigPathWithDefault ¶
GetConfigPath returns the environment variable value for ConfigPathEnvVar which represents the cost model configuration path
func GetCostAnalyzerVolumeMountPath ¶
func GetCostAnalyzerVolumeMountPath() string
GetCostAnalyzerVolumeMountPath is an alias of GetConfigPath, which returns the mount path for the Cost Analyzer volume, which stores configs, persistent data, etc.
func GetDBBasicAuthUserPassword ¶
func GetDBBasicAuthUserPassword() string
func GetDBBasicAuthUsername ¶
func GetDBBasicAuthUsername() string
func GetDBBearerToken ¶
func GetDBBearerToken() string
func GetDuration ¶
GetDuration parses a time.Duration from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetETLResolution ¶
GetETLResolution determines the resolution of ETL queries. The smaller the duration, the higher the resolution; the higher the resolution, the more accurate the query results, but the more computationally expensive.
func GetExportCSVFile ¶
func GetExportCSVFile() string
func GetExportCSVLabelsAll ¶
func GetExportCSVLabelsAll() bool
func GetExportCSVLabelsList ¶
func GetExportCSVLabelsList() []string
func GetExportCSVMaxDays ¶
func GetExportCSVMaxDays() int
func GetFloat32 ¶
GetFloat32 parses a float32 from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetFloat64 ¶
GetFloat64 parses a float64 from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetInsecureSkipVerify ¶
func GetInsecureSkipVerify() bool
func GetInt ¶
GetInt parses an int from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetInt16 ¶
GetInt16 parses an int16 from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetInt32 ¶
GetInt32 parses an int32 from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetInt64 ¶
GetInt64 parses an int64 from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetInt8 ¶
GetInt8 parses an int8 from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetKubeConfigPath ¶
func GetKubeConfigPath() string
GetKubeConfigPath returns the environment variable value for KubeConfigPathEnvVar
func GetKubecostConfigBucket ¶
func GetKubecostConfigBucket() string
GetKubecostConfigBucket returns a file location for a mounted bucket configuration which is used to store a subset of kubecost configurations that require sharing via remote storage.
func GetKubecostJobName ¶
func GetKubecostJobName() string
GetKubecostJobName returns the environment variable value for KubecostJobNameEnvVar
func GetKubecostMetricsPort ¶
func GetKubecostMetricsPort() int
func GetKubecostNamespace ¶
func GetKubecostNamespace() string
GetKubecostNamespace returns the environment variable value for KubecostNamespaceEnvVar which represents the namespace the cost model exists in.
func GetList ¶
GetList parses a []string from the environment variable key parameter. If the environment // variable is empty or fails to parse, nil is returned.
func GetMaxQueryConcurrency ¶
func GetMaxQueryConcurrency() int
GetMaxQueryConcurrency returns the environment variable value for MaxQueryConcurrencyEnvVar
func GetMetricsConfigmapName ¶
func GetMetricsConfigmapName() string
func GetMultiClusterBasicAuthPassword ¶
func GetMultiClusterBasicAuthPassword() string
GetMultiClusterBasicAuthPassword returns the environment variable value for MultiClusterBasicAuthPassword
func GetMultiClusterBasicAuthUsername ¶
func GetMultiClusterBasicAuthUsername() string
GetMultiClusterBasicAuthUsername returns the environment variable value for MultiClusterBasicAuthUsername
func GetMultiClusterBearerToken ¶
func GetMultiClusterBearerToken() string
func GetParsedUTCOffset ¶
GetParsedUTCOffset returns the duration of the configured UTC offset
func GetPodName ¶
func GetPodName() string
GetPodName returns the name of the current running pod. If this environment variable is not set, empty string is returned.
func GetPricingConfigmapName ¶
func GetPricingConfigmapName() string
func GetPromClusterFilter ¶
func GetPromClusterFilter() string
GetPromClusterFilter returns environment variable value CurrentClusterIdFilterEnabledVar which represents additional prometheus filter for all metrics for current cluster id
func GetPromClusterLabel ¶
func GetPromClusterLabel() string
GetPromClusterLabel returns the environment variable value for PromClusterIDLabel
func GetPrometheusHeaderXScopeOrgId ¶
func GetPrometheusHeaderXScopeOrgId() string
GetPrometheusHeaderXScopeOrgId returns the default value for X-Scope-OrgID header used for requests in Mimir/Cortex-Tenant API. To use Mimir(or Cortex-Tenant) instead of Prometheus add variable from cluster settings: "PROMETHEUS_HEADER_X_SCOPE_ORGID": "my-cluster-name" Then set Prometheus URL to prometheus API endpoint: "PROMETHEUS_SERVER_ENDPOINT": "http://mimir-url/prometheus/"
func GetPrometheusQueryOffset ¶
GetPrometheusQueryOffset returns the time.Duration to offset all prometheus queries by. NOTE: This env var is applied to all non-range queries made via our query context. This should only be applied when there is a significant delay in data arriving in the target prom db. For example, if supplying a thanos or cortex querier for the prometheus server, using a 3h offset will ensure that current time = current time - 3h.
This offset is NOT the same as the GetThanosOffset() option, as that is only applied to queries made specifically targeting thanos. This offset is applied globally.
func GetPrometheusRetryOnRateLimitDefaultWait ¶
GetPrometheusRetryOnRateLimitDefaultWait returns the default wait time for a retriable rate limit response without a Retry-After header.
func GetPrometheusRetryOnRateLimitMaxRetries ¶
func GetPrometheusRetryOnRateLimitMaxRetries() int
GetPrometheusRetryOnRateLimitMaxRetries returns the maximum number of retries that should be attempted prior to failing. Only used if IsPrometheusRetryOnRateLimitResponse() is true.
func GetPrometheusServerEndpoint ¶
func GetPrometheusServerEndpoint() string
GetPrometheusServerEndpoint returns the environment variable value for PrometheusServerEndpointEnvVar which represents the prometheus server endpoint used to execute prometheus queries.
func GetQueryLoggingFile ¶
func GetQueryLoggingFile() string
GetQueryLoggingFile returns a file location if query logging is enabled. Otherwise, empty string
func GetRegionOverrideList ¶
func GetRegionOverrideList() []string
func GetRemotePW ¶
func GetRemotePW() string
GetRemotePW returns the environment variable value for RemotePWEnvVar which represents the remote persistent storage password.
func GetSQLAddress ¶
func GetSQLAddress() string
GetSQLAddress returns the environment variable value for SQLAddressEnvVar which represents the SQL database address used with remote persistent storage.
func GetThanosMaxSourceResolution ¶
func GetThanosMaxSourceResolution() string
GetThanosMaxSourceResolution returns the environment variable value for ThanosMaxSourceResEnvVar which represents the max source resolution to use when querying thanos.
func GetThanosOffset ¶
func GetThanosOffset() string
GetThanosOffset returns the environment variable value for ThanosOffsetEnvVar which represents the total amount of time to offset all queries made to thanos.
func GetThanosQueryUrl ¶
func GetThanosQueryUrl() string
GetThanosQueryUrl returns the environment variable value for ThanosQueryUrlEnvVar which represents the target query endpoint for hitting thanos.
func GetUInt ¶
GetUInt parses a uint from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetUInt16 ¶
GetUInt16 parses a uint16 from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetUInt32 ¶
GetUInt32 parses a uint32 from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetUInt64 ¶
GetUInt64 parses a uint64 from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetUInt8 ¶
GetUInt8 parses a uint8 from the environment variable key parameter. If the environment variable is empty or fails to parse, the defaultValue parameter is returned.
func GetUTCOffset ¶
func GetUTCOffset() string
GetUTCOffset returns the environment variable value for UTCOffset
func IsAggregateCostModelCacheDisabled ¶
func IsAggregateCostModelCacheDisabled() bool
IsAggregateCostModelCacheDisabled returns the environment variable value for DisableAggregateCostModelCache which will inform the aggregator on whether to load cached data. Defaults to false
func IsCacheWarmingEnabled ¶
func IsCacheWarmingEnabled() bool
func IsClusterCacheFileEnabled ¶
func IsClusterCacheFileEnabled() bool
IsClusterCacheFileEnabled returns true if the kubernetes cluster data is read from a file or pulled from the local kubernetes API.
func IsClusterInfoFileEnabled ¶
func IsClusterInfoFileEnabled() bool
IsClusterInfoFileEnabled returns true if the cluster info is read from a file or pulled from the local cloud provider and kubernetes.
func IsETLEnabled ¶
func IsETLEnabled() bool
func IsETLReadOnlyMode ¶
func IsETLReadOnlyMode() bool
func IsEmitKsmV1Metrics ¶
func IsEmitKsmV1Metrics() bool
IsEmitKsmV1Metrics returns true if cost-model is configured to emit all necessary KSM v1 metrics that were removed in KSM v2
func IsEmitKsmV1MetricsOnly ¶
func IsEmitKsmV1MetricsOnly() bool
func IsEmitNamespaceAnnotationsMetric ¶
func IsEmitNamespaceAnnotationsMetric() bool
IsEmitNamespaceAnnotationsMetric returns true if cost-model is configured to emit the kube_namespace_annotations metric containing the namespace annotations
func IsEmitPodAnnotationsMetric ¶
func IsEmitPodAnnotationsMetric() bool
IsEmitPodAnnotationsMetric returns true if cost-model is configured to emit the kube_pod_annotations metric containing pod annotations.
func IsErrorReportingEnabled ¶
func IsErrorReportingEnabled() bool
IsErrorReportingEnabled returns the environment variable value for ErrorReportingEnabledEnvVar
func IsExportClusterCacheEnabled ¶
func IsExportClusterCacheEnabled() bool
IsExportClusterCacheEnabled is set to true if the metrics pod should export the cluster cache data to a target file location
func IsExportClusterInfoEnabled ¶
func IsExportClusterInfoEnabled() bool
IsExportClusterInfoEnabled is set to true if the metrics pod should export its own cluster info data to a target file location
func IsIngestingPodUID ¶
func IsIngestingPodUID() bool
IsIngestingPodUID returns the env variable from ingestPodUID, which alters the contents of podKeys in Allocation
func IsKubecostMetricsPodEnabled ¶
func IsKubecostMetricsPodEnabled() bool
IsKubecostMetricsPodEnabled returns true if the kubecost metrics pod is deployed
func IsLogCollectionEnabled ¶
func IsLogCollectionEnabled() bool
IsLogCollectionEnabled returns the environment variable value for LogCollectionEnabledEnvVar which represents whether or not log collection has been enabled for kubecost deployments.
func IsProductAnalyticsEnabled ¶
func IsProductAnalyticsEnabled() bool
IsProductAnalyticsEnabled returns the environment variable value for ProductAnalyticsEnabledEnvVar
func IsPrometheusRetryOnRateLimitResponse ¶
func IsPrometheusRetryOnRateLimitResponse() bool
IsPrometheusRetryOnRateLimitResponse will attempt to retry if a 429 response is received OR a 400 with a body containing ThrottleException (common in AWS services like AMP)
func IsRemoteEnabled ¶
func IsRemoteEnabled() bool
IsRemoteEnabled returns the environment variable value for RemoteEnabledEnvVar which represents whether or not remote write is enabled for prometheus for use with SQL backed persistent storage.
func IsThanosEnabled ¶
func IsThanosEnabled() bool
IsThanosEnabled returns the environment variable value for ThanosEnabledEnvVar which represents whether or not thanos is enabled.
func IsUseCSVProvider ¶
func IsUseCSVProvider() bool
IsUseCSVProvider returns the environment variable value for UseCSVProviderEnvVar which represents whether or not the use of a CSV cost provider is enabled.
func IsValuesReportingEnabled ¶
func IsValuesReportingEnabled() bool
IsValuesReportingEnabled returns the environment variable value for ValuesReportingEnabledEnvVar
func LegacyExternalCostsAPIDisabled ¶
func LegacyExternalCostsAPIDisabled() bool
func SetDuration ¶
SetDuration sets the environment variable to a string formatted time.Duration
Types ¶
This section is empty.