Documentation ¶
Overview ¶
SPDX-FileCopyrightText: Copyright (c) 2016-2024, CloudZero, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: Copyright (c) 2016-2024, CloudZero, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
View Source
const ( ContextStageNone string = "none" ContextStageInit string = "pre-start" ContextStageStart string = "post-start" ContextStageStop string = "pre-stop" )
View Source
const ( DiagnosticAPIKey string = "api_key_valid" //nolint:gosec DiagnosticK8sVersion string = "k8s_version" DiagnosticEgressAccess string = "egress_reachable" DiagnosticKMS string = "kube_state_metrics_reachable" DiagnosticPrometheusVersion string = "prometheus_version" DiagnosticScrapeConfig string = "scrape_cfg" )
View Source
const ( DiagnosticInternalInitStart string = "init_start" DiagnosticInternalInitStop string = "init_ok" DiagnosticInternalInitFailed string = "init_failed" DiagnosticInternalPodStart string = "pod_start" DiagnosticInternalPodStop string = "pod_stop" )
View Source
const ( ErrNoLifecycleStageMsg = "missing Lifecycle Stage" ErrNoEnvFileMsg = "missing Env File" ErrNoKeyFileMsg = "missing Key File" ErrNoCloudZeroHostMsg = "missing CloudZero Host" ErrNoAccountIDMsg = "missing AWS Account ID" ErrNoClusterNameMsg = "missing Cluster Name" ErrNoRegionMsg = "missing AWS Region" ErrNoSecretFilePathMsg = "missing Secret File" ErrNoAgentVersionMsg = "missing Agent Version" ErrNoChartVersionMsg = "missing Chart Version" ErrNoScrapeConfigLocationMsg = "missing Scrape Config Location" ErrNoKubeStateMetricsServiceEndpointMsg = "missing Kube State Metrics Service Endpoint" )
View Source
const ( FlagEnvFile = "env-file" FlagDescEnvFile = "environment variable configuration file" FlagConfigFile = "config-file" FlagDescConfFile = "configuration file location" FlagAccountID = "account" FlagDescAccountID = "cloud account ID" FlagClusterName = "cluster" FlagDescClusterName = "kubernetes cluster name" FlagRegion = "region" FlagDescRegion = "deployment region matching the dimension in the CloudZero dashboard" )
Variables ¶
This section is empty.
Functions ¶
func IsValidDiagnostic ¶
func IsValidStage ¶
Types ¶
type Cloudzero ¶
type Cloudzero struct { Host string `yaml:"host" default:"https://api.cloudzero.com" env:"CZ_HOST" env-description:"CloudZero API host"` Credential string CredentialsFile string `` /* 165-byte string literal not displayed */ DisableTelemetry bool `yaml:"disable_telemetry" default:"false" env:"CZ_DISABLE_TELEMETRY" env-description:"Disable telemetry"` }
Cloudzero is the configuration for the CloudZero checker
type Context ¶
type Context struct {
Stage string `env:"CZ_CHECKER_STAGE" env-description:"Execution stage one of init, post-start, pre-stop, or all" default:"init"`
}
type Deployment ¶
type Deployment struct { AccountID string `yaml:"account_id" env:"ACCOUNT_ID" required:"true" env-description:"AWS Account ID"` ClusterName string `yaml:"cluster_name" env:"CLUSTER_NAME" required:"true" env-description:"Cluster Name"` Region string `yaml:"region" env:"REGION" required:"true" env-description:"AWS Region"` }
func (*Deployment) Validate ¶
func (s *Deployment) Validate() error
type Diagnostics ¶
type Diagnostics struct {
Stages []Stage `yaml:"stages"`
}
func (*Diagnostics) Validate ¶
func (s *Diagnostics) Validate() error
type Logging ¶
type Prometheus ¶
type Prometheus struct { Executable string `yaml:"executable" default:"/bin/prometheus" env:"PROMETHEUS_EXECUTABLE" env-description:"Prometheus Executable Path"` KubeStateMetricsServiceEndpoint string `` /* 129-byte string literal not displayed */ Configurations []string `yaml:"configurations"` KubeMetrics []string `yaml:"kube_metrics"` }
func (*Prometheus) Validate ¶
func (s *Prometheus) Validate() error
type Settings ¶
type Settings struct { ExecutionContext Context Logging Logging `yaml:"logging"` Deployment Deployment `yaml:"deployment"` Versions Versions `yaml:"versions"` Cloudzero Cloudzero `yaml:"cloudzero"` Prometheus Prometheus `yaml:"prometheus"` Diagnostics Diagnostics `yaml:"diagnostics"` }
func NewSettings ¶
Click to show internal directories.
Click to hide internal directories.