mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* add deployment registry API cloud only * update versions * add feature flag endpoints * use helpers * merge main * update AllowSelfServie and re-run code gen * fix package name * add allowselfserve flag to payload * remove config * update list api to return the full registry including states * change enabled check * fix compile error * add feature toggle and split path in frontend * changes * with status * add more status/state * add back config thing * add back config thing * merge main * merge main * now on the /current api endpoint * now on the /current api endpoint * drop frontend changes * change group name to featuretoggle (singular) * use the same settings * now with patch * more common refs * more common refs * WIP actually do the webhook * fix comment * fewer imports * registe standalone * one less file * fix singular name --------- Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
34 lines
1005 B
Go
34 lines
1005 B
Go
package v0alpha1
|
|
|
|
import (
|
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
|
|
common "github.com/grafana/grafana/pkg/apis/common/v0alpha1"
|
|
)
|
|
|
|
const (
|
|
GROUP = "featuretoggle.grafana.app"
|
|
VERSION = "v0alpha1"
|
|
APIVERSION = GROUP + "/" + VERSION
|
|
)
|
|
|
|
// FeatureResourceInfo represents each feature that may have a toggle
|
|
var FeatureResourceInfo = common.NewResourceInfo(GROUP, VERSION,
|
|
"features", "feature", "Feature",
|
|
func() runtime.Object { return &Feature{} },
|
|
func() runtime.Object { return &FeatureList{} },
|
|
)
|
|
|
|
// TogglesResourceInfo represents the actual configuration
|
|
var TogglesResourceInfo = common.NewResourceInfo(GROUP, VERSION,
|
|
"featuretoggles", "featuretoggle", "FeatureToggles",
|
|
func() runtime.Object { return &FeatureToggles{} },
|
|
func() runtime.Object { return &FeatureTogglesList{} },
|
|
)
|
|
|
|
var (
|
|
// SchemeGroupVersion is group version used to register these objects
|
|
SchemeGroupVersion = schema.GroupVersion{Group: GROUP, Version: VERSION}
|
|
)
|