Documentation ¶
Index ¶
- Constants
- func ApplyDefaultSettings(opts *Options) error
- func ApplyGatewayDefaultOptions(opts *Options) error
- func BuildAll(opts Options) ([]client.Object, error)
- func BuildCompactor(opts Options) ([]client.Object, error)
- func BuildDistributor(opts Options) ([]client.Object, error)
- func BuildGateway(opts Options) ([]client.Object, error)
- func BuildIndexGateway(opts Options) ([]client.Object, error)
- func BuildIngester(opts Options) ([]client.Object, error)
- func BuildLokiGossipRingService(stackName string) *corev1.Service
- func BuildQuerier(opts Options) ([]client.Object, error)
- func BuildQueryFrontend(opts Options) ([]client.Object, error)
- func BuildServiceMonitors(opts Options) []client.Object
- func CompactorName(stackName string) string
- func ComponentLabels(component, stackName string) labels.Set
- func ConfigOptions(opt Options) config.Options
- func DefaultLokiStackSpec(size lokiv1beta1.LokiStackSizeType) *lokiv1beta1.LokiStackSpec
- func DistributorName(stackName string) string
- func GatewayName(stackName string) string
- func GossipLabels() map[string]string
- func IndexGatewayName(stackName string) string
- func IngesterName(stackName string) string
- func LokiConfigMap(opt Options) (*corev1.ConfigMap, string, error)
- func MutateFuncFor(existing, desired client.Object) controllerutil.MutateFn
- func NewCompactorGRPCService(opts Options) *corev1.Service
- func NewCompactorHTTPService(opts Options) *corev1.Service
- func NewCompactorServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
- func NewCompactorStatefulSet(opts Options) *appsv1.StatefulSet
- func NewDistributorDeployment(opts Options) *appsv1.Deployment
- func NewDistributorGRPCService(opts Options) *corev1.Service
- func NewDistributorHTTPService(opts Options) *corev1.Service
- func NewDistributorServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
- func NewGatewayDeployment(opts Options, sha1C string) *appsv1.Deployment
- func NewGatewayHTTPService(opts Options) *corev1.Service
- func NewGatewayIngress(opts Options) (*networkingv1.Ingress, error)
- func NewGatewayServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
- func NewIndexGatewayGRPCService(opts Options) *corev1.Service
- func NewIndexGatewayHTTPService(opts Options) *corev1.Service
- func NewIndexGatewayServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
- func NewIndexGatewayStatefulSet(opts Options) *appsv1.StatefulSet
- func NewIngesterGRPCService(opts Options) *corev1.Service
- func NewIngesterHTTPService(opts Options) *corev1.Service
- func NewIngesterServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
- func NewIngesterStatefulSet(opts Options) *appsv1.StatefulSet
- func NewQuerierDeployment(opts Options) *appsv1.Deployment
- func NewQuerierGRPCService(opts Options) *corev1.Service
- func NewQuerierHTTPService(opts Options) *corev1.Service
- func NewQuerierServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
- func NewQueryFrontendDeployment(opts Options) *appsv1.Deployment
- func NewQueryFrontendGRPCService(opts Options) *corev1.Service
- func NewQueryFrontendHTTPService(opts Options) *corev1.Service
- func NewQueryFrontendServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
- func QuerierName(stackName string) string
- func QueryFrontendName(stackName string) string
- type FeatureFlags
- type ObjectStorage
- type Options
- type TenantSecrets
Constants ¶
const ( // EnvRelatedImageLoki is the environment variable to fetch the Loki image pullspec. EnvRelatedImageLoki = "RELATED_IMAGE_LOKI" // EnvRelatedImageGateway is the environment variable to fetch the Gateway image pullspec. EnvRelatedImageGateway = "RELATED_IMAGE_GATEWAY" // DefaultContainerImage declares the default fallback for loki image. DefaultContainerImage = "docker.io/grafana/loki:2.2.1" // DefaultLokiStackGatewayImage declares the default image for lokiStack-gateway. DefaultLokiStackGatewayImage = "quay.io/observatorium/api:latest" // PrometheusCAFile declares the path for prometheus CA file for service monitors. PrometheusCAFile string = "/etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt" // BearerTokenFile declares the path for bearer token file for service monitors. BearerTokenFile string = "/var/run/secrets/kubernetes.io/serviceaccount/token" // LabelCompactorComponent is the label value for the compactor component LabelCompactorComponent string = "compactor" // LabelDistributorComponent is the label value for the distributor component LabelDistributorComponent string = "distributor" // LabelIngesterComponent is the label value for the ingester component LabelIngesterComponent string = "ingester" // LabelQuerierComponent is the label value for the querier component LabelQuerierComponent string = "querier" // LabelQueryFrontendComponent is the label value for the query frontend component LabelQueryFrontendComponent string = "query-frontend" // LabelIndexGatewayComponent is the label value for the lokiStack-index-gateway component LabelIndexGatewayComponent string = "index-gateway" // LabelGatewayComponent is the label value for the lokiStack-gateway component LabelGatewayComponent string = "lokistack-gateway" )
Variables ¶
This section is empty.
Functions ¶
func ApplyDefaultSettings ¶
ApplyDefaultSettings manipulates the options to conform to build specifications
func ApplyGatewayDefaultOptions ¶
ApplyGatewayDefaultOptions applies defaults on the LokiStackSpec depending on selected tenant mode. Currently nothing is applied for modes static and dynamic. For mode openshift-logging the tenant spec is filled with defaults for authentication and authorization.
func BuildCompactor ¶
BuildCompactor builds the k8s objects required to run Loki Compactor.
func BuildDistributor ¶
BuildDistributor returns a list of k8s objects for Loki Distributor
func BuildGateway ¶
BuildGateway returns a list of k8s objects for Loki Stack Gateway
func BuildIndexGateway ¶
BuildIndexGateway returns a list of k8s objects for Loki IndexGateway
func BuildIngester ¶
BuildIngester builds the k8s objects required to run Loki Ingester
func BuildLokiGossipRingService ¶
BuildLokiGossipRingService creates a k8s service for the gossip/memberlist members of the cluster
func BuildQuerier ¶
BuildQuerier returns a list of k8s objects for Loki Querier
func BuildQueryFrontend ¶
BuildQueryFrontend returns a list of k8s objects for Loki QueryFrontend
func BuildServiceMonitors ¶
BuildServiceMonitors builds the service monitors
func CompactorName ¶
CompactorName is the name of the compactor statefulset
func ComponentLabels ¶
ComponentLabels is a list of all commonLabels including the loki.grafana.com/component:<component> label
func ConfigOptions ¶
ConfigOptions converts Options to config.Options
func DefaultLokiStackSpec ¶
func DefaultLokiStackSpec(size lokiv1beta1.LokiStackSizeType) *lokiv1beta1.LokiStackSpec
DefaultLokiStackSpec returns the default configuration for a LokiStack of the specified size
func DistributorName ¶
DistributorName is the name of the distibutor deployment
func GatewayName ¶
GatewayName is the name of the lokiStack-gateway statefulset
func GossipLabels ¶
GossipLabels is the list of labels that should be assigned to components using the gossip ring
func IndexGatewayName ¶
IndexGatewayName is the name of the index-gateway statefulset
func IngesterName ¶
IngesterName is the name of the compactor statefulset
func LokiConfigMap ¶
LokiConfigMap creates the single configmap containing the loki configuration for the whole cluster
func MutateFuncFor ¶
func MutateFuncFor(existing, desired client.Object) controllerutil.MutateFn
MutateFuncFor returns a mutate function based on the existing resource's concrete type. It supports currently only the following types or else panics: - ConfigMap - Service - Deployment - StatefulSet - ServiceMonitor
func NewCompactorGRPCService ¶
NewCompactorGRPCService creates a k8s service for the compactor GRPC endpoint
func NewCompactorHTTPService ¶
NewCompactorHTTPService creates a k8s service for the ingester HTTP endpoint
func NewCompactorServiceMonitor ¶
func NewCompactorServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
NewCompactorServiceMonitor creates a k8s service monitor for the compactor component
func NewCompactorStatefulSet ¶
func NewCompactorStatefulSet(opts Options) *appsv1.StatefulSet
NewCompactorStatefulSet creates a statefulset object for a compactor.
func NewDistributorDeployment ¶
func NewDistributorDeployment(opts Options) *appsv1.Deployment
NewDistributorDeployment creates a deployment object for a distributor
func NewDistributorGRPCService ¶
NewDistributorGRPCService creates a k8s service for the distributor GRPC endpoint
func NewDistributorHTTPService ¶
NewDistributorHTTPService creates a k8s service for the distributor HTTP endpoint
func NewDistributorServiceMonitor ¶
func NewDistributorServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
NewDistributorServiceMonitor creates a k8s service monitor for the distributor component
func NewGatewayDeployment ¶
func NewGatewayDeployment(opts Options, sha1C string) *appsv1.Deployment
NewGatewayDeployment creates a deployment object for a lokiStack-gateway
func NewGatewayHTTPService ¶
NewGatewayHTTPService creates a k8s service for the lokistack-gateway HTTP endpoint
func NewGatewayIngress ¶
func NewGatewayIngress(opts Options) (*networkingv1.Ingress, error)
NewGatewayIngress creates a k8s Ingress object for accessing the lokistack-gateway from public.
func NewGatewayServiceMonitor ¶
func NewGatewayServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
NewGatewayServiceMonitor creates a k8s service monitor for the lokistack-gateway component
func NewIndexGatewayGRPCService ¶
NewIndexGatewayGRPCService creates a k8s service for the index-gateway GRPC endpoint
func NewIndexGatewayHTTPService ¶
NewIndexGatewayHTTPService creates a k8s service for the index-gateway HTTP endpoint
func NewIndexGatewayServiceMonitor ¶
func NewIndexGatewayServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
NewIndexGatewayServiceMonitor creates a k8s service monitor for the index-gateway component
func NewIndexGatewayStatefulSet ¶
func NewIndexGatewayStatefulSet(opts Options) *appsv1.StatefulSet
NewIndexGatewayStatefulSet creates a statefulset object for an index-gateway
func NewIngesterGRPCService ¶
NewIngesterGRPCService creates a k8s service for the ingester GRPC endpoint
func NewIngesterHTTPService ¶
NewIngesterHTTPService creates a k8s service for the ingester HTTP endpoint
func NewIngesterServiceMonitor ¶
func NewIngesterServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
NewIngesterServiceMonitor creates a k8s service monitor for the ingester component
func NewIngesterStatefulSet ¶
func NewIngesterStatefulSet(opts Options) *appsv1.StatefulSet
NewIngesterStatefulSet creates a deployment object for an ingester
func NewQuerierDeployment ¶
func NewQuerierDeployment(opts Options) *appsv1.Deployment
NewQuerierDeployment creates a deployment object for a querier
func NewQuerierGRPCService ¶
NewQuerierGRPCService creates a k8s service for the querier GRPC endpoint
func NewQuerierHTTPService ¶
NewQuerierHTTPService creates a k8s service for the querier HTTP endpoint
func NewQuerierServiceMonitor ¶
func NewQuerierServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
NewQuerierServiceMonitor creates a k8s service monitor for the querier component
func NewQueryFrontendDeployment ¶
func NewQueryFrontendDeployment(opts Options) *appsv1.Deployment
NewQueryFrontendDeployment creates a deployment object for a query-frontend
func NewQueryFrontendGRPCService ¶
NewQueryFrontendGRPCService creates a k8s service for the query-frontend GRPC endpoint
func NewQueryFrontendHTTPService ¶
NewQueryFrontendHTTPService creates a k8s service for the query-frontend HTTP endpoint
func NewQueryFrontendServiceMonitor ¶
func NewQueryFrontendServiceMonitor(opts Options) *monitoringv1.ServiceMonitor
NewQueryFrontendServiceMonitor creates a k8s service monitor for the query-frontend component
func QuerierName ¶
QuerierName is the name of the querier deployment
func QueryFrontendName ¶
QueryFrontendName is the name of the query-frontend statefulset
Types ¶
type FeatureFlags ¶
type FeatureFlags struct { EnableCertificateSigningService bool EnableServiceMonitors bool EnableTLSServiceMonitorConfig bool EnableGateway bool EnableGatewayRoute bool }
FeatureFlags contains flags that activate various features
type ObjectStorage ¶
type ObjectStorage struct { Endpoint string Region string Buckets string AccessKeyID string AccessKeySecret string }
ObjectStorage for storage config.
type Options ¶
type Options struct { Name string Namespace string Image string GatewayImage string GatewayBaseDomain string ConfigSHA1 string Flags FeatureFlags Stack lokiv1beta1.LokiStackSpec ResourceRequirements internal.ComponentResources ObjectStorage ObjectStorage OpenShiftOptions openshift.Options TenantSecrets []*TenantSecrets TenantConfigMap map[string]openshift.TenantData }
Options is a set of configuration values to use when building manifests such as resource sizes, etc. Most of this should be provided - either directly or indirectly - by the user.