K8s: fix standalone command and add hack scripts (#79052)
Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
This commit is contained in:
co-authored by
Charandas Batra
parent
66df17869d
commit
439edebcd6
@@ -36,14 +36,18 @@ type TestingAPIBuilder struct {
|
||||
gv schema.GroupVersion
|
||||
}
|
||||
|
||||
func NewTestingAPIBuilder() *TestingAPIBuilder {
|
||||
return &TestingAPIBuilder{
|
||||
gv: schema.GroupVersion{Group: GroupName, Version: VersionID},
|
||||
}
|
||||
}
|
||||
|
||||
func RegisterAPIService(features featuremgmt.FeatureToggles, apiregistration grafanaapiserver.APIRegistrar) *TestingAPIBuilder {
|
||||
if !features.IsEnabledGlobally(featuremgmt.FlagGrafanaAPIServerWithExperimentalAPIs) {
|
||||
return nil // skip registration unless opting into experimental apis
|
||||
}
|
||||
builder := &TestingAPIBuilder{
|
||||
gv: schema.GroupVersion{Group: GroupName, Version: VersionID},
|
||||
}
|
||||
apiregistration.RegisterAPI(builder)
|
||||
builder := NewTestingAPIBuilder()
|
||||
apiregistration.RegisterAPI(NewTestingAPIBuilder())
|
||||
return builder
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user