feat: gate GPU Service on Kubernetes cluster availability
GPU Service today only schedules on Kubernetes clusters; Docker / cloud clusters can't host the CRDs. Without any awareness of that, Org members whose Org has no K8s cluster (and no cluster_access grant on one) saw a menu they couldn't use and a form that bottomed out with backend errors. Two changes lock the UX down: - Boot probes the caller's cluster list once and stashes hasKubernetesCluster in initialState. A new canSeeGpuService predicate gates the menu — admins and Org owners always see it (they can add the cluster); everyone else only sees it when a reachable K8s cluster actually exists. - The instances page filters its own cluster list to Kubernetes before deciding what to show. With nothing reachable we render the Deployments-style 'No clusters available. Add a Kubernetes cluster to get started.' empty state and hide the create-instance CTA; admins and Org owners additionally get the 'Add cluster' button that jumps to cluster management.
This commit is contained in:
@@ -37,6 +37,8 @@ export default {
|
||||
'noresult.catalog.nofound': 'Подходящие модели не найдены.',
|
||||
'noresult.resources.cluster':
|
||||
'No clusters available. Add a cluster to get started.',
|
||||
'noresult.resources.k8sCluster':
|
||||
'No clusters available. Add a Kubernetes cluster to get started.',
|
||||
'noresult.resources.worker':
|
||||
'No workers available. Add a worker to get started.',
|
||||
'noresult.resources.gotocluster': 'Create Your First Cluster',
|
||||
@@ -67,8 +69,7 @@ export default {
|
||||
'noresult.gpuservice.storage.subTitle': 'Хранилища ещё не добавлены.',
|
||||
'noresult.gpuservice.storage.nofound': 'Подходящие хранилища не найдены.',
|
||||
'noresult.gpuservice.storageType.title': 'Нет типов хранилищ',
|
||||
'noresult.gpuservice.storageType.subTitle':
|
||||
'Типы хранилищ ещё не добавлены.',
|
||||
'noresult.gpuservice.storageType.subTitle': 'Типы хранилищ ещё не добавлены.',
|
||||
'noresult.gpuservice.storageType.nofound':
|
||||
'Подходящие типы хранилищ не найдены.',
|
||||
'noresult.gpuservice.sshkey.title': 'Нет открытых ключей SSH',
|
||||
|
||||
Reference in New Issue
Block a user