Documentation
¶
Index ¶
Constants ¶
const ( AWSClusterKind = "AWSCluster" AWSClusterKindProvider = "capa" AWSManagedClusterKind = "AWSManagedCluster" AWSManagedClusterKindProvider = "eks" AzureClusterKind = "AzureCluster" AzureClusterKindProvider = "capz" AzureManagedClusterKind = "AzureManagedCluster" AzureManagedClusterKindProvider = "aks" VCDClusterKind = "VCDCluster" VCDClusterKindProvider = "cloud-director" VSphereClusterKind = "VSphereCluster" VSphereClusterKindProvider = "vsphere" GCPClusterKind = "GCPCluster" GCPClusterKindProvider = "gcp" GCPManagedClusterKind = "GCPManagedCluster" GCPManagedClusterKindProvider = "gke" )
const LoggingLabel = "giantswarm.io/logging"
TODO rename to observability.giantswarm.io/logging
const MonitoringLabel = "giantswarm.io/monitoring"
TODO rename to observability.giantswarm.io/monitoring
const TracingLabel = "giantswarm.io/tracing"
TODO rename to observability.giantswarm.io/tracing
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterConfig ¶ added in v0.43.0
type ClusterConfig struct {
// BaseDomain is the base domain of the management cluster.
BaseDomain string
// Customer is the customer name of the management cluster.
Customer string
// InsecureCA is a flag to indicate if the management cluster has an insecure CA that should be trusted
InsecureCA bool
// Name is the name of the management cluster.
Name string
// Pipeline is the pipeline name of the management cluster.
Pipeline string
// Region is the region of the management cluster.
Region string
}
ClusterConfig represents the configuration for the management cluster.
func (ClusterConfig) GetClusterProvider ¶ added in v0.43.0
func (c ClusterConfig) GetClusterProvider(cluster *clusterv1.Cluster) (string, error)
GetClusterProvider returns the provider for the given cluster.
func (ClusterConfig) GetClusterType ¶ added in v0.43.0
func (c ClusterConfig) GetClusterType(cluster *clusterv1.Cluster) string
GetClusterType returns the type of the cluster (management_cluster or workload_cluster).
func (ClusterConfig) IsWorkloadCluster ¶ added in v0.43.0
func (c ClusterConfig) IsWorkloadCluster(cluster *clusterv1.Cluster) bool
IsWorkloadCluster determines if the given cluster is a workload cluster (not the management cluster).
func (ClusterConfig) Validate ¶ added in v0.43.0
func (c ClusterConfig) Validate() error
Validate validates the cluster configuration.
type Config ¶
type Config struct {
// Operator-level configuration
Operator OperatorConfig
// Subsystem configurations
Logging LoggingConfig
Grafana GrafanaConfig
Monitoring MonitoringConfig
Tracing TracingConfig
// Management cluster configuration
Cluster ClusterConfig
// Environment and runtime settings
Environment EnvironmentConfig
}
Config represents the main configuration for the observability operator.
type EnvironmentConfig ¶ added in v0.43.0
type EnvironmentConfig struct {
CronitorHeartbeatManagementKey string `env:"CRONITOR_HEARTBEAT_MANAGEMENT_KEY"`
CronitorHeartbeatPingKey string `env:"CRONITOR_HEARTBEAT_PING_KEY"`
}
EnvironmentConfig represents environment-specific configuration.
type GrafanaConfig ¶ added in v0.43.0
GrafanaConfig represents the Grafana-specific configuration.
func (GrafanaConfig) Validate ¶ added in v0.43.0
func (c GrafanaConfig) Validate() error
Validate validates the Grafana configuration
type LoggingConfig ¶ added in v0.43.0
type LoggingConfig struct {
// Enabled controls logging at the installation level
Enabled bool
}
LoggingConfig represents the configuration used by the logging package.
func (LoggingConfig) IsLoggingEnabled ¶ added in v0.52.0
func (l LoggingConfig) IsLoggingEnabled(cluster *clusterv1.Cluster) bool
IsLoggingEnabled checks if logging is enabled for a specific cluster. Logging is enabled when all conditions are met:
- logging is enabled at the installation level (global flag)
- cluster is not being deleted
- cluster-specific logging label is set to true (or missing/invalid, defaulting to true)
func (LoggingConfig) Validate ¶ added in v0.43.0
func (l LoggingConfig) Validate() error
Validate validates the logging configuration
type MonitoringConfig ¶ added in v0.43.0
type MonitoringConfig struct {
// Enabled controls monitoring at the installation level
Enabled bool
AlertmanagerSecretName string
AlertmanagerURL string
AlertmanagerEnabled bool
DefaultShardingStrategy sharding.Strategy
// WALTruncateFrequency is the frequency at which the WAL segments should be truncated.
WALTruncateFrequency time.Duration
MetricsQueryURL string
QueueConfig QueueConfig
}
MonitoringConfig represents the configuration used by the monitoring package.
func (MonitoringConfig) IsMonitoringEnabled ¶ added in v0.53.0
func (c MonitoringConfig) IsMonitoringEnabled(cluster *clusterv1.Cluster) bool
Monitoring is enabled when all conditions are met:
- monitoring is enabled at the installation level (global flag)
- cluster is not being deleted
- cluster-specific monitoring label is set to true (or missing/invalid, defaulting to true)
func (MonitoringConfig) Validate ¶ added in v0.43.0
func (c MonitoringConfig) Validate() error
Validate validates the monitoring configuration
type OperatorConfig ¶ added in v0.43.0
type OperatorConfig struct {
MetricsAddr string
EnableLeaderElection bool
ProbeAddr string
SecureMetrics bool
EnableHTTP2 bool
WebhookCertPath string
OperatorNamespace string
}
OperatorConfig represents the operator-level configuration.
func (OperatorConfig) Validate ¶ added in v0.43.0
func (c OperatorConfig) Validate() error
Validate validates the operator configuration
type QueueConfig ¶ added in v0.43.0
type QueueConfig struct {
BatchSendDeadline *string
Capacity *int
MaxBackoff *string
MaxSamplesPerSend *int
MaxShards *int
MinBackoff *string
MinShards *int
RetryOnHttp429 *bool
SampleAgeLimit *string
}
QueueConfig represents the configuration for the remote write queue.
type TracingConfig ¶ added in v0.43.0
type TracingConfig struct {
// Enabled controls tracing at the installation level
Enabled bool
}
TracingConfig represents the configuration for tracing support in Grafana.
func (TracingConfig) IsTracingEnabled ¶ added in v0.52.0
func (c TracingConfig) IsTracingEnabled(cluster *clusterv1.Cluster) bool
IsTracingEnabled checks if tracing is enabled for a specific cluster. Tracing is enabled when all conditions are met:
- tracing is enabled at the installation level (global flag)
- cluster is not being deleted
- cluster-specific tracing label is set to true (or missing/invalid, defaulting to true)
func (TracingConfig) Validate ¶ added in v0.43.0
func (c TracingConfig) Validate() error
Validate validates the tracing configuration