2022-07-06 06:08:45 +00:00
< page-header
ng-if="ctrl.state.viewReady"
title="'Namespace details'"
breadcrumbs="[{ label:'Namespaces', link:'kubernetes.resourcePools' }, ctrl.pool.Namespace.Name]"
reload="true"
>< / page-header >
2020-07-05 23:21:03 +00:00
< kubernetes-view-loading view-ready = "ctrl.state.viewReady" > < / kubernetes-view-loading >
< div ng-if = "ctrl.state.viewReady" >
< div class = "row" >
< div class = "col-sm-12" >
< rd-widget >
< rd-widget-body classes = "no-padding" >
< uib-tabset active = "ctrl.state.activeTab" justified = "true" type = "pills" >
< uib-tab index = "0" classes = "btn-sm" select = "ctrl.selectTab(0)" >
2022-08-04 02:45:44 +00:00
< uib-tab-heading class = "vertical-center" > < pr-icon icon = "'layers'" feather = "true" > < / pr-icon > Namespace < / uib-tab-heading >
2022-01-17 05:53:32 +00:00
< form class = "form-horizontal" autocomplete = "off" name = "resourcePoolEditForm" style = "padding: 20px; margin-top: 10px" >
2020-07-05 23:21:03 +00:00
<!-- name - input -->
< div class = "form-group" >
2021-08-26 14:00:59 +00:00
< div class = "col-sm-12" >
< table class = "table" >
< tbody >
< tr >
< td > Name< / td >
< td >
{{ ctrl.pool.Namespace.Name }}
< span class = "label label-info image-tag label-margins" ng-if = "ctrl.isSystem" > system< / span >
< / td >
< / tr >
< / tbody >
< / table >
2020-07-05 23:21:03 +00:00
< / div >
< / div >
<!-- !name - input -->
2022-08-04 02:45:44 +00:00
< div ng-if = "ctrl.isAdmin && ctrl.isEditable" class = "col-sm-12 form-section-title" > Resource quota< / div >
2020-07-05 23:21:03 +00:00
<!-- quotas - switch -->
2020-08-07 00:03:00 +00:00
< div ng-if = "ctrl.isAdmin && ctrl.isEditable" class = "form-group" >
2022-08-04 02:45:44 +00:00
< div class = "col-sm-12 mt-2" ng-if = "ctrl.state.resourceOverCommitEnabled" >
< div class = "form-group" >
< div class = "col-sm-3 col-lg-2" >
< label class = "control-label text-left" > Resource assignment < / label >
< / div >
< div class = "col-sm-9 pt-2" >
< label class = "switch" >
< input type = "checkbox" ng-model = "ctrl.formValues.HasQuota" / >
< span class = "slider round" > < / span >
< / label >
< / div >
< / div >
2020-07-05 23:21:03 +00:00
< / div >
< / div >
2020-08-12 23:30:23 +00:00
< div class = "form-group" ng-if = "ctrl.formValues.HasQuota && ctrl.isAdmin && ctrl.isEditable && !ctrl.isQuotaValid()" >
2022-09-14 23:09:19 +00:00
< div class = "col-sm-12 small text-warning" >
2022-08-04 02:45:44 +00:00
< p class = "vertical-center" >
< pr-icon icon = "'alert-triangle'" feather = "true" mode = "'warning'" > < / pr-icon >
Not enough resources available in the cluster to apply a resource reservation.
< / p >
< / div >
2020-07-05 23:21:03 +00:00
< / div >
2021-02-26 15:50:33 +00:00
< div ng-if = "ctrl.formValues.HasQuota" >
< kubernetes-resource-reservation
ng-if="ctrl.pool.Quota"
2021-04-27 08:12:34 +00:00
description="Resource reservation represents the total amount of resource assigned to all the applications deployed inside this namespace."
2021-07-28 02:26:03 +00:00
cpu-reservation="ctrl.state.resourceReservation.CPU"
memory-reservation="ctrl.state.resourceReservation.Memory"
2021-02-26 15:50:33 +00:00
cpu-limit="ctrl.formValues.CpuLimit"
memory-limit="ctrl.formValues.MemoryLimit"
2021-07-28 02:26:03 +00:00
display-usage="ctrl.state.useServerMetrics"
cpu-usage="ctrl.state.resourceUsage.CPU"
memory-usage="ctrl.state.resourceUsage.Memory"
2021-02-26 15:50:33 +00:00
>
< / kubernetes-resource-reservation >
< / div >
2020-07-05 23:21:03 +00:00
<!-- !quotas - switch -->
2020-08-12 23:30:23 +00:00
< div ng-if = "ctrl.formValues.HasQuota && ctrl.isAdmin && ctrl.isEditable" >
2022-01-17 05:53:32 +00:00
< div class = "col-sm-12 form-section-title" > Resource limits < / div >
2020-07-05 23:21:03 +00:00
< div >
<!-- memory - limit - input -->
2022-08-12 18:22:45 +00:00
< div class = "form-group flex" >
< label for = "memory-limit" class = "col-sm-3 col-lg-2 control-label text-left vertical-center" > Memory limit (MB) < / label >
< div class = "col-sm-6" >
2020-07-05 23:21:03 +00:00
< slider
model="ctrl.formValues.MemoryLimit"
2021-02-26 15:50:33 +00:00
floor="ctrl.ResourceQuotaDefaults.MemoryLimit"
2020-07-05 23:21:03 +00:00
ceil="ctrl.state.sliderMaxMemory"
step="128"
ng-if="ctrl.state.sliderMaxMemory"
>< / slider >
< / div >
2022-08-12 18:22:45 +00:00
< div class = "col-sm-2 vertical-center" >
2020-07-05 23:21:03 +00:00
< input
name="memory_limit"
type="number"
2021-02-26 15:50:33 +00:00
min="{{ ctrl.ResourceQuotaDefaults.MemoryLimit }}"
2020-07-05 23:21:03 +00:00
max="{{ ctrl.state.sliderMaxMemory }}"
class="form-control"
ng-model="ctrl.formValues.MemoryLimit"
id="memory-limit"
required
/>
< / div >
< / div >
< div class = "form-group" ng-show = "resourcePoolEditForm.memory_limit.$invalid" >
2022-08-12 18:22:45 +00:00
< div class = "col-sm-3 col-lg-2" > < / div >
2022-09-14 23:09:19 +00:00
< div class = "col-sm-8 small text-warning" >
2020-07-05 23:21:03 +00:00
< div ng-messages = "resourcePoolEditForm.pool_name.$error" >
2022-08-04 02:45:44 +00:00
< p class = "vertical-center" >
< pr-icon icon = "'alert-triangle'" feather = "true" mode = "'warning'" > < / pr-icon > Value must be between {{ ctrl.ResourceQuotaDefaults.MemoryLimit }} and
{{ ctrl.state.sliderMaxMemory }}.
< / p >
2020-07-05 23:21:03 +00:00
< / div >
< / div >
< / div >
<!-- !memory - limit - input -->
<!-- cpu - limit - input -->
< div class = "form-group" >
2022-01-17 05:53:32 +00:00
< label for = "cpu-limit" class = "col-sm-3 col-lg-2 control-label text-left" style = "margin-top: 20px" > CPU limit < / label >
2022-08-12 18:22:45 +00:00
< div class = "col-sm-8" >
2020-07-05 23:21:03 +00:00
< slider
model="ctrl.formValues.CpuLimit"
2021-02-26 15:50:33 +00:00
floor="ctrl.ResourceQuotaDefaults.CpuLimit"
2020-07-05 23:21:03 +00:00
ceil="ctrl.state.sliderMaxCpu"
step="0.1"
precision="2"
ng-if="ctrl.state.sliderMaxCpu"
>< / slider >
< / div >
< / div >
<!-- !cpu - limit - input -->
< / div >
< / div >
2021-02-26 15:50:33 +00:00
<!-- #region LOADBALANCERS -->
2022-01-17 05:53:32 +00:00
< div class = "col-sm-12 form-section-title" > Load balancers < / div >
2021-02-26 15:50:33 +00:00
< div class = "form-group" >
2022-08-04 02:45:44 +00:00
< div class = "col-sm-12 small text-muted" >
< p class = "vertical-center" >
2022-08-12 18:22:45 +00:00
< pr-icon icon = "'info'" mode = "'primary'" feather = "true" > < / pr-icon >
2022-08-04 02:45:44 +00:00
You can set a quota on the amount of external load balancers that can be created inside this namespace. Set this quota to 0 to effectively disable the use of
load balancers in this namespace.
< / p >
< / div >
2021-02-26 15:50:33 +00:00
< / div >
< div class = "form-group" >
< div class = "col-sm-12" >
2021-10-06 06:24:26 +00:00
< por-switch-field
2021-12-14 19:14:53 +00:00
data-cy="'k8sNamespaceCreate-loadBalancerQuotaToggle'"
label="'Load Balancer quota'"
2022-08-04 02:45:44 +00:00
label-class="'col-sm-3 col-lg-2'"
2021-12-14 19:14:53 +00:00
name="'k8s-resourcepool-Lbquota'"
feature-id="ctrl.LBQuotaFeatureId"
checked="ctrl.formValues.UseLoadBalancersQuota"
on-change="(ctrl.onToggleLoadBalancersQuota)"
2021-10-06 06:24:26 +00:00
>< / por-switch-field >
2021-02-26 15:50:33 +00:00
< / div >
< / div >
<!-- #endregion -->
2022-09-26 19:43:24 +00:00
< div ng-if = "ctrl.isAdmin && ctrl.isEditable && ctrl.state.ingressAvailabilityPerNamespace" >
2020-08-20 00:51:14 +00:00
<!-- #region INGRESSES -->
2022-09-26 19:43:24 +00:00
< div class = "col-sm-12 form-section-title" > Networking < / div >
< ingress-class-datatable
ng-if="ctrl.state.ingressAvailabilityPerNamespace"
on-change-availability="(ctrl.onChangeIngressControllerAvailability)"
ingress-controllers="ctrl.ingressControllers"
description="'Enable the ingress controllers that users can select when publishing applications in this namespace.'"
no-ingress-controller-label="'No ingress controllers found in the cluster. Go to the cluster setup view to configure and allow the use of ingress controllers in the cluster.'"
view="'namespace'"
>< / ingress-class-datatable >
2020-08-20 00:51:14 +00:00
<!-- #endregion -->
2020-08-12 23:30:23 +00:00
< / div >
2021-07-14 09:15:21 +00:00
<!-- #region REGISTRIES -->
< div >
2022-01-17 05:53:32 +00:00
< div class = "col-sm-12 form-section-title" > Registries < / div >
2021-07-14 09:15:21 +00:00
2021-09-03 13:47:37 +00:00
< div class = "form-group" ng-if = "!ctrl.isAdmin || ctrl.isSystem" >
2022-01-17 05:53:32 +00:00
< label class = "col-sm-3 col-lg-2 control-label text-left" style = "padding-top: 0" > Selected registries < / label >
2021-07-14 09:15:21 +00:00
< div class = "col-sm-9 col-lg-4" >
2021-09-03 13:47:37 +00:00
{{ ctrl.selectedRegistries ? ctrl.selectedRegistries : 'None' }}
2021-07-14 09:15:21 +00:00
< / div >
< / div >
2021-09-03 13:47:37 +00:00
< div ng-if = "ctrl.isAdmin && !ctrl.isSystem" >
2021-07-14 09:15:21 +00:00
< div class = "form-group" >
< div class = "col-sm-12 small text-muted" >
2022-08-04 02:45:44 +00:00
< p class = "vertical-center" >
2022-08-12 18:22:45 +00:00
< pr-icon icon = "'info'" mode = "'primary'" feather = "true" > < / pr-icon >
2022-08-04 02:45:44 +00:00
Define which registries can be used by users who have access to this namespace.
2021-07-14 09:15:21 +00:00
< / p >
< / div >
< / div >
< div class = "form-group" >
2022-09-21 07:10:58 +00:00
< label class = "col-sm-3 col-lg-2 control-label text-left !pt-0" for = "registries-selector" > Select registries < / label >
< div class = "col-sm-9 col-lg-4" >
2022-08-12 18:22:45 +00:00
< span class = "small text-muted" ng-if = "!ctrl.registries.length && ctrl.isAdmin" >
No registries available. Head over to the < a ui-sref = "portainer.registries" > registry view< / a > to define a container registry.
2021-07-14 09:15:21 +00:00
< / span >
2022-08-12 18:22:45 +00:00
< span class = "small text-muted" ng-if = "!ctrl.registries.length && !ctrl.isAdmin" >
2021-07-14 09:15:21 +00:00
No registries available. Contact your administrator to create a container registry.
< / span >
2022-09-21 07:10:58 +00:00
< create-namespace-registries-selector
input-id="'registries-selector'"
value="ctrl.formValues.Registries"
on-change="(ctrl.onRegistriesChange)"
options="ctrl.registries"
2021-07-14 09:15:21 +00:00
>
2022-09-21 07:10:58 +00:00
< / create-namespace-registries-selector >
2021-07-14 09:15:21 +00:00
< / div >
< / div >
< / div >
< / div >
<!-- #endregion -->
2021-02-26 15:50:33 +00:00
<!-- #region STORAGES -->
2022-01-17 05:53:32 +00:00
< div class = "col-sm-12 form-section-title" > Storage < / div >
2020-12-14 01:31:59 +00:00
< div class = "form-group" >
< span class = "col-sm-12 text-muted small" >
2022-08-04 02:45:44 +00:00
< p class = "vertical-center" >
2022-08-12 18:22:45 +00:00
< pr-icon icon = "'info'" mode = "'primary'" feather = "true" > < / pr-icon >
2022-08-04 02:45:44 +00:00
Quotas can be set on each storage option to prevent users from exceeding a specific threshold when deploying applications. You can set a quota to 0 to
effectively prevent the usage of a specific storage option inside this namespace.
< / p >
2020-12-14 01:31:59 +00:00
< / span >
< / div >
2022-08-04 02:45:44 +00:00
< div class = "form-section-title text-muted col-sm-12" style = "width: 100%" >
< div class = "vertical-center" > < pr-icon icon = "'svg-route'" > < / pr-icon > standard < / div >
< hr / >
2020-12-14 01:31:59 +00:00
< / div >
2021-12-14 19:14:53 +00:00
2022-08-04 02:45:44 +00:00
< storage-class-switch value = "sc.Selected" name = "sc.Name" on-change = "(ctrl.onToggleStorageQuota)" authorization = "K8sResourcePoolDetailsW" > < / storage-class-switch >
2021-12-14 19:14:53 +00:00
2020-12-14 01:31:59 +00:00
<!-- #endregion -->
2021-06-09 22:38:23 +00:00
<!-- summary -->
< kubernetes-summary-view
ng-if="resourcePoolEditForm.$valid & & !ctrl.isUpdateButtonDisabled()"
form-values="ctrl.formValues"
old-form-values="ctrl.savedFormValues"
>< / kubernetes-summary-view >
<!-- !summary -->
2020-07-05 23:21:03 +00:00
<!-- actions -->
2022-01-17 05:53:32 +00:00
< div ng-if = "ctrl.isAdmin" class = "col-sm-12 form-section-title" > Actions < / div >
2021-09-03 13:47:37 +00:00
< div ng-if = "ctrl.isAdmin" class = "form-group" >
2020-07-05 23:21:03 +00:00
< div class = "col-sm-12" >
< button
type="button"
2021-09-03 13:47:37 +00:00
ng-if="!ctrl.isSystem"
2022-08-12 18:22:45 +00:00
class="btn btn-primary btn-sm !ml-0 !mr-1"
2020-08-20 00:51:14 +00:00
ng-disabled="!resourcePoolEditForm.$valid || ctrl.isUpdateButtonDisabled()"
2020-07-05 23:21:03 +00:00
ng-click="ctrl.updateResourcePool()"
button-spinner="ctrl.state.actionInProgress"
>
2021-08-26 00:05:28 +00:00
< span ng-hide = "ctrl.state.actionInProgress" data-cy = "k8sNamespaceEdit-updateNamespaceButton" > Update namespace< / span >
2020-07-05 23:21:03 +00:00
< span ng-show = "ctrl.state.actionInProgress" > Update in progress...< / span >
< / button >
2021-09-03 13:47:37 +00:00
< button
ng-if="!ctrl.isDefaultNamespace"
type="button"
2022-08-12 18:22:45 +00:00
class="btn btn-light btn-sm !ml-0"
2021-09-03 13:47:37 +00:00
ng-click="ctrl.markUnmarkAsSystem()"
button-spinner="ctrl.state.actionInProgress"
2022-04-01 00:30:56 +00:00
data-cy="k8sNamespaceEdit-markSystem"
2021-09-03 13:47:37 +00:00
>
2021-08-26 14:00:59 +00:00
< span ng-if = "ctrl.isSystem" > Unmark as system< / span >
< span ng-if = "!ctrl.isSystem" > Mark as system< / span >
< / button >
2020-07-05 23:21:03 +00:00
< / div >
< / div >
<!-- !actions -->
< / form >
< / uib-tab >
< uib-tab index = "1" classes = "btn-sm" select = "ctrl.selectTab(1)" >
2022-08-04 02:45:44 +00:00
< uib-tab-heading class = "vertical-center" >
2022-08-12 18:22:45 +00:00
< pr-icon icon = "'svg-clockrewind'" > < / pr-icon > Events
2020-07-05 23:21:03 +00:00
< div ng-if = "ctrl.hasEventWarnings()" >
2022-08-12 18:22:45 +00:00
< pr-icon icon = "'alert-triangle'" feather = "true" mode = "'warning'" class-name = "'mr-0.5'" > < / pr-icon >
2020-07-05 23:21:03 +00:00
{{ ctrl.state.eventWarningCount }} warning(s)
< / div >
< / uib-tab-heading >
< kubernetes-events-datatable
title-text="Events"
title-icon="fa-history"
dataset="ctrl.events"
table-key="kubernetes.resourcepool.events"
order-by="Date"
reverse-order="true"
loading="ctrl.state.eventsLoading"
refresh-callback="ctrl.getEvents"
>< / kubernetes-events-datatable >
< / uib-tab >
< uib-tab index = "2" ng-if = "ctrl.pool.Yaml" select = "ctrl.showEditor()" classes = "btn-sm" >
2022-08-04 02:45:44 +00:00
< uib-tab-heading class = "vertical-center" > < pr-icon icon = "'code'" feather = "true" > < / pr-icon > YAML < / uib-tab-heading >
2022-08-12 18:22:45 +00:00
< div class = "px-5" ng-if = "ctrl.state.showEditorTab" >
2020-07-05 23:21:03 +00:00
< kubernetes-yaml-inspector key = "resource-pool-yaml" data = "ctrl.pool.Yaml" > < / kubernetes-yaml-inspector >
< / div >
< / uib-tab >
< / uib-tabset >
< / rd-widget-body >
< / rd-widget >
< / div >
< / div >
< div class = "row" ng-if = "ctrl.applications && ctrl.applications.length > 0" >
< div class = "col-sm-12" >
< kubernetes-resource-pool-applications-datatable
dataset="ctrl.applications"
table-key="kubernetes.resourcepool.applications"
order-by="Name"
refresh-callback="ctrl.getApplications"
loading="ctrl.state.applicationsLoading"
2021-04-27 08:12:34 +00:00
title-text="Applications running in this namespace"
2022-08-04 02:45:44 +00:00
title-icon="code"
2020-07-05 23:21:03 +00:00
>
< / kubernetes-resource-pool-applications-datatable >
< / div >
< / div >
2020-08-12 23:30:23 +00:00
< div class = "row" ng-if = "ctrl.ingresses && ctrl.ingresses.length > 0" >
< div class = "col-sm-12" >
< kubernetes-resource-pool-ingresses-datatable
dataset="ctrl.ingresses"
table-key="kubernetes.resourcepool.ingresses"
order-by="Name"
refresh-callback="ctrl.getIngresses"
loading="ctrl.state.ingressesLoading"
title-text="Ingress routes and applications"
2022-08-04 02:45:44 +00:00
title-icon="svg-route"
2020-08-12 23:30:23 +00:00
>
< / kubernetes-resource-pool-ingresses-datatable >
< / div >
< / div >
2020-07-05 23:21:03 +00:00
< / div >