Feature Toggles: Switch feature toggle admin page over to k8s API (#80854)

* add handling for legacy and k8s apis to frontend

* use backend srv directly not redux

* add unit test to make sure the correct apis are being called

* require api server flag

* fix feature toggle name

* ensure both pages work correctly

* make consistent with legacy api

* implement webhook update

* fix unit test

* remove old apis and update

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
Michael Mandrus
2024-02-01 23:52:02 -05:00
committed by GitHub
parent 9c9e5e68c8
commit 7464ea4346
17 changed files with 348 additions and 775 deletions
@@ -318,9 +318,16 @@ func schema_pkg_apis_featuretoggle_v0alpha1_ResolvedToggleState(ref common.Refer
Format: "",
},
},
"writeable": {
"allowEditing": {
SchemaProps: spec.SchemaProps{
Description: "Can any flag be updated",
Description: "The user is allowed to edit feature toggles on this system",
Type: []string{"boolean"},
Format: "",
},
},
"restartRequired": {
SchemaProps: spec.SchemaProps{
Description: "The system has changes that require still require a restart",
Type: []string{"boolean"},
Format: "",
},
@@ -395,6 +402,7 @@ func schema_pkg_apis_featuretoggle_v0alpha1_ToggleStatus(ref common.ReferenceCal
"writeable": {
SchemaProps: spec.SchemaProps{
Description: "Can this flag be updated",
Default: false,
Type: []string{"boolean"},
Format: "",
},
@@ -413,7 +421,7 @@ func schema_pkg_apis_featuretoggle_v0alpha1_ToggleStatus(ref common.ReferenceCal
},
},
},
Required: []string{"name", "enabled"},
Required: []string{"name", "enabled", "writeable"},
},
},
Dependencies: []string{