operator: Update Loki operand to v2.5.0 (#5884)

pull/5893/head
Periklis Tsirakidis 4 years ago committed by GitHub
parent 99c5b35895
commit 8dee5b9503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      operator/CHANGELOG.md
  2. 4
      operator/bundle/manifests/loki-operator.clusterserviceversion.yaml
  3. 2
      operator/config/overlays/development/manager_related_image_patch.yaml
  4. 2
      operator/config/overlays/openshift/manager_related_image_patch.yaml
  5. 2
      operator/config/overlays/production/manager_related_image_patch.yaml
  6. 3
      operator/internal/manifests/config.go
  7. 11
      operator/internal/manifests/internal/config/build_test.go
  8. 5
      operator/internal/manifests/internal/config/loki-config.yaml
  9. 19
      operator/internal/manifests/internal/config/options.go
  10. 1
      operator/internal/manifests/options.go
  11. 2
      operator/internal/manifests/var.go
  12. 26
      operator/main.go

@ -1,5 +1,6 @@
## Main
- [5884](https://github.com/grafana/loki/pull/5884) **periklis**: Update Loki operand to v2.5.0
- [5748](https://github.com/grafana/loki/pull/5748) **Red-GV**: Update Prometheus go client to 12.1
- [5739](https://github.com/grafana/loki/pull/5739) **sasagarw**: Change UUIDs to tenant name in doc
- [5729](https://github.com/grafana/loki/pull/5729) **periklis**: Add missing label matcher for openshift logging tenant mode (OpenShift)

@ -617,7 +617,7 @@ spec:
- /manager
env:
- name: RELATED_IMAGE_LOKI
value: quay.io/openshift-logging/loki:v2.4.2
value: quay.io/openshift-logging/loki:v2.5.0
- name: RELATED_IMAGE_GATEWAY
value: quay.io/observatorium/api:latest
- name: RELATED_IMAGE_OPA
@ -718,7 +718,7 @@ spec:
relatedImages:
- image: quay.io/observatorium/opa-openshift:latest
name: opa
- image: quay.io/openshift-logging/loki:v2.4.2
- image: quay.io/openshift-logging/loki:v2.5.0
name: loki
- image: quay.io/observatorium/api:latest
name: gateway

@ -9,6 +9,6 @@ spec:
- name: manager
env:
- name: RELATED_IMAGE_LOKI
value: docker.io/grafana/loki:2.4.2
value: docker.io/grafana/loki:2.5.0
- name: RELATED_IMAGE_GATEWAY
value: quay.io/observatorium/api:latest

@ -9,7 +9,7 @@ spec:
- name: manager
env:
- name: RELATED_IMAGE_LOKI
value: quay.io/openshift-logging/loki:v2.4.2
value: quay.io/openshift-logging/loki:v2.5.0
- name: RELATED_IMAGE_GATEWAY
value: quay.io/observatorium/api:latest
- name: RELATED_IMAGE_OPA

@ -9,6 +9,6 @@ spec:
- name: manager
env:
- name: RELATED_IMAGE_LOKI
value: docker.io/grafana/loki:2.4.2
value: docker.io/grafana/loki:2.5.0
- name: RELATED_IMAGE_GATEWAY
value: quay.io/observatorium/api:latest

@ -70,7 +70,8 @@ func ConfigOptions(opt Options) config.Options {
Directory: walDirectory,
IngesterMemoryRequest: opt.ResourceRequirements.Ingester.Requests.Memory().Value(),
},
ObjectStorage: opt.ObjectStorage,
ObjectStorage: opt.ObjectStorage,
EnableRemoteReporting: opt.Flags.EnableGrafanaLabsStats,
}
}

@ -45,6 +45,7 @@ ingester:
chunk_idle_period: 1h
chunk_retain_period: 5m
chunk_target_size: 2097152
flush_op_timeout: 10m
lifecycler:
final_sleep: 0s
heartbeat_period: 5s
@ -100,6 +101,7 @@ limits_config:
max_cache_freshness_per_query: 10m
per_stream_rate_limit: 3MB
per_stream_rate_limit_burst: 15MB
split_queries_by_interval: 30m
memberlist:
abort_if_cluster_join_fails: true
bind_port: 7946
@ -126,7 +128,6 @@ query_range:
enable_fifocache: true
fifocache:
max_size_bytes: 500MB
split_queries_by_interval: 30m
parallelise_shardable_queries: true
schema_config:
configs:
@ -159,6 +160,8 @@ storage_config:
server_address: dns:///loki-index-gateway-grpc-lokistack-dev.default.svc.cluster.local:9095
tracing:
enabled: false
analytics:
reporting_enabled: true
`
expRCfg := `
---
@ -222,6 +225,7 @@ overrides:
AccessKeySecret: "test123",
},
},
EnableRemoteReporting: true,
}
cfg, rCfg, err := Build(opts)
require.NoError(t, err)
@ -266,6 +270,7 @@ ingester:
chunk_idle_period: 1h
chunk_retain_period: 5m
chunk_target_size: 2097152
flush_op_timeout: 10m
lifecycler:
final_sleep: 0s
heartbeat_period: 5s
@ -321,6 +326,7 @@ limits_config:
max_cache_freshness_per_query: 10m
per_stream_rate_limit: 3MB
per_stream_rate_limit_burst: 15MB
split_queries_by_interval: 30m
memberlist:
abort_if_cluster_join_fails: true
bind_port: 7946
@ -347,7 +353,6 @@ query_range:
enable_fifocache: true
fifocache:
max_size_bytes: 500MB
split_queries_by_interval: 30m
parallelise_shardable_queries: true
schema_config:
configs:
@ -380,6 +385,8 @@ storage_config:
server_address: dns:///loki-index-gateway-grpc-lokistack-dev.default.svc.cluster.local:9095
tracing:
enabled: false
analytics:
reporting_enabled: false
`
expRCfg := `
---

