Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultPrometheusCPURequests = "100m" DefaultPrometheusCPULimits = "500m" DefaultPrometheusMemoryRequests = "512Mi" DefaultPrometheusMemoryLimits = "2Gi" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) MetricsAddr ¶
MetricsAddr blocks until the metrics server has bound its listener, then returns the address it is listening on.
type Config ¶
type Config struct {
LogLevel string `mapstructure:"log_level"`
LogFormat string `mapstructure:"log_format"`
PollingInterval time.Duration `mapstructure:"polling_interval"`
GracefulTimeout time.Duration `mapstructure:"graceful_timeout"`
// API Configuration
APIURLs []string `mapstructure:"api_urls"` // List of complete API URLs to poll
LabelSelector string `mapstructure:"label_selector"`
JWTToken string `mapstructure:"jwt_token"`
// OIDC Configuration for API authentication
OIDCClientID string `mapstructure:"oidc_client_id"`
OIDCClientSecret string `mapstructure:"oidc_client_secret"`
OIDCIssuerURL string `mapstructure:"oidc_issuer_url"`
// Kubernetes Configuration
KubeConfig string `mapstructure:"kube_config"`
Namespace string `mapstructure:"namespace"`
// Prometheus Configuration
Prometheus PrometheusConfig `mapstructure:"prometheus"`
// Blackbox Configuration
Blackbox k8s.BlackboxConfig `mapstructure:"blackbox"`
// Metrics server address (default ":8080")
MetricsAddr string `mapstructure:"metrics_addr"`
// Leader election (safe to run multiple replicas)
LeaderElect bool `mapstructure:"leader_elect"`
}
func LoadConfig ¶
func (*Config) GetAPIURLs ¶
GetAPIURLs returns the list of complete API URLs
type PrometheusConfig ¶
type PrometheusConfig struct {
RemoteWriteURL string `mapstructure:"remote_write_url"`
RemoteWriteTenant string `mapstructure:"remote_write_tenant"`
CPURequests string `mapstructure:"cpu_requests"`
CPULimits string `mapstructure:"cpu_limits"`
MemoryRequests string `mapstructure:"memory_requests"`
MemoryLimits string `mapstructure:"memory_limits"`
ManagedByOperator string `mapstructure:"managed_by_operator"`
APIGroup string `mapstructure:"api_group"`
}
func (*PrometheusConfig) ApplyDefaults ¶
func (pc *PrometheusConfig) ApplyDefaults()
func (*PrometheusConfig) Validate ¶
func (pc *PrometheusConfig) Validate() error
Validate validates the PrometheusConfig fields
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func (*Worker) SetReadinessCallback ¶
SetReadinessCallback sets the callback function to signal readiness state changes
Click to show internal directories.
Click to hide internal directories.