2022-07-06 06:08:45 +00:00
< page-header
ng-if="$ctrl.state.viewReady"
title="'Create a namespace'"
breadcrumbs="[{ label:'Namespaces', link:'kubernetes.resourcePools' }, 'Create a namespace']"
reload="true"
>< / page-header >
2020-07-05 23:21:03 +00:00
2021-07-14 09:15:21 +00:00
< kubernetes-view-loading view-ready = "$ctrl.state.viewReady" > < / kubernetes-view-loading >
2020-07-05 23:21:03 +00:00
2021-07-14 09:15:21 +00:00
< div ng-if = "$ctrl.state.viewReady" >
2020-07-05 23:21:03 +00:00
< div class = "row" >
< div class = "col-lg-12 col-md-12 col-xs-12" >
< rd-widget >
< rd-widget-body >
< form class = "form-horizontal" autocomplete = "off" name = "resourcePoolCreationForm" >
2020-08-12 23:30:23 +00:00
<!-- #region NAME INPUT -->
2020-07-05 23:21:03 +00:00
< div class = "form-group" >
2022-08-01 04:45:28 +00:00
< label for = "pool_name" class = "col-sm-3 col-lg-2 control-label text-left required" > Name< / label >
< div class = "col-sm-8" >
2020-07-05 23:21:03 +00:00
< input
type="text"
class="form-control"
name="pool_name"
2021-07-14 09:15:21 +00:00
ng-model="$ctrl.formValues.Name"
2020-07-05 23:21:03 +00:00
ng-pattern="/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/"
2021-07-14 09:15:21 +00:00
ng-change="$ctrl.onChangeName()"
2020-07-05 23:21:03 +00:00
placeholder="my-project"
2021-08-26 00:05:28 +00:00
data-cy="k8sNamespaceCreate-namespaceNameInput"
2020-07-05 23:21:03 +00:00
required
auto-focus
/>
2022-08-01 04:45:28 +00:00
< span class = "help-block" >
< div class = "form-group" ng-show = "resourcePoolCreationForm.pool_name.$invalid || $ctrl.state.isAlreadyExist || $ctrl.state.hasPrefixKube" >
2022-09-14 23:09:19 +00:00
< div class = "col-sm-12 small text-warning" >
2022-08-01 04:45:28 +00:00
< div ng-messages = "resourcePoolCreationForm.pool_name.$error" >
< p class = "vertical-center" ng-message = "required" > < pr-icon icon = "'alert-triangle'" feather = "true" mode = "'warning'" > < / pr-icon > This field is required.< / p >
< p class = "vertical-center" ng-message = "pattern"
>< pr-icon icon = "'alert-triangle'" feather = "true" mode = "'warning'" > < / pr-icon > This field must consist of lower case alphanumeric characters or '-', and
contain at most 63 characters, and must start and end with an alphanumeric character.< /p
>
< / div >
< p class = "vertical-center" ng-if = "$ctrl.state.hasPrefixKube"
>< pr-icon icon = "'alert-triangle'" feather = "true" mode = "'warning'" > < / pr-icon > Prefix "kube-" is reserved for Kubernetes system namespaces.< /p
>
2022-08-22 20:55:41 +00:00
< p class = "vertical-center" ng-if = "$ctrl.state.isAlreadyExist" >
< pr-icon icon = "'alert-triangle'" feather = "true" mode = "'warning'" > < / pr-icon > A namespace with the same name already exists.
< / p >
2022-08-01 04:45:28 +00:00
< / div >
< / div >
< / span >
2020-07-05 23:21:03 +00:00
< / div >
< / div >
2022-08-01 04:45:28 +00:00
2020-08-12 23:30:23 +00:00
<!-- #endregion -->
2022-01-17 05:53:32 +00:00
< div class = "col-sm-12 form-section-title" > Quota < / div >
2020-08-12 23:30:23 +00:00
<!-- #region QUOTA -->
2020-07-05 23:21:03 +00:00
<!-- quotas - switch -->
< div class = "form-group" >
< div class = "col-sm-12 small text-muted" >
2022-08-01 04:45:28 +00:00
< p class = "vertical-center" >
< pr-icon class = "vertical-center" icon = "'info'" feather = "true" mode = "'primary'" > < / pr-icon >
2021-06-01 08:56:47 +00:00
A namespace segments the underlying physical Kubernetes cluster into smaller virtual clusters. You should assign a capped limit of resources to this namespace or
2020-07-05 23:21:03 +00:00
disable for the safe operation of your platform.
< / p >
< / div >
< div class = "col-sm-12" >
2022-08-01 04:45:28 +00:00
< por-switch-field
data-cy="'k8sNamespaceCreate-resourceAssignmentToggle'"
label="'Resource assignment'"
label-class="'col-sm-3 col-lg-2'"
name="'k8s-resourcepool-resourcequota'"
checked="$ctrl.formValues.HasQuota"
on-change="($ctrl.onToggleResourceQuota)"
>< / por-switch-field >
2020-07-05 23:21:03 +00:00
< / div >
< / div >
<!-- !quotas - switch -->
2021-07-14 09:15:21 +00:00
< div ng-if = "$ctrl.formValues.HasQuota" >
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 >
2022-08-12 18:22:45 +00:00
< div class = "form-group" >
2022-09-14 23:09:19 +00:00
< span class = "col-sm-12 small text-warning" ng-switch on = "$ctrl.formValues.HasQuota && !$ctrl.isQuotaValid()" >
2022-08-12 18:22:45 +00:00
< p class = "vertical-center mb-0" ng-switch-when = "true"
2022-08-01 04:45:28 +00:00
>< pr-icon class = "vertical-center" icon = "'alert-triangle'" feather = "true" mode = "'warning'" > < / pr-icon > At least a single limit must be set for the quota to be
valid.
< / p >
2022-08-12 18:22:45 +00:00
< p class = "vertical-center mb-0" ng-switch-default > < / p >
2022-08-01 04:45:28 +00:00
< / span >
< / div >
2020-07-05 23:21:03 +00:00
<!-- memory - limit - input -->
2022-08-12 18:22:45 +00:00
< div class = "form-group flex flex-row !mb-0" >
< label for = "memory-limit" class = "col-sm-3 col-lg-2 control-label text-left" > Memory limit (MB) < / label >
< div class = "col-xs-6" >
2021-07-14 09:15:21 +00:00
< slider
model="$ctrl.formValues.MemoryLimit"
floor="$ctrl.defaults.MemoryLimit"
ceil="$ctrl.state.sliderMaxMemory"
step="128"
ng-if="$ctrl.state.sliderMaxMemory"
2021-08-26 00:05:28 +00:00
data-cy="k8sNamespaceCreate-memoryLimitSlider"
2021-07-14 09:15:21 +00:00
>
2020-08-12 23:30:23 +00:00
< / slider >
2020-07-05 23:21:03 +00:00
< / 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-07-14 09:15:21 +00:00
min="{{ $ctrl.defaults.MemoryLimit }}"
max="{{ $ctrl.state.sliderMaxMemory }}"
2020-07-05 23:21:03 +00:00
class="form-control"
2021-07-14 09:15:21 +00:00
ng-model="$ctrl.formValues.MemoryLimit"
2020-07-05 23:21:03 +00:00
id="memory-limit"
2021-08-26 00:05:28 +00:00
data-cy="k8sNamespaceCreate-memoryLimitInput"
2020-07-05 23:21:03 +00:00
required
/>
2022-08-12 18:22:45 +00:00
< / div >
< / div >
< div class = "flex flex-row w-full" >
< span class = "col-sm-3 col-lg-2" > < / span >
< span class = "help-block col-sm-9 col-lg-10" >
< div ng-show = "resourcePoolCreationForm.memory_limit.$invalid" >
2022-09-14 23:09:19 +00:00
< div class = "small text-warning" >
2022-08-12 18:22:45 +00:00
< div ng-messages = "resourcePoolCreationForm.pool_name.$error" >
< p class = "vertical-center"
>< pr-icon class = "vertical-center" icon = "'alert-triangle'" feather = "true" mode = "'warning'" > < / pr-icon > Value must be between
{{ $ctrl.defaults.MemoryLimit }} and
{{ $ctrl.state.sliderMaxMemory }}
< / p >
2022-08-01 04:45:28 +00:00
< / div >
< / div >
2022-08-12 18:22:45 +00:00
< / div >
< / span >
2020-07-05 23:21:03 +00:00
< / div >
<!-- !memory - limit - input -->
<!-- cpu - limit - input -->
2022-08-12 18:22:45 +00:00
< div class = "form-group flex flex-row" >
< label for = "cpu-limit" class = "col-sm-3 col-lg-2 control-label text-left" > CPU limit < / label >
< div class = "col-xs-8" >
2021-07-14 09:15:21 +00:00
< slider
model="$ctrl.formValues.CpuLimit"
floor="$ctrl.defaults.CpuLimit"
ceil="$ctrl.state.sliderMaxCpu"
step="0.1"
precision="2"
ng-if="$ctrl.state.sliderMaxCpu"
2021-08-26 00:05:28 +00:00
data-cy="k8sNamespaceCreate-cpuLimitSlider"
2021-07-14 09:15:21 +00:00
>
2020-08-12 23:30:23 +00:00
< / slider >
2020-07-05 23:21:03 +00:00
< / div >
< / div >
<!-- !cpu - limit - input -->
< / div >
< / div >
2020-08-12 23:30:23 +00:00
<!-- #endregion -->
2020-12-14 01:31:59 +00:00
<!-- #region LOAD - BALANCERS -->
2022-01-17 05:53:32 +00:00
< div class = "col-sm-12 form-section-title" > Load balancers < / div >
2020-12-14 01:31:59 +00:00
< div class = "form-group" >
2022-08-01 04:45:28 +00:00
< span class = "col-sm-12 text-muted small vertical-center" >
2022-08-12 18:22:45 +00:00
< pr-icon icon = "'info'" feather = "true" mode = "'primary'" class = "vertical-center" > < / pr-icon >
2021-04-27 08:12:34 +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.
2020-12-14 01:31:59 +00:00
< / span >
< / 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-01 04:45:28 +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.onToggleLoadBalancerQuota)"
2021-10-06 06:24:26 +00:00
>< / por-switch-field >
2020-12-14 01:31:59 +00:00
< / div >
< / div >
<!-- #endregion -->
<!-- #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" >
2022-08-01 04:45:28 +00:00
< span class = "col-sm-12 text-muted small vertical-center" >
2022-08-12 18:22:45 +00:00
< pr-icon icon = "'info'" mode = "'primary'" feather = "true" > < / pr-icon >
2020-12-14 01:31:59 +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
2021-04-27 08:12:34 +00:00
prevent the usage of a specific storage option inside this namespace.
2020-12-14 01:31:59 +00:00
< / span >
< / div >
2022-08-01 04:45:28 +00:00
< div class = "col-sm-12 form-section-title vertical-center" >
< pr-icon icon = "'svg-route'" > < / pr-icon >
2020-12-14 01:31:59 +00:00
standard
< / div >
2021-12-14 19:14:53 +00:00
< storage-class-switch value = "sc.Selected" name = "sc.Name" on-change = "(ctrl.onToggleStorageQuota)" authorization = "K8sResourcePoolDetailsW" > < / storage-class-switch >
2020-12-14 01:31:59 +00:00
<!-- #endregion -->
2021-07-14 09:15:21 +00:00
< div ng-if = "$ctrl.state.canUseIngress" >
2022-01-17 05:53:32 +00:00
< div class = "col-sm-12 form-section-title" > Ingresses < / div >
2020-08-20 00:51:14 +00:00
<!-- #region INGRESSES -->
2021-07-14 09:15:21 +00:00
< div class = "form-group" ng-if = "$ctrl.formValues.IngressClasses.length === 0" >
2020-08-20 00:51:14 +00:00
< div class = "col-sm-12 small text-muted" >
The ingress feature must be enabled in the
2022-07-22 02:14:31 +00:00
< a ui-sref = "kubernetes.cluster.setup" > environment configuration view< / a > to be able to register ingresses inside this namespace.
2020-08-20 00:51:14 +00:00
< / div >
2020-08-12 23:30:23 +00:00
< / div >
2020-08-20 00:51:14 +00:00
2021-07-14 09:15:21 +00:00
< div class = "form-group" ng-if = "$ctrl.formValues.IngressClasses.length > 0" >
2020-08-20 00:51:14 +00:00
< div class = "col-sm-12 small text-muted" >
2022-08-01 04:45:28 +00:00
< p class = "vertical-center" >
2022-08-12 18:22:45 +00:00
< pr-icon icon = "'info'" mode = "'primary'" feather = "true" > < / pr-icon >
2020-08-20 00:51:14 +00:00
Enable and configure ingresses available to users when deploying applications.
< / p >
< / div >
< / div >
2021-07-14 09:15:21 +00:00
< div class = "form-group" ng-repeat-start = "ic in $ctrl.formValues.IngressClasses track by ic.IngressClass.Name" >
2022-08-01 04:45:28 +00:00
< div class = "row" >
< div class = "col-sm-12" >
< span class = "text-muted vertical-center" > < pr-icon icon = "'svg-route'" > < / pr-icon > {{ ic.IngressClass.Name }}< / span >
< hr class = "mt-2 mb-0" / >
2020-08-20 00:51:14 +00:00
< / div >
< / div >
2022-08-01 04:45:28 +00:00
< div class = "row" >
< div class = "col-sm-3 col-lg-2" >
< label class = "control-label text-left" > Allow users to use this ingress < / label >
< / div >
< div class = "col-sm-8 pt-2" >
< label class = "switch" >
< input type = "checkbox" ng-model = "ic.Selected" / > < span class = "slider round" data-cy = "namespaceCreate-ingressToggle{{ ic.IngressClass.Name }}" > < / span >
< / label >
< / div >
2020-08-20 00:51:14 +00:00
< / div >
< / div >
< div ng-if = "ic.Selected" >
< div class = "form-group" >
2021-04-27 17:51:13 +00:00
< div class = "col-sm-12" >
< label class = "control-label text-left" >
Hostnames
< portainer-tooltip
2022-07-03 23:21:25 +00:00
message="'Hostnames associated to the ingress inside this namespace. Users will be able to expose and access their applications over the ingress via one of these hostname.'"
2021-04-27 17:51:13 +00:00
>
< / portainer-tooltip >
< / label >
2022-08-01 04:45:28 +00:00
< span class = "label label-default interactive" ng-click = "$ctrl.addHostname(ic)" data-cy = "namespaceCreate-addHostButton{{ ic.IngressClass.Name }}" >
< pr-icon icon = "'plus'" feather = "true" > < / pr-icon > add hostname
2021-04-27 17:51:13 +00:00
< / span >
2020-08-20 00:51:14 +00:00
< / div >
2022-08-01 04:45:28 +00:00
< div class = "col-sm-12 pt-4" >
< div ng-repeat = "item in ic.Hosts track by $index" >
2021-04-27 17:51:13 +00:00
< div class = "form-inline" >
2022-08-01 04:45:28 +00:00
< div class = "col-sm-8 input-group input-group-sm pt-2" >
< span class = "input-group-addon required" > Hostname< / span >
2021-04-27 17:51:13 +00:00
< input
type="text"
class="form-control"
name="hostname_{{ ic.IngressClass.Name }}_{{ $index }}"
ng-model="item.Host"
2021-07-14 09:15:21 +00:00
ng-change="$ctrl.onChangeIngressHostname()"
2021-04-27 17:51:13 +00:00
placeholder="foo"
2022-04-20 05:02:21 +00:00
pattern="[\*a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
2021-04-27 17:51:13 +00:00
required
2021-09-24 01:00:55 +00:00
data-cy="namespaceCreate-hostnameInput{{ ic.IngressClass.Name }}_{{ $index }}"
2021-04-27 17:51:13 +00:00
/>
< / div >
2022-08-12 18:22:45 +00:00
< div class = "col-sm-1 input-group input-group-sm !pt-2" ng-if = "$index > 0" >
< button class = "btn btn-md btn-dangerlight btn-only-icon" type = "button" ng-click = "$ctrl.removeHostname(ic, $index)" >
2022-08-01 04:45:28 +00:00
< pr-icon icon = "'trash-2'" size = "'md'" feather = "true" > < / pr-icon >
2021-04-27 17:51:13 +00:00
< / button >
< / div >
< / div >
< div
2022-09-14 23:09:19 +00:00
class="small text-warning pt-1"
2021-04-27 17:51:13 +00:00
ng-show="
resourcePoolCreationForm['hostname_' + ic.IngressClass.Name + '_' + $index].$invalid ||
2021-07-14 09:15:21 +00:00
$ctrl.state.duplicates.ingressHosts.refs[ic.IngressClass.Name][$index] !== undefined
2021-04-27 17:51:13 +00:00
"
>
< ng-messages for = "resourcePoolCreationForm['hostname_' + ic.IngressClass.Name + '_' + $index].$error" >
2022-08-12 18:22:45 +00:00
< p class = "vertical-center" ng-message = "required" > < pr-icon icon = "'alert-triangle'" feather = "true" mode = "'warning'" > < / pr-icon > Hostname is required.< / p >
< p class = "vertical-center" ng-message = "pattern" >
2022-08-01 04:45:28 +00:00
< pr-icon icon = "'alert-triangle'" feather = "true" mode = "'warning'" > < / pr-icon >
2021-09-24 11:02:06 +00:00
This field must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com').
< / p >
2021-04-27 17:51:13 +00:00
< / ng-messages >
2022-08-12 18:22:45 +00:00
< p class = "vertical-center" ng-if = "$ctrl.state.duplicates.ingressHosts.refs[ic.IngressClass.Name][$index] !== undefined" >
2022-08-01 04:45:28 +00:00
< pr-icon icon = "'alert-triangle'" feather = "true" mode = "'warning'" > < / pr-icon > This hostname is already used.
2021-04-27 17:51:13 +00:00
< / p >
< / div >
2020-08-20 09:24:12 +00:00
< / div >
2020-08-20 00:51:14 +00:00
< / div >
< / div >
2020-08-12 23:30:23 +00:00
< / div >
2022-08-01 04:45:28 +00:00
< div ng-repeat-end class = "form-group" ng-if = "ic.Selected" >
< 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 >
2020-08-20 00:51:14 +00:00
You can specify a list of annotations that will be associated to the ingress.
< / p >
< / div >
2022-04-20 04:45:20 +00:00
< div class = "col-sm-12" >
2022-08-01 04:45:28 +00:00
< label class = "control-label text-left" > Annotations < / label >
< label class = "control-label text-left" >
< span class = "label label-default interactive" ng-click = "$ctrl.addAnnotation(ic)" data-cy = "namespaceCreate-addAnnotation{{ ic.IngressClass.Name }}" >
< pr-icon icon = "'plus'" feather = "true" > < / pr-icon > add annotation
< / span >
< portainer-tooltip
message="'Use annotations to configure options for an ingress. Review Nginx or Traefik documentation to find the annotations supported by your choice of ingress type.'"
>
< / portainer-tooltip >
< / label >
< label class = "control-label text-left" >
< span
class="label label-default interactive"
ng-if="ic.IngressClass.Type === $ctrl.IngressClassTypes.NGINX"
ng-click="$ctrl.addRewriteAnnotation(ic)"
data-cy="namespaceCreate-addAnnotation{{ ic.IngressClass.Name }}"
>
< pr-icon icon = "'plus'" feather = "true" > < / pr-icon > add rewrite annotation
< / span >
< portainer-tooltip
ng-if="ic.IngressClass.Type === $ctrl.IngressClassTypes.NGINX"
message="'When the exposed URLs for your applications differ from the specified paths in the ingress, use the rewrite target annotation to denote the path to redirect to.'"
>
< / portainer-tooltip >
< / label >
< label class = "control-label text-left" >
< span
class="label label-default interactive"
ng-if="ic.IngressClass.Type === $ctrl.IngressClassTypes.NGINX"
ng-click="$ctrl.addUseregexAnnotation(ic)"
data-cy="namespaceCreate-addAnnotation{{ ic.IngressClass.Name }}"
>
< pr-icon icon = "'plus'" feather = "true" > < / pr-icon > add regular expression annotation
< / span >
< portainer-tooltip
ng-if="ic.IngressClass.Type === $ctrl.IngressClassTypes.NGINX"
message="'Enable use of regular expressions in ingress paths (set in the ingress details of an application). Use this along with rewrite-target to specify the regex capturing group to be replaced, e.g. path regex of ^/foo/(,*) and rewrite-target of /bar/$1 rewrites example.com/foo/account to example.com/bar/account.'"
>
< / portainer-tooltip >
< / label >
2020-08-20 00:51:14 +00:00
< / div >
2022-08-01 04:45:28 +00:00
< div class = "col-sm-12 form-inline pt-4" >
< div class = "pt-2" ng-repeat = "annotation in ic.Annotations track by $index" >
2020-08-20 00:51:14 +00:00
< div class = "input-group col-sm-5 input-group-sm" >
< span class = "input-group-addon" > Key< / span >
2021-09-24 01:00:55 +00:00
< input
type="text"
class="form-control"
ng-model="annotation.Key"
2022-04-20 04:45:20 +00:00
placeholder="{{
ic.IngressClass.Type === $ctrl.IngressClassTypes.NGINX
? 'e.g. nginx.ingress.kubernetes.io/enable-rewrite-log'
: 'e.g. traefik.ingress.kubernetes.io/router.priority'
}}"
2021-09-24 01:00:55 +00:00
required
data-cy="namespaceCreate-annotationKey{{ ic.IngressClass.Name }}"
/>
2020-08-20 00:51:14 +00:00
< / div >
2022-08-01 04:45:28 +00:00
< div class = "input-group input-group-sm col-sm-5" >
2020-08-20 00:51:14 +00:00
< span class = "input-group-addon" > Value< / span >
2021-09-24 01:00:55 +00:00
< input
type="text"
class="form-control"
ng-model="annotation.Value"
2022-04-20 04:45:20 +00:00
placeholder="{{ ic.IngressClass.Type === $ctrl.IngressClassTypes.NGINX ? 'e.g. true or false' : 'e.g. 42' }}"
2021-09-24 01:00:55 +00:00
required
data-cy="namespaceCreate-annotationValue{{ ic.IngressClass.Name }}"
/>
2020-08-20 00:51:14 +00:00
< / div >
2022-08-01 04:45:28 +00:00
< div class = "input-group input-group-sm col-sm-1" >
2021-09-24 01:00:55 +00:00
< button
2022-08-12 18:22:45 +00:00
class="btn btn-md btn-dangerlight btn-only-icon"
2021-09-24 01:00:55 +00:00
type="button"
ng-click="$ctrl.removeAnnotation(ic, $index)"
data-cy="namespaceCreate-deleteAnnotationButton{{ ic.IngressClass.Name }}"
>
2022-08-01 04:45:28 +00:00
< pr-icon icon = "'trash-2'" size = "'md'" feather = "true" > < / pr-icon >
2020-08-20 00:51:14 +00:00
< / button >
< / div >
< / div >
< / div >
< / div >
<!-- #endregion -->
2020-08-12 23:30:23 +00:00
< / div >
2021-07-14 09:15:21 +00:00
<!-- #region REGISTRIES -->
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
< div class = "form-group" >
< div class = "col-sm-12 small text-muted" >
2022-08-01 04:45:28 +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-01 04:45:28 +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-08-12 18:22:45 +00:00
< label class = "col-sm-3 col-lg-2 control-label text-left !pt-0" > Select registries < / label >
< div class = "col-sm-8 col-lg-9" >
2021-07-14 09:15:21 +00:00
< span class = "small text-muted" ng-if = "!$ctrl.registries.length && $ctrl.state.isAdmin" >
2022-08-12 18:22:45 +00:00
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 >
< span class = "small text-muted" ng-if = "!$ctrl.registries.length && !$ctrl.state.isAdmin" >
No registries available. Contact your administrator to create a container registry.
< / span >
< span
isteven-multi-select
ng-if="$ctrl.registries.length"
input-model="$ctrl.registries"
output-model="$ctrl.formValues.Registries"
button-label="Name"
item-label="Name"
tick-property="Checked"
helper-elements="filter"
search-property="Name"
2022-08-01 04:45:28 +00:00
translation="{nothingSelected: 'Select one or more registries', search: 'Search...'}"
2021-09-24 01:00:55 +00:00
data-cy="namespaceCreate-registrySelect"
2021-07-14 09:15:21 +00:00
>
< / span >
< / div >
< / div >
<!-- #endregion -->
2021-06-09 22:38:23 +00:00
<!-- summary -->
2021-07-14 09:15:21 +00:00
< kubernetes-summary-view ng-if = "resourcePoolCreationForm.$valid && !$ctrl.isCreateButtonDisabled()" form-values = "$ctrl.formValues" > < / kubernetes-summary-view >
2021-06-09 22:38:23 +00:00
<!-- !summary -->
2022-01-17 05:53:32 +00:00
< div class = "col-sm-12 form-section-title" > Actions < / div >
2020-08-12 23:30:23 +00:00
<!-- #region ACTIONS -->
2020-07-05 23:21:03 +00:00
< div class = "form-group" >
< div class = "col-sm-12" >
< button
type="button"
2022-08-01 04:45:28 +00:00
class="btn btn-primary btn-sm !ml-0"
2021-07-14 09:15:21 +00:00
ng-disabled="!resourcePoolCreationForm.$valid || $ctrl.isCreateButtonDisabled()"
ng-click="$ctrl.createResourcePool()"
button-spinner="$ctrl.state.actionInProgress"
2020-07-05 23:21:03 +00:00
>
2021-08-26 00:05:28 +00:00
< span ng-hide = "$ctrl.state.actionInProgress" data-cy = "k8sNamespace-createNamespaceButton" > Create namespace< / span >
2021-07-14 09:15:21 +00:00
< span ng-show = "$ctrl.state.actionInProgress" > Creation in progress...< / span >
2020-07-05 23:21:03 +00:00
< / button >
< / div >
< / div >
2020-08-12 23:30:23 +00:00
<!-- #endregion -->
2020-07-05 23:21:03 +00:00
< / form >
< / rd-widget-body >
< / rd-widget >
< / div >
< / div >
< / div >