@ -63,6 +63,7 @@ ingester:
chunk_idle_period: 1h
chunk_retain_period: 5m
chunk_target_size: 2097152
flush_op_timeout: 10m
max_chunk_age: 2h
lifecycler:
final_sleep: 0s
@ -118,6 +119,7 @@ limits_config:
max_cache_freshness_per_query: 10m
per_stream_rate_limit: 3MB
per_stream_rate_limit_burst: 15MB
split_queries_by_interval: 30m
memberlist:
abort_if_cluster_join_fails: true
bind_port: {{ .GossipRing.Port }}
@ -144,7 +146,6 @@ query_range:
enable_fifocache: true
fifocache:
max_size_bytes: 500MB
split_queries_by_interval: 30m
parallelise_shardable_queries: true
schema_config:
configs:
@ -177,3 +178,5 @@ storage_config:
server_address: dns:///{{ .IndexGateway.FQDN }}:{{ .IndexGateway.Port }}
tracing:
enabled: false
analytics:
reporting_enabled: {{ .EnableRemoteReporting }}

@ -12,15 +12,16 @@ import (
type Options struct {
Stack lokiv1beta1.LokiStackSpec
Namespace string
Name string
FrontendWorker Address
GossipRing Address
Querier Address
IndexGateway Address
StorageDirectory string
MaxConcurrent MaxConcurrent
WriteAheadLog WriteAheadLog
Namespace string
Name string
FrontendWorker Address
GossipRing Address
Querier Address
IndexGateway Address
StorageDirectory string
MaxConcurrent MaxConcurrent
WriteAheadLog WriteAheadLog
EnableRemoteReporting bool
ObjectStorage storage.Options
}

@ -37,6 +37,7 @@ type FeatureFlags struct {
EnablePrometheusAlerts bool
EnableGateway bool
EnableGatewayRoute bool
EnableGrafanaLabsStats bool
}
// TenantSecrets for clientID, clientSecret and issuerCAPath for tenant's authentication.

@ -35,7 +35,7 @@ const (
EnvRelatedImageGateway = "RELATED_IMAGE_GATEWAY"
// DefaultContainerImage declares the default fallback for loki image.
DefaultContainerImage = "docker.io/grafana/loki:2.4.2"
DefaultContainerImage = "docker.io/grafana/loki:2.5.0"
// DefaultLokiStackGatewayImage declares the default image for lokiStack-gateway.
DefaultLokiStackGatewayImage = "quay.io/observatorium/api:latest"

@ -40,15 +40,16 @@ func init() {
func main() {
var (
metricsAddr string
enableLeaderElection bool
probeAddr string
enableCertSigning bool
enableServiceMonitors bool
enableTLSServiceMonitors bool
enableGateway bool
enableGatewayRoute bool
enablePrometheusAlerts bool
metricsAddr string
enableLeaderElection bool
probeAddr string
enableCertSigning bool
enableServiceMonitors bool
enableTLSServiceMonitors bool
enableGateway bool
enableGatewayRoute bool
enablePrometheusAlerts bool
enableGrafanaLabsAnalytics bool
)
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
@ -64,8 +65,10 @@ func main() {
flag.BoolVar(&enableGateway, "with-lokistack-gateway", false,
"Enables the manifest creation for the entire lokistack-gateway.")
flag.BoolVar(&enableGatewayRoute, "with-lokistack-gateway-route", false,
"Enables the usage of Route for the lokistack-gateway instead of Ingress (OCP Only!)")
flag.BoolVar(&enablePrometheusAlerts, "with-prometheus-alerts", false, "Enables prometheus alerts")
"Enables the usage of Route for the lokistack-gateway instead of Ingress (OCP Only!).")
flag.BoolVar(&enablePrometheusAlerts, "with-prometheus-alerts", false, "Enables prometheus alerts.")
flag.BoolVar(&enableGrafanaLabsAnalytics, "with-grafana-labs-analytics", true,
"Enables Grafana Labs analytics.\nMore info: https://grafana.com/docs/loki/latest/configuration/#analytics")
flag.Parse()
logger := log.NewLogger("loki-operator")
@ -108,6 +111,7 @@ func main() {
EnablePrometheusAlerts: enablePrometheusAlerts,
EnableGateway: enableGateway,
EnableGatewayRoute: enableGatewayRoute,
EnableGrafanaLabsStats: enableGrafanaLabsAnalytics,
}
if err = (&controllers.LokiStackReconciler{

Loading…
Cancel
Save