Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/operator/internal/manifests/options.go

90 lines
2.8 KiB

package manifests
import (
configv1 "github.com/grafana/loki/operator/apis/config/v1"
projectconfigv1 "github.com/grafana/loki/operator/apis/config/v1"
lokiv1 "github.com/grafana/loki/operator/apis/loki/v1"
lokiv1beta1 "github.com/grafana/loki/operator/apis/loki/v1beta1"
"github.com/grafana/loki/operator/internal/manifests/internal"
"github.com/grafana/loki/operator/internal/manifests/openshift"
"github.com/grafana/loki/operator/internal/manifests/storage"
)
// 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.
type Options struct {
Name string
Namespace string
Image string
GatewayImage string
GatewayBaseDomain string
ConfigSHA1 string
TLSProfileType projectconfigv1.TLSProfileType
TLSProfileSpec projectconfigv1.TLSProfileSpec
Gates configv1.FeatureGates
Stack lokiv1.LokiStackSpec
ResourceRequirements internal.ComponentResources
AlertingRules []lokiv1beta1.AlertingRule
RecordingRules []lokiv1beta1.RecordingRule
Ruler Ruler
ObjectStorage storage.Options
OpenShiftOptions openshift.Options
Tenants Tenants
}
// Tenants contains the configuration per tenant and secrets for authn/authz.
// Secrets are required only for modes static and dynamic to reconcile the OIDC provider.
// Configs are required only for all modes to reconcile rules and gateway configuration.
type Tenants struct {
Secrets []*TenantSecrets
Configs map[string]TenantConfig
}
// TenantSecrets for clientID, clientSecret and issuerCAPath for tenant's authentication.
type TenantSecrets struct {
TenantName string
ClientID string
ClientSecret string
IssuerCAPath string
}
// TenantConfig for tenant authorizationconfig
type TenantConfig struct {
OIDC *TenantOIDCSpec
OPA *TenantOPASpec
OpenShift *TenantOpenShiftSpec
RuleFiles []string
}
// TenantOIDCSpec stub config for OIDC configuration options (e.g. used in static or dynamic mode)
type TenantOIDCSpec struct{}
// TenantOPASpec stub config for OPA configuration options (e.g. used in dynamic mode)
type TenantOPASpec struct{}
// TenantOpenShiftSpec config for OpenShift authentication options (e.g. used in openshift-logging mode)
type TenantOpenShiftSpec struct {
CookieSecret string
}
// Ruler configuration for manifests generation.
type Ruler struct {
Spec *lokiv1beta1.RulerConfigSpec
Secret *RulerSecret
}
// RulerSecret defines the ruler secret for remote write client auth
type RulerSecret struct {
// Username for basic authentication only.
Username string
// Password for basic authentication only.
Password string
// BearerToken contains the token used for bearer authentication.
BearerToken string
}