Chore: K8s registration cleanup (#97373)

cleanup
eleijonmarck/lbac-for-datasources/allow-serviceaccounts-passthrough
Ryan McKinley 8 months ago committed by GitHub
parent 3d05f21abd
commit b7066aa7dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      pkg/registry/apis/peakq/register.go
  2. 5
      pkg/registry/apis/query/register.go
  3. 2
      pkg/registry/apis/service/register.go

@ -35,7 +35,7 @@ func RegisterAPIService(features featuremgmt.FeatureToggles, apiregistration bui
return nil // skip registration unless explicitly added (or all experimental are added)
}
builder := NewPeakQAPIBuilder()
apiregistration.RegisterAPI(NewPeakQAPIBuilder())
apiregistration.RegisterAPI(builder)
return builder
}

@ -98,8 +98,9 @@ func RegisterAPIService(features featuremgmt.FeatureToggles,
tracer tracing.Tracer,
legacy service.LegacyDataSourceLookup,
) (*QueryAPIBuilder, error) {
if !(features.IsEnabledGlobally(featuremgmt.FlagQueryService) ||
features.IsEnabledGlobally(featuremgmt.FlagGrafanaAPIServerWithExperimentalAPIs)) {
if !featuremgmt.AnyEnabled(features,
featuremgmt.FlagQueryService,
featuremgmt.FlagGrafanaAPIServerWithExperimentalAPIs) {
return nil, nil // skip registration unless explicitly added (or all experimental are added)
}

@ -31,7 +31,7 @@ func RegisterAPIService(features featuremgmt.FeatureToggles, apiregistration bui
}
builder := NewServiceAPIBuilder()
apiregistration.RegisterAPI(NewServiceAPIBuilder())
apiregistration.RegisterAPI(builder)
return builder
}

Loading…
Cancel
Save