feat: disable-reporting juju config option #471
Merged
+111
−66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Some users do not want to send anonymous usage statistics to
stats.grafana.org
. For example, in an air-gapped environment this may cause excess logs due to the endpoint being unreachable.Solution
Adding a config option
Add a juju config option to the loki charm. By default the config will send usage statistics and will not write to the config file. Only if the
reporting-enabled
option is set tofalse
, then we write to the analytics block withreporting_enabled=false
Add and fix tests
In an attempt to add scenario tests for testing this config option, the pin for ops=2.16 was removed and technical debt was removed to be compatible with the new ops.testing Scenario 7 syntax.
Context
Since we want to contribute to upstream open-source, we leave the default option as reporting enabled.
Testing Instructions
Note: Deploying
--config reporting-enabled=true
is functionally equivalent to not supplying a config.charmcraft pack
Deploy Loki default
loki
(reporting enabled by default)Deploy Loki with reporting disabled
loki-off
(reporting disabled)Upgrade Notes