Documentation
¶
Overview ¶
This package defines the configuration for the Opni Monitoring gateway and agent. This spec is different from the Kubernetes Custom Resources used to deploy the gateway with an operator. Those definitions can be found in apis/monitoring/v1beta1.
Index ¶
- Constants
- func DecodeObject(kind string, document []byte) (meta.Object, error)
- type AgentConfig
- type AgentConfigSpec
- type AlertmanagerSpec
- type AuthProvider
- type AuthProviderSpec
- type AuthProviderType
- type BootstrapSpec
- type CertsSpec
- type CortexSpec
- type CustomResourcesStorageSpec
- type DiscoverySpec
- type DistributorSpec
- type EtcdStorageSpec
- type GatewayConfig
- type GatewayConfigSpec
- type IngesterSpec
- type MTLSSpec
- type ManagementSpec
- type PluginsSpec
- type PrometheusRulesSpec
- type QueryFrontendSpec
- type RulerSpec
- type RulesSpec
- type StorageSpec
- type StorageType
Constants ¶
View Source
const (
APIVersion = "v1beta1"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentConfig ¶
type AgentConfig struct { meta.TypeMeta `json:",inline"` Spec AgentConfigSpec `json:"spec,omitempty"` }
type AgentConfigSpec ¶
type AgentConfigSpec struct { // The address which the agent will listen on for incoming connections. // This should be in the format "host:port" or ":port", and must not // include a scheme. ListenAddress string `json:"listenAddress,omitempty"` // The address of the gateway's public HTTP API. This should be of the format // "https://host:port". The scheme must be "https". GatewayAddress string `json:"gatewayAddress,omitempty"` // The name of the identity provider to use. Defaults to "kubernetes". IdentityProvider string `json:"identityProvider,omitempty"` // Configuration for agent keyring storage. Storage StorageSpec `json:"storage,omitempty"` Bootstrap *BootstrapSpec `json:"bootstrap,omitempty"` Rules *RulesSpec `json:"rules,omitempty"` }
func (*AgentConfigSpec) SetDefaults ¶
func (s *AgentConfigSpec) SetDefaults()
type AlertmanagerSpec ¶
type AlertmanagerSpec struct { //+kubebuilder:default="cortex-alertmanager:8080" HTTPAddress string `json:"httpAddress,omitempty"` }
type AuthProvider ¶
type AuthProvider struct { meta.TypeMeta `json:",inline"` meta.ObjectMeta `json:"metadata,omitempty"` Spec AuthProviderSpec `json:"spec,omitempty"` }
type AuthProviderSpec ¶
type AuthProviderSpec struct { Type AuthProviderType `json:"type,omitempty"` Options map[string]any `json:"options,omitempty"` }
type AuthProviderType ¶
type AuthProviderType string
const ( AuthProviderOpenID AuthProviderType = "openid" AuthProviderNoAuth AuthProviderType = "noauth" )
type BootstrapSpec ¶
type CertsSpec ¶
type CertsSpec struct { // Path to a PEM encoded CA certificate file. Mutually exclusive with CACertData CACert *string `json:"caCert,omitempty"` // String containing PEM encoded CA certificate data. Mutually exclusive with CACert CACertData *string `json:"caCertData,omitempty"` // Path to a PEM encoded server certificate file. Mutually exclusive with ServingCertData ServingCert *string `json:"servingCert,omitempty"` // String containing PEM encoded server certificate data. Mutually exclusive with ServingCert ServingCertData *string `json:"servingCertData,omitempty"` // Path to a PEM encoded server key file. Mutually exclusive with ServingKeyData ServingKey *string `json:"servingKey,omitempty"` // String containing PEM encoded server key data. Mutually exclusive with ServingKey ServingKeyData *string `json:"servingKeyData,omitempty"` }
type CortexSpec ¶
type CortexSpec struct { Distributor DistributorSpec `json:"distributor,omitempty"` Ingester IngesterSpec `json:"ingester,omitempty"` Alertmanager AlertmanagerSpec `json:"alertmanager,omitempty"` Ruler RulerSpec `json:"ruler,omitempty"` QueryFrontend QueryFrontendSpec `json:"queryFrontend,omitempty"` Certs MTLSSpec `json:"certs,omitempty"` }
type CustomResourcesStorageSpec ¶
type CustomResourcesStorageSpec struct { // Kubernetes namespace where custom resource objects will be stored. Namespace string `json:"namespace,omitempty"` }
type DiscoverySpec ¶
type DiscoverySpec struct { PrometheusRules *PrometheusRulesSpec `json:"prometheusRules,omitempty"` // Search interval. Defaults to "15m" Interval string `json:"interval,omitempty"` }
type DistributorSpec ¶
type EtcdStorageSpec ¶
type GatewayConfig ¶
type GatewayConfig struct { meta.TypeMeta `json:",inline"` Spec GatewayConfigSpec `json:"spec,omitempty"` }
type GatewayConfigSpec ¶
type GatewayConfigSpec struct { //+kubebuilder:default=":8080" ListenAddress string `json:"listenAddress,omitempty"` //+kubebuilder:default=":8080" Hostname string `json:"hostname,omitempty"` //+kubebuilder:default=8086 MetricsPort int `json:"metricsPort,omitempty"` Management ManagementSpec `json:"management,omitempty"` EnableMonitor bool `json:"enableMonitor,omitempty"` TrustedProxies []string `json:"trustedProxies,omitempty"` Cortex CortexSpec `json:"cortex,omitempty"` AuthProvider string `json:"authProvider,omitempty"` Storage StorageSpec `json:"storage,omitempty"` Certs CertsSpec `json:"certs,omitempty"` Plugins PluginsSpec `json:"plugins,omitempty"` }
func (*GatewayConfigSpec) SetDefaults ¶
func (s *GatewayConfigSpec) SetDefaults()
type IngesterSpec ¶
type MTLSSpec ¶
type MTLSSpec struct { // Path to the server CA certificate. ServerCA string `json:"serverCA,omitempty"` // Path to the client CA certificate (not needed in all cases). ClientCA string `json:"clientCA,omitempty"` // Path to the certificate used for client-cert auth. ClientCert string `json:"clientCert,omitempty"` // Path to the private key used for client-cert auth. ClientKey string `json:"clientKey,omitempty"` }
type ManagementSpec ¶
type ManagementSpec struct { //+kubebuilder:default="tcp://0.0.0.0:11090" GRPCListenAddress string `json:"grpcListenAddress,omitempty"` //+kubebuilder:default="0.0.0.0:11080" HTTPListenAddress string `json:"httpListenAddress,omitempty"` //+kubebuilder:default="0.0.0.0:12080" WebListenAddress string `json:"webListenAddress,omitempty"` }
func (ManagementSpec) GetGRPCListenAddress ¶
func (m ManagementSpec) GetGRPCListenAddress() string
func (ManagementSpec) GetHTTPListenAddress ¶
func (m ManagementSpec) GetHTTPListenAddress() string
func (ManagementSpec) GetWebListenAddress ¶
func (m ManagementSpec) GetWebListenAddress() string
type PluginsSpec ¶
type PluginsSpec struct { // Directories to look for plugins in Dirs []string `json:"dirs,omitempty"` }
type PrometheusRulesSpec ¶
type PrometheusRulesSpec struct { // Namespaces to search for rules in. If empty, will search all accessible // namespaces. SearchNamespaces []string `json:"searchNamespaces,omitempty"` // Kubeconfig to use for rule discovery. If nil, will use the in-cluster // kubeconfig. Kubeconfig *string `json:"kubeconfig,omitempty"` }
type QueryFrontendSpec ¶
type RulerSpec ¶
type RulerSpec struct { // +kubebuilder:default="cortex-ruler:8080" HTTPAddress string `json:"httpAddress,omitempty"` }
type RulesSpec ¶
type RulesSpec struct {
Discovery DiscoverySpec `json:"discovery,omitempty"`
}
type StorageSpec ¶
type StorageSpec struct { Type StorageType `json:"type,omitempty"` Etcd *EtcdStorageSpec `json:"etcd,omitempty"` CustomResources *CustomResourcesStorageSpec `json:"customResources,omitempty"` }
type StorageType ¶
type StorageType string
const ( // Use etcd for key-value storage. This is the recommended default. StorageTypeEtcd StorageType = "etcd" // Use Kubernetes custom resources to store objects. This is experimental, // and it is recommended to use the etcd storage type instead for performance // reasons. StorageTypeCRDs StorageType = "customResources" )
Click to show internal directories.
Click to hide internal directories.