Grafana controllers: Add generic disable setting (#112250)

This commit is contained in:
Stephanie Hingtgen
2025-10-10 11:21:10 -06:00
committed by GitHub
parent c67974251d
commit 7a26d48e88
4 changed files with 14 additions and 8 deletions
@@ -21,7 +21,7 @@ func TestIntegrationProvisioning_JobConflict(t *testing.T) {
// disable the controllers so the jobs don't get auto-processed
helper := runGrafana(t, func(opts *testinfra.GrafanaOpts) {
opts.DisableProvisioningControllers = true
opts.DisableControllers = true
})
ctx := context.Background()
+4 -4
View File
@@ -545,10 +545,10 @@ func CreateGrafDir(t *testing.T, opts GrafanaOpts) (string, string) {
require.NoError(t, err)
}
if opts.DisableProvisioningControllers {
provisioningSection, err := getOrCreateSection("provisioning")
if opts.DisableControllers {
apiserverSection, err := getOrCreateSection("grafana-apiserver")
require.NoError(t, err)
_, err = provisioningSection.NewKey("disable_controllers", "true")
_, err = apiserverSection.NewKey("disable_controllers", "true")
require.NoError(t, err)
}
@@ -622,7 +622,7 @@ type GrafanaOpts struct {
EnableRecordingRules bool
EnableSCIM bool
APIServerRuntimeConfig string
DisableProvisioningControllers bool
DisableControllers bool
// When "unified-grpc" is selected it will also start the grpc server
APIServerStorageType options.StorageType