K8s: fix standalone command and add hack scripts (#79052)

Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
This commit is contained in:
Ryan McKinley
2023-12-05 14:31:49 -08:00
committed by GitHub
co-authored by Charandas Batra
parent 66df17869d
commit 439edebcd6
21 changed files with 307 additions and 81 deletions
+8 -4
View File
@@ -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
}