k8s: Add a dev only feature flag and simple service to get a client (#60204)

This commit is contained in:
Ryan McKinley
2022-12-13 07:41:16 -08:00
committed by GitHub
parent ebd728a99a
commit cf055ab4ec
15 changed files with 388 additions and 21 deletions
+13 -2
View File
@@ -152,13 +152,24 @@ func (s *ServiceImpl) getServerAdminNode(c *models.ReqContext) *navtree.NavLink
}
if hasAccess(ac.ReqGrafanaAdmin, ac.EvalPermission(ac.ActionSettingsRead)) && s.features.IsEnabled(featuremgmt.FlagStorage) {
adminNavLinks = append(adminNavLinks, &navtree.NavLink{
storage := &navtree.NavLink{
Text: "Storage",
Id: "storage",
SubTitle: "Manage file storage",
Icon: "cube",
Url: s.cfg.AppSubURL + "/admin/storage",
})
}
adminNavLinks = append(adminNavLinks, storage)
if s.features.IsEnabled(featuremgmt.FlagK8s) {
storage.Children = append(storage.Children, &navtree.NavLink{
Text: "Kubernetes",
Id: "k8s",
SubTitle: "Manage k8s storage",
Icon: "cube",
Url: s.cfg.AppSubURL + "/admin/storage/k8s",
})
}
}
if s.cfg.LDAPEnabled && hasAccess(ac.ReqGrafanaAdmin, ac.EvalPermission(ac.ActionLDAPStatusRead)) {