v1beta1

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 3 Imported by: 11

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 pkg/sdk/api/v1beta1.

Index

Constants

View Source
const (
	APIVersion = "v1beta1"
)

Variables

This section is empty.

Functions

func DecodeObject

func DecodeObject(kind string, document []byte) (meta.Object, error)

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 {
	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]interface{} `json:"options,omitempty"`
}

type AuthProviderType

type AuthProviderType string
const (
	AuthProviderOpenID AuthProviderType = "openid"
	AuthProviderNoAuth AuthProviderType = "noauth"
)

type BootstrapSpec

type BootstrapSpec struct {
	Token string   `json:"token,omitempty"`
	Pins  []string `json:"pins,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"`
	// Search interval. Defaults to "15m"
	Interval string `json:"interval,omitempty"`
}

type DistributorSpec

type DistributorSpec struct {
	HTTPAddress string `json:"httpAddress,omitempty"`
	GRPCAddress string `json:"grpcAddress,omitempty"`
}

type EtcdStorageSpec

type EtcdStorageSpec struct {
	// List of etcd endpoints to connect to.
	Endpoints []string `json:"endpoints,omitempty"`
	// Configuration for etcd client-cert auth.
	Certs *MTLSSpec `json:"certs,omitempty"`
}

type GatewayConfig

type GatewayConfig struct {
	meta.TypeMeta `json:",inline"`

	Spec GatewayConfigSpec `json:"spec,omitempty"`
}

type GatewayConfigSpec

type GatewayConfigSpec struct {
	ListenAddress  string         `json:"listenAddress,omitempty"`
	Hostname       string         `json:"hostname,omitempty"`
	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 IngesterSpec struct {
	HTTPAddress string `json:"httpAddress,omitempty"`
	GRPCAddress string `json:"grpcAddress,omitempty"`
}

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 {
	GRPCListenAddress string `json:"grpcListenAddress,omitempty"`
	HTTPListenAddress string `json:"httpListenAddress,omitempty"`
	WebListenAddress  string `json:"webListenAddress,omitempty"`
}

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 QueryFrontendSpec struct {
	// HTTP address of the cortex query frontend
	HTTPAddress string `json:"httpAddress,omitempty"`
	// GRPC address of the cortex query frontend
	GRPCAddress string `json:"grpcAddress,omitempty"`
}

type RulerSpec

type RulerSpec struct {
	// HTTP address of the cortex ruler
	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"
	// Use Kubernetes secrets as key-value storage. This is only supported for
	// some resources. If customResources is used as the storage type, some of
	// the data will be stored in secrets, such as generic key-value entries
	// for plugins.
	StorageTypeSecret StorageType = "secret"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL