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 AlertingSpec
- type AlertmanagerSpec
- type AuthProvider
- type AuthProviderSpec
- type AuthProviderType
- type BootstrapSpec
- type CertsSpec
- type CortexSpec
- type CustomResourcesStorageSpec
- type DiscoverySpec
- type DistributorSpec
- type EtcdStorageSpec
- type FilesystemRulesSpec
- type GatewayConfig
- type GatewayConfigSpec
- type IngesterSpec
- type MTLSSpec
- type ManagementClientSpec
- type ManagementSpec
- type MetricsSpec
- type PluginsSpec
- type PrometheusRulesSpec
- type QueryFrontendSpec
- type RealtimeServerConfig
- type RealtimeServerSpec
- type RulerSpec
- type RulesSpec
- type StorageSpec
- type StorageType
- type TrustStrategyKind
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 GRPC API. This should be of the format // "host:port" with no scheme. GatewayAddress string `json:"gatewayAddress,omitempty"` // The name of the identity provider to use. Defaults to "kubernetes". IdentityProvider string `json:"identityProvider,omitempty"` // The type of trust strategy to use for verifying the authenticity of the // gateway server. Defaults to "pkp". TrustStrategy TrustStrategyKind `json:"trustStrategy,omitempty"` // Configuration for agent keyring storage. Storage StorageSpec `json:"storage,omitempty"` Rules *RulesSpec `json:"rules,omitempty"` Bootstrap *BootstrapSpec `json:"bootstrap,omitempty"` }
func (*AgentConfigSpec) SetDefaults ¶
func (s *AgentConfigSpec) SetDefaults()
type AlertingSpec ¶ added in v0.5.4
type AlertingSpec struct {
Endpoints []string `json:"endpoints,omitempty"`
}
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 BootstrapSpec struct { // Address of the internal management GRPC API. Used for auto-bootstrapping // when direct management api access is available, such as when running in // the main cluster. InClusterManagementAddress *string `json:"inClusterManagementAddress,omitempty"` // Bootstrap token Token string `json:"token,omitempty"` // List of public key pins. Used when the trust strategy is "pkp". Pins []string `json:"pins,omitempty"` // List of paths to CA Certs. Used when the trust strategy is "cacerts". // If empty, the system certs will be used. CACerts []string `json:"caCerts,omitempty"` }
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"` Filesystem *FilesystemRulesSpec `json:"filesystem,omitempty"` // Search interval. Defaults to "15m" Interval string `json:"interval,omitempty"` }
type DistributorSpec ¶
type EtcdStorageSpec ¶
type FilesystemRulesSpec ¶ added in v0.5.4
type FilesystemRulesSpec struct {
PathExpressions []string `json:"pathExpressions,omitempty"`
}
type GatewayConfig ¶
type GatewayConfig struct { meta.TypeMeta `json:",inline"` Spec GatewayConfigSpec `json:"spec,omitempty"` }
type GatewayConfigSpec ¶
type GatewayConfigSpec struct { //+kubebuilder:default=":8080" HTTPListenAddress string `json:"httpListenAddress,omitempty"` //+kubebuilder:default=":9090" GRPCListenAddress string `json:"grpcListenAddress,omitempty"` //+kubebuilder:default="localhost" Hostname string `json:"hostname,omitempty"` Metrics MetricsSpec `json:"metrics,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"` Alerting AlertingSpec `json:"alerting,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 ManagementClientSpec ¶ added in v0.5.4
type ManagementClientSpec struct {
Address string `json:"address,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 MetricsSpec ¶ added in v0.5.4
type MetricsSpec struct { //+kubebuilder:default=8086 Port int `json:"port,omitempty"` //+kubebuilder:default="/metrics" Path string `json:"path,omitempty"` }
func (MetricsSpec) GetPath ¶ added in v0.5.4
func (s MetricsSpec) GetPath() string
func (MetricsSpec) GetPort ¶ added in v0.5.4
func (s MetricsSpec) GetPort() int
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 RealtimeServerConfig ¶ added in v0.5.4
type RealtimeServerConfig struct { meta.TypeMeta `json:",inline"` Spec RealtimeServerSpec `json:"spec,omitempty"` }
type RealtimeServerSpec ¶ added in v0.5.4
type RealtimeServerSpec struct { Metrics MetricsSpec `json:"metrics,omitempty"` ManagementClient ManagementClientSpec `json:"managementClient,omitempty"` }
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" )
type TrustStrategyKind ¶ added in v0.4.2
type TrustStrategyKind string
const ( TrustStrategyPKP TrustStrategyKind = "pkp" TrustStrategyCACerts TrustStrategyKind = "cacerts" TrustStrategyInsecure TrustStrategyKind = "insecure" )
Click to show internal directories.
Click to hide internal directories.