Skip to content

Commit

Permalink
Merge pull request #387 from xperimental/disable-log-level-discovery-6.0
Browse files Browse the repository at this point in the history
LOG-6320: Disable log level discovery for OpenShift tenancy modes
  • Loading branch information
openshift-merge-bot[bot] authored Oct 28, 2024
2 parents 7935ad6 + a5b550f commit 7bff32d
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
2 changes: 2 additions & 0 deletions operator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Release 6.0.2

- [14613](https://github.com/grafana/loki/pull/14613) **xperimental**: fix(operator): Disable log level discovery for OpenShift tenancy modes
- [14506](https://github.com/grafana/loki/pull/14506) **xperimental**: fix(operator): Disable automatic discovery of service name
- [14587](https://github.com/grafana/loki/pull/14587) **JoaoBraveCoding**: fix(operator): correctly ignore again BlotDB dashboards
- [14526](https://github.com/grafana/loki/pull/14526) **periklis**: feat(operator): Update Loki operand to v3.2.1
- [14568](https://github.com/grafana/loki/pull/14568) **periklis**: refactor(operator)!: Rename loki api go module
Expand Down
14 changes: 14 additions & 0 deletions operator/internal/manifests/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func ConfigOptions(opt Options) config.Options {
ObjectStorage: opt.ObjectStorage,
HTTPTimeouts: opt.Timeouts.Loki,
EnableRemoteReporting: opt.Gates.GrafanaLabsUsageReport,
DiscoverLogLevels: discoverLogLevels(&opt.Stack),
Ruler: config.Ruler{
Enabled: rulerEnabled,
RulesStorageDirectory: rulesStorageDirectory,
Expand Down Expand Up @@ -395,3 +396,16 @@ func retentionConfig(ls *lokiv1.LokiStackSpec) config.RetentionOptions {
DeleteWorkerCount: deleteWorkerCountMap[ls.Size],
}
}

func discoverLogLevels(ls *lokiv1.LokiStackSpec) bool {
if ls.Tenants == nil {
return true
}

if ls.Tenants.Mode == lokiv1.OpenshiftLogging ||
ls.Tenants.Mode == lokiv1.OpenshiftNetwork {
return false
}

return true
}
19 changes: 19 additions & 0 deletions operator/internal/manifests/internal/config/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: true
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -259,6 +260,7 @@ overrides:
},
Shippers: []string{"boltdb"},
EnableRemoteReporting: true,
DiscoverLogLevels: true,
HTTPTimeouts: HTTPTimeoutConfig{
IdleTimeout: 30 * time.Second,
ReadTimeout: 30 * time.Second,
Expand Down Expand Up @@ -355,6 +357,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -782,6 +785,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -1141,6 +1145,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -1501,6 +1506,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -1895,6 +1901,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -2231,6 +2238,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -2671,6 +2679,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -2996,6 +3005,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -3494,6 +3504,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -3756,6 +3767,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -4019,6 +4031,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -4283,6 +4296,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -4583,6 +4597,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -4881,6 +4896,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -5380,6 +5396,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -5557,6 +5574,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down Expand Up @@ -5727,6 +5745,7 @@ limits_config:
max_line_size: 256000
max_entries_limit_per_query: 5000
discover_service_name: []
discover_log_levels: false
max_global_streams_per_user: 0
max_chunks_per_query: 2000000
max_query_length: 721h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ limits_config:
max_line_size: {{ .Stack.Limits.Global.IngestionLimits.MaxLineSize }}
max_entries_limit_per_query: {{ .Stack.Limits.Global.QueryLimits.MaxEntriesLimitPerQuery }}
discover_service_name: []
discover_log_levels: {{ .DiscoverLogLevels }}
max_global_streams_per_user: {{ .Stack.Limits.Global.IngestionLimits.MaxGlobalStreamsPerTenant }}
max_chunks_per_query: {{ .Stack.Limits.Global.QueryLimits.MaxChunksPerQuery }}
max_query_length: 721h
Expand Down
1 change: 1 addition & 0 deletions operator/internal/manifests/internal/config/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type Options struct {
MaxConcurrent MaxConcurrent
WriteAheadLog WriteAheadLog
EnableRemoteReporting bool
DiscoverLogLevels bool
Shippers []string

ObjectStorage storage.Options
Expand Down

0 comments on commit 7bff32d

Please sign in to comment.