2022-07-06 06:08:45 +00:00
< page-header
2023-01-26 03:03:44 +00:00
ng-if="!ctrl.state.isEdit & & !ctrl.stack.IsComposeFormat & & ctrl.state.viewReady"
2022-07-06 06:08:45 +00:00
title="'Create application'"
breadcrumbs="[
{ label:'Applications', link:'kubernetes.applications' },
'Create an application'
]"
reload="true"
>
< / page-header >
< page-header
2023-01-26 03:03:44 +00:00
ng-if="ctrl.state.isEdit & & !ctrl.stack.IsComposeFormat & & ctrl.state.viewReady"
2022-07-06 06:08:45 +00:00
title="'Edit application'"
breadcrumbs="[
{ label:'Namespaces', link:'kubernetes.resourcePools' },
2022-08-12 18:22:45 +00:00
{
2022-07-06 06:08:45 +00:00
label:ctrl.application.ResourcePool,
2022-08-12 18:22:45 +00:00
link: 'kubernetes.resourcePools.resourcePool',
2022-07-06 06:08:45 +00:00
linkParams:{ id: ctrl.application.ResourcePool }
},
{ label:'Applications', link:'kubernetes.applications' },
2022-08-12 18:22:45 +00:00
{
2022-07-06 06:08:45 +00:00
label:ctrl.application.Name,
2022-08-12 18:22:45 +00:00
link: 'kubernetes.applications.application',
2022-07-06 06:08:45 +00:00
linkParams:{ name: ctrl.application.Name, namespace: ctrl.application.ResourcePool }
},
'Edit',
]"
reload="true"
>
< / page-header >
2020-07-05 23:21:03 +00:00
2023-01-26 03:03:44 +00:00
< page-header
ng-if="ctrl.stack.IsComposeFormat"
title="'View application'"
breadcrumbs="[
2023-01-30 21:03:21 +00:00
{ label:'Namespaces', link:'kubernetes.resourcePools' },
{
label:ctrl.application.ResourcePool,
link: 'kubernetes.resourcePools.resourcePool',
linkParams:{ id: ctrl.application.ResourcePool }
},
2023-01-26 03:03:44 +00:00
{ label:'Applications', link:'kubernetes.applications' },
2023-01-30 21:03:21 +00:00
{
label:ctrl.application.Name,
link: 'kubernetes.applications.application',
linkParams:{ name: ctrl.application.Name, namespace: ctrl.application.ResourcePool }
},
'View',
2023-01-26 03:03:44 +00:00
]"
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" >
2022-07-11 02:05:23 +00:00
< div class = "row kubernetes-create" >
2020-07-05 23:21:03 +00:00
< div class = "col-xs-12" >
< rd-widget >
< rd-widget-body >
2023-12-19 19:54:00 +00:00
< form class = "form-horizontal mt-4" name = "kubernetesApplicationCreationForm" autocomplete = "off" novalidate >
2023-12-03 18:43:53 +00:00
< div ng-if = "ctrl.isExternalApplication()" >
< div class = "col-sm-12 form-section-title" ng-if = "ctrl.state.appType === ctrl.KubernetesDeploymentTypes.APPLICATION_FORM" > Namespace < / div >
<!-- #region NAMESPACE -->
< div class = "form-group" ng-if = "ctrl.formValues.ResourcePool" >
< label for = "resource-pool-selector" class = "col-sm-1 control-label text-left" > Namespace< / label >
< div class = "col-sm-11" >
< select
class="form-control"
id="resource-pool-selector"
ng-model="ctrl.formValues.ResourcePool"
ng-options="resourcePool.Namespace.Name for resourcePool in ctrl.resourcePools"
ng-change="ctrl.onResourcePoolSelectionChange()"
ng-disabled="ctrl.state.isEdit"
data-cy="k8sAppCreate-nsSelect"
>< / select >
< / div >
< / div >
< div class = "form-group" ng-if = "ctrl.state.resourcePoolHasQuota && ctrl.resourceQuotaCapacityExceeded() && ctrl.formValues.ResourcePool" >
< div class = "col-sm-12 small text-danger" >
< pr-icon icon = "'alert-circle'" mode = "'danger'" > < / pr-icon >
This namespace has exhausted its resource capacity and you will not be able to deploy the application. Contact your administrator to expand the capacity of the
namespace.
< / div >
< / div >
< div class = "form-group" ng-if = "!ctrl.formValues.ResourcePool" >
< div class = "col-sm-12 small text-muted" >
< pr-icon icon = "'alert-circle'" mode = "'warning'" > < / pr-icon >
You do not have access to any namespace. Contact your administrator to get access to a namespace.
< / div >
< / div >
<!-- kubernetes services options -->
< div ng-if = "ctrl.formValues.ResourcePool" >
< kube-services-form
on-change="(ctrl.onServicesChange)"
values="ctrl.formValues.Services"
app-name="ctrl.formValues.Name"
selector="ctrl.formValues.Selector"
validation-data="{nodePortServices: ctrl.state.nodePortServices, formServices: ctrl.formValues.Services, ingressPaths: ctrl.ingressPaths, originalIngressPaths: ctrl.originalIngressPaths}"
is-edit-mode="ctrl.state.isEdit"
namespace="ctrl.formValues.ResourcePool.Namespace.Name"
>< / kube-services-form >
< / div >
<!-- kubernetes services options -->
2024-01-10 21:14:23 +00:00
2024-01-05 02:42:36 +00:00
<!-- kubernetes summary for external application -->
2024-01-10 21:14:23 +00:00
<!-- below workaround is needed because we wanted react to render it again
by hiding/showing it, but the page was fluctuating. so we added two blocks for both the conditions -->
< div ng-if = "!ctrl.isTemporaryRefresh" >
< application-summary-section
application-kind="ctrl.formValues.ApplicationType"
form-values="ctrl.formValues"
old-form-values="ctrl.savedFormValues"
ng-if="kubernetesApplicationCreationForm.$valid & & ctrl.isExternalApplication()"
>< / application-summary-section >
< / div >
< div ng-if = "ctrl.isTemporaryRefresh" >
< application-summary-section
application-kind="ctrl.formValues.ApplicationType"
form-values="ctrl.formValues"
old-form-values="ctrl.savedFormValues"
ng-if="kubernetesApplicationCreationForm.$valid & & ctrl.isExternalApplication()"
>< / application-summary-section >
< / div >
2024-01-05 02:42:36 +00:00
<!-- kubernetes summary for external application -->
2023-12-03 18:43:53 +00:00
< div class = "col-sm-12 form-section-title !mt-6" ng-if = "ctrl.state.appType !== ctrl.KubernetesDeploymentTypes.GIT" ng-hide = "ctrl.stack.IsComposeFormat" > Actions < / div >
2024-01-05 02:42:36 +00:00
<!-- #region ACTIONS -->
2023-12-03 18:43:53 +00:00
< div class = "form-group" ng-hide = "ctrl.stack.IsComposeFormat" >
< div class = "col-sm-12" >
< button
ng-if="ctrl.state.appType === ctrl.KubernetesDeploymentTypes.APPLICATION_FORM"
type="button"
class="btn btn-primary btn-sm !ml-0"
ng-disabled="!kubernetesApplicationCreationForm.$valid || ctrl.isDeployUpdateButtonDisabled() || !ctrl.imageValidityIsValid() || ctrl.hasPortErrors() || !ctrl.formValues.ResourcePool"
ng-click="ctrl.deployApplication()"
button-spinner="ctrl.state.actionInProgress"
data-cy="k8sAppCreate-deployButton"
>
< span ng-show = "!ctrl.state.isEdit && !ctrl.state.actionInProgress" > Deploy application< / span >
< span ng-show = "!ctrl.state.isEdit && ctrl.state.actionInProgress" > Deployment in progress...< / span >
< span ng-show = "ctrl.state.isEdit && !ctrl.state.actionInProgress" > Update application< / span >
< span ng-show = "ctrl.state.isEdit && ctrl.state.actionInProgress" > Update in progress...< / span >
< / button >
< button
ng-if="ctrl.state.isEdit & & !ctrl.state.actionInProgress & & ctrl.state.appType === ctrl.KubernetesDeploymentTypes.APPLICATION_FORM"
type="button"
class="btn btn-sm btn-default"
ui-sref="kubernetes.applications.application({ name: ctrl.application.Name, namespace: ctrl.application.ResourcePool })"
data-cy="k8sAppCreate-appCancelButton"
>
Cancel
< / button >
<!-- #Web editor buttons -->
< button
class="btn btn-sm btn-primary"
ng-click="ctrl.updateApplicationViaWebEditor()"
ng-if="ctrl.state.appType === ctrl.KubernetesDeploymentTypes.CONTENT || ctrl.state.updateWebEditorInProgress"
ng-disabled="!kubernetesApplicationCreationForm.$valid || !ctrl.state.isEditorDirty || ctrl.state.updateWebEditorInProgress"
style="margin-top: 7px; margin-left: 0"
button-spinner="ctrl.state.updateWebEditorInProgress"
>
< span ng-show = "!ctrl.state.updateWebEditorInProgress" > Update the application< / span >
< span ng-show = "ctrl.state.updateWebEditorInProgress" > Update in progress...< / span >
< / button >
< / div >
< / div >
<!-- #endregion -->
< / div >
2022-01-16 19:37:46 +00:00
< div ng-if = "!ctrl.isExternalApplication()" >
< git-form-info-panel
ng-if="ctrl.state.appType == ctrl.KubernetesDeploymentTypes.GIT"
2023-02-22 20:13:33 +00:00
class-name="'text-muted'"
2022-01-16 19:37:46 +00:00
url="ctrl.stack.GitConfig.URL"
config-file-path="ctrl.stack.GitConfig.ConfigFilePath"
additional-files="ctrl.stack.AdditionalFiles"
2023-02-22 20:13:33 +00:00
type="'application'"
2022-01-16 19:37:46 +00:00
>< / git-form-info-panel >
<!-- #region NAMESPACE -->
< div class = "form-group" ng-if = "ctrl.formValues.ResourcePool" >
2022-07-11 02:05:23 +00:00
< label for = "resource-pool-selector" class = "col-sm-3 col-lg-2 control-label text-left" > Namespace< / label >
< div class = "col-sm-8" >
2022-01-16 19:37:46 +00:00
< select
2021-09-07 00:37:26 +00:00
class="form-control"
2022-01-16 19:37:46 +00:00
id="resource-pool-selector"
ng-model="ctrl.formValues.ResourcePool"
ng-options="resourcePool.Namespace.Name for resourcePool in ctrl.resourcePools"
ng-change="ctrl.onResourcePoolSelectionChange()"
2021-09-07 00:37:26 +00:00
ng-disabled="ctrl.state.isEdit"
2022-01-16 19:37:46 +00:00
data-cy="k8sAppCreate-nsSelect"
>< / select >
2021-09-07 00:37:26 +00:00
< / div >
< / div >
2022-01-16 19:37:46 +00:00
< div class = "form-group" ng-if = "ctrl.state.resourcePoolHasQuota && ctrl.resourceQuotaCapacityExceeded() && ctrl.formValues.ResourcePool" >
< div class = "col-sm-12 small text-danger" >
2022-11-28 02:00:28 +00:00
< pr-icon icon = "'alert-triangle'" > < / pr-icon >
2022-01-16 19:37:46 +00:00
This namespace has exhausted its resource capacity and you will not be able to deploy the application. Contact your administrator to expand the capacity of the
namespace.
< / div >
< / div >
< div class = "form-group" ng-if = "!ctrl.formValues.ResourcePool" >
2022-09-14 23:09:19 +00:00
< div class = "col-sm-12 small text-warning" >
2022-11-28 02:00:28 +00:00
< pr-icon icon = "'alert-triangle'" > < / pr-icon >
2022-01-16 19:37:46 +00:00
You do not have access to any namespace. Contact your administrator to get access to a namespace.
2020-07-05 23:21:03 +00:00
< / div >
< / div >
2021-09-07 00:37:26 +00:00
<!-- #endregion -->
2020-07-05 23:21:03 +00:00
2023-10-16 01:08:06 +00:00
<!-- #region STACK -->
< div class = "form-group" ng-if = "!ctrl.deploymentOptions.hideStacksFunctionality && ctrl.state.appType !== ctrl.KubernetesDeploymentTypes.APPLICATION_FORM" >
< div class = "col-sm-12 small text-muted vertical-center" >
< pr-icon icon = "'info'" mode = "'primary'" > < / pr-icon >
Portainer can automatically bundle multiple applications inside a stack. Enter a name of a new stack or select an existing stack in the list. Leave empty to use
the application name.
< / div >
< / div >
< div class = "form-group" ng-if = "!ctrl.deploymentOptions.hideStacksFunctionality && ctrl.state.appType !== ctrl.KubernetesDeploymentTypes.APPLICATION_FORM" >
< label for = "stack_name" class = "col-sm-3 col-lg-2 control-label text-left" >
Stack
< portainer-tooltip
ng-if="!ctrl.isAdmin"
message="'The stack field below was previously labelled \'Name\' but, in
fact, it\'s always been the stack name (hence the relabelling).'"
class-name="'[& >span]:!text-left'"
set-html-message="true"
>
< / portainer-tooltip >
< portainer-tooltip
ng-if="ctrl.isAdmin"
message="'The stack field below was previously labelled \'Name\' but, in
fact, it\'s always been the stack name (hence the relabelling).< br / >
Kubernetes Stacks functionality can be turned off entirely via
< a href = \'/#!/settings\' target = \'_blank\' >
Kubernetes Settings
< / a > .'"
class-name="'[& >span]:!text-left'"
set-html-message="true"
>
< / portainer-tooltip >
< / label >
< div class = "col-sm-8" >
< input
type="text"
class="form-control"
placeholder="myStack"
ng-model="ctrl.formValues.StackName"
name="stack_name"
uib-typeahead="stack for stack in ctrl.stacks | filter:$viewValue | limitTo:7"
typeahead-min-length="0"
data-cy="k8sAppCreate-stackName"
/>
< / div >
< / div >
<!-- #endregion -->
2022-01-16 19:37:46 +00:00
<!-- #region Git repository -->
< kubernetes-redeploy-app-git-form
ng-if="ctrl.state.appType === ctrl.KubernetesDeploymentTypes.GIT"
stack="ctrl.stack"
namespace="ctrl.formValues.ResourcePool.Namespace.Name"
>< / kubernetes-redeploy-app-git-form >
<!-- #endregion -->
2021-03-24 18:27:32 +00:00
2022-01-16 19:37:46 +00:00
<!-- #region web editor -->
< web-editor-form
2023-01-26 03:03:44 +00:00
read-only="ctrl.stack.IsComposeFormat"
2022-01-16 19:37:46 +00:00
ng-if="ctrl.state.appType === ctrl.KubernetesDeploymentTypes.CONTENT"
value="ctrl.stackFileContent"
yml="true"
identifier="kubernetes-deploy-editor"
2023-03-30 09:26:32 +00:00
placeholder="Define or paste the content of your manifest file here"
2022-01-16 19:37:46 +00:00
on-change="(ctrl.onChangeFileContent)"
>
< editor-description >
2023-03-30 09:26:32 +00:00
< div class = "flex gap-1" ng-show = "ctrl.stack.IsComposeFormat" >
2023-01-26 03:03:44 +00:00
< pr-icon icon = "'alert-circle'" mode = "'warning'" class-name = "'!mt-1'" > < / pr-icon >
< div >
< p >
Portainer no longer supports < a href = "https://docs.docker.com/compose/compose-file/" target = "_blank" > docker-compose< / a > format manifests for Kubernetes
2023-03-01 00:11:12 +00:00
deployments, and we have removed the < a href = "https://kompose.io/" target = "_blank" > Kompose< / a >
conversion tool which enables this. The reason for this is because Kompose now poses a security risk, since it has a number of Common Vulnerabilities and
Exposures (CVEs).
2023-01-26 03:03:44 +00:00
< / p >
2023-03-30 09:26:32 +00:00
< p >
Unfortunately, while the Kompose project has a maintainer and is part of the CNCF, it is not being actively maintained. Releases are very infrequent and new
pull requests to the project (including ones we've submitted) are taking months to be merged, with new CVEs arising in the meantime.
< / p >
2023-01-26 03:03:44 +00:00
< p >
We advise installing your own instance of Kompose in a sandbox environment, performing conversions of your Docker Compose files to Kubernetes manifests and
using those manifests to set up applications.
< / p >
< / div >
< / div >
2023-03-30 09:26:32 +00:00
< span ng-show = "!ctrl.stack.IsComposeFormat" >
2022-08-12 18:22:45 +00:00
< p class = "vertical-center" >
2022-11-28 02:00:28 +00:00
< pr-icon icon = "'info'" mode = "'primary'" > < / pr-icon >
2022-01-16 19:37:46 +00:00
This feature allows you to deploy any kind of Kubernetes resource in this environment (Deployment, Secret, ConfigMap...).
< / p >
< p >
You can get more information about Kubernetes file format in the
< a href = "https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/" target = "_blank" > official documentation< / a > .
< / p >
< / span >
< / editor-description >
< / web-editor-form >
<!-- #endregion -->
< div ng-if = "ctrl.state.appType === ctrl.KubernetesDeploymentTypes.APPLICATION_FORM" >
<!-- #region NAME FIELD -->
2021-09-22 04:01:28 +00:00
< div class = "form-group" >
2023-02-12 21:04:24 +00:00
< label for = "application_name" class = "col-sm-3 col-lg-2 control-label required text-left" > Name< / label >
2022-07-11 02:05:23 +00:00
< div class = "col-sm-8" >
2021-09-22 04:01:28 +00:00
< input
type="text"
class="form-control"
2022-01-16 19:37:46 +00:00
name="application_name"
ng-model="ctrl.formValues.Name"
ng-change="ctrl.onChangeName()"
placeholder="my-app"
2022-02-28 05:15:49 +00:00
ng-pattern="/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/"
2022-01-16 19:37:46 +00:00
auto-focus
required
ng-disabled="ctrl.state.isEdit"
data-cy="k8sAppCreate-applicationName"
2021-09-22 04:01:28 +00:00
/>
< / div >
2021-09-07 00:37:26 +00:00
< / div >
2022-01-16 19:37:46 +00:00
< div class = "form-group" ng-show = "kubernetesApplicationCreationForm.application_name.$invalid || ctrl.state.alreadyExists" >
2022-08-12 18:22:45 +00:00
< div class = "small" >
2022-08-22 20:54:40 +00:00
< div class = "col-sm-3 col-lg-2" > < / div >
2022-08-12 18:22:45 +00:00
< div class = "col-sm-8" ng-messages = "kubernetesApplicationCreationForm.application_name.$error" >
2022-09-14 23:09:19 +00:00
< p class = "text-warning vertical-center" ng-message = "required"
2022-11-28 02:00:28 +00:00
>< pr-icon class = "vertical-center" icon = "'alert-triangle'" mode = "'warning'" > < / pr-icon > This field is required.< /p
2022-08-12 18:22:45 +00:00
>
2022-09-14 23:09:19 +00:00
< p class = "text-warning vertical-center" ng-message = "pattern" >
2022-11-28 02:00:28 +00:00
< pr-icon class = "vertical-center" icon = "'alert-triangle'" mode = "'warning'" > < / pr-icon >
2022-02-28 05:15:49 +00:00
This field must consist of lower case alphanumeric characters or '-', contain at most 63 characters, start with an alphabetic character, and end with an
alphanumeric character (e.g. 'my-name', or 'abc-123').
< / p >
2022-01-16 19:37:46 +00:00
< / div >
2022-08-22 20:54:40 +00:00
< div class = "col-sm-8" ng-if = "ctrl.state.alreadyExists" >
2022-09-14 23:09:19 +00:00
< p class = "text-warning vertical-center" >
2022-11-28 02:00:28 +00:00
< pr-icon class = "vertical-center" icon = "'alert-triangle'" mode = "'warning'" > < / pr-icon >
2022-08-22 20:54:40 +00:00
An application with the same name already exists inside the selected namespace.
< / p >
< / div >
2022-01-16 19:37:46 +00:00
< / div >
< / div >
2021-09-22 04:01:28 +00:00
<!-- #endregion -->
2020-07-05 23:21:03 +00:00
2022-01-16 19:37:46 +00:00
<!-- #region IMAGE FIELD -->
2023-03-01 00:11:12 +00:00
< div class = "form-group mb-2" >
2021-09-22 04:01:28 +00:00
< div class = "col-sm-12" >
2022-01-16 19:37:46 +00:00
< por-image-registry
model="ctrl.formValues.ImageModel"
ng-if="ctrl.formValues.ResourcePool"
auto-complete="false"
2022-08-12 18:22:45 +00:00
label-class="col-sm-3 col-lg-2"
input-class="col-sm-8"
2022-01-16 19:37:46 +00:00
namespace="ctrl.formValues.ResourcePool.Namespace.Name"
endpoint="ctrl.endpoint"
is-admin="ctrl.isAdmin"
check-rate-limits="true"
set-validity="ctrl.setPullImageValidity"
>< / por-image-registry >
< / div >
< / div >
2022-07-11 02:05:23 +00:00
<!-- #end region IMAGE FIELD -->
2023-03-10 03:52:09 +00:00
< div class = "col-sm-12 mb-4 !p-0" >
2023-03-01 00:11:12 +00:00
< annotations-be-teaser > < / annotations-be-teaser >
< / div >
2022-01-16 19:37:46 +00:00
< div ng-if = "ctrl.formValues.ResourcePool" >
<!-- #region STACK -->
2023-10-16 01:08:06 +00:00
< div class = "form-group" ng-if = "!ctrl.deploymentOptions.hideStacksFunctionality" >
2022-08-12 18:22:45 +00:00
< div class = "col-sm-12 small text-muted vertical-center" >
2022-11-28 02:00:28 +00:00
< pr-icon icon = "'info'" mode = "'primary'" > < / pr-icon >
2022-01-16 19:37:46 +00:00
Portainer can automatically bundle multiple applications inside a stack. Enter a name of a new stack or select an existing stack in the list. Leave empty to
use the application name.
< / div >
2021-09-22 04:01:28 +00:00
< / div >
2020-07-05 23:21:03 +00:00
2023-10-16 01:08:06 +00:00
< div class = "form-group" ng-if = "!ctrl.deploymentOptions.hideStacksFunctionality" >
2022-07-11 02:05:23 +00:00
< label for = "stack_name" class = "col-sm-3 col-lg-2 control-label text-left" > Stack< / label >
< div class = "col-sm-8" >
2022-01-16 19:37:46 +00:00
< input
type="text"
class="form-control"
placeholder="myStack"
ng-model="ctrl.formValues.StackName"
name="stack_name"
uib-typeahead="stack for stack in ctrl.stacks | filter:$viewValue | limitTo:7"
typeahead-min-length="0"
data-cy="k8sAppCreate-stackName"
/>
< / div >
< / div >
<!-- #endregion -->
<!-- #region ENVIRONMENT VARIABLES -->
< div class = "form-group" >
2023-03-01 00:11:12 +00:00
< div class = "col-sm-12 vertical-center" >
2024-01-02 20:07:11 +00:00
< label class = "control-label !pt-0 text-left !text-sm" > Environment variables< / label >
2022-01-16 19:37:46 +00:00
< / div >
2024-01-02 19:17:54 +00:00
< div class = "col-sm-11 col-lg-10 mt-2" >
< kube-environment-variables-fieldset
values="ctrl.formValues.EnvironmentVariables"
on-change="(ctrl.onEnvironmentVariableChange)"
can-undo-delete="true"
>< / kube-environment-variables-fieldset >
2022-01-16 19:37:46 +00:00
< / div >
2023-03-01 00:11:12 +00:00
< / div >
<!-- #endregion -->
2023-06-11 21:46:48 +00:00
<!-- #region CONFIGMAPS -->
2024-01-02 20:07:11 +00:00
< config-maps-form-section
values="ctrl.formValues.ConfigMaps"
on-change="(ctrl.onConfigMapsChange)"
namespace="ctrl.formValues.ResourcePool.Namespace.Name"
validation-data="ctrl.formValues.ConfigMaps"
>< / config-maps-form-section >
2023-06-11 21:46:48 +00:00
<!-- #region SECRETS -->
2024-01-02 20:07:11 +00:00
< secrets-form-section
values="ctrl.formValues.Secrets"
on-change="(ctrl.onSecretsChange)"
namespace="ctrl.formValues.ResourcePool.Namespace.Name"
validation-data="ctrl.formValues.Secrets"
>< / secrets-form-section >
2022-01-16 19:37:46 +00:00
<!-- #endregion -->
2021-09-22 04:01:28 +00:00
2024-01-02 20:46:26 +00:00
< persisted-folders-form-section
values="ctrl.formValues.PersistedFolders"
initial-values="ctrl.formValues.OriginalPersistedFolders"
on-change="(ctrl.onChangePersistedFolder)"
is-edit="ctrl.state.isEdit"
application-values="ctrl.formValues"
is-add-persistent-folder-button-shown="ctrl.isAddPersistentFolderButtonShown()"
available-volumes="ctrl.availableVolumes"
validation-data="{ namespaceQuotas: ctrl.formValues.ResourcePool.Quota, persistedFolders: ctrl.formValues.PersistedFolders, storageAvailabilities: ctrl.state.storages.availabilities }"
>< / persisted-folders-form-section >
2021-09-07 00:37:26 +00:00
2022-01-16 19:37:46 +00:00
<!-- #region DATA ACCESS POLICY -->
< div ng-if = "ctrl.showDataAccessPolicySection()" >
2024-01-05 02:42:36 +00:00
< access-policy-form-section
2023-02-07 03:33:57 +00:00
value="ctrl.formValues.DataAccessPolicy"
on-change="(ctrl.onDataAccessPolicyChange)"
is-edit="ctrl.state.isEdit"
persisted-folders-use-existing-volumes="ctrl.state.persistedFoldersUseExistingVolumes"
2024-01-05 02:42:36 +00:00
>< / access-policy-form-section >
2022-01-16 19:37:46 +00:00
< / div >
<!-- #endregion -->
2021-09-07 00:37:26 +00:00
2024-01-02 21:03:33 +00:00
< resource-reservation-form-section
values="{memoryLimit: ctrl.formValues.MemoryLimit, cpuLimit: ctrl.formValues.CpuLimit}"
on-change="(ctrl.onChangeResourceReservation)"
namespace-has-quota="ctrl.state.resourcePoolHasQuota"
max-memory-limit="ctrl.state.sliders.memory.max"
max-cpu-limit="ctrl.state.sliders.cpu.max"
validation-data="{maxMemoryLimit: ctrl.state.sliders.memory.max, maxCpuLimit: ctrl.state.sliders.cpu.max}"
resource-quota-capacity-exceeded="ctrl.resourceQuotaCapacityExceeded()"
>< / resource-reservation-form-section >
2021-09-07 00:37:26 +00:00
2022-01-16 19:37:46 +00:00
<!-- deployment options -->
2024-01-02 21:04:08 +00:00
< app-deployment-type-form-section
2023-02-07 03:33:57 +00:00
value="ctrl.formValues.DeploymentType"
on-change="(ctrl.onChangeDeploymentType)"
support-global-deployment="ctrl.supportGlobalDeployment()"
radio-name="'deploymentType'"
2024-01-02 21:04:08 +00:00
>< / app-deployment-type-form-section >
2020-07-05 23:21:03 +00:00
2022-01-16 19:37:46 +00:00
<!-- replica count -->
2024-01-05 02:42:36 +00:00
< div ng-if = "ctrl.formValues.DeploymentType === ctrl.ApplicationDeploymentTypes.Replicated" >
2024-01-02 21:27:38 +00:00
< replication-form-section
values="{replicaCount: ctrl.formValues.ReplicaCount}"
on-change="(ctrl.onChangeReplicaCount)"
support-scalable-replica-deployment="ctrl.supportScalableReplicaDeployment()"
memory-limit="ctrl.formValues.MemoryLimit"
cpu-limit="ctrl.formValues.CpuLimit"
resource-reservations-overflow="ctrl.resourceReservationsOverflow()"
non-scalable-storage="ctrl.getNonScalableStorage()"
validation-data="{resourceReservationsOverflow: ctrl.resourceReservationsOverflow(), quotaExceeded: ctrl.state.storages.quotaExceeded, nonScalableStorage: ctrl.getNonScalableStorage(), supportScalableReplicaDeployment: ctrl.supportScalableReplicaDeployment()}"
>< / replication-form-section >
2021-09-22 04:01:28 +00:00
< / div >
2022-01-16 19:37:46 +00:00
<!-- #endregion -->
2021-09-22 04:01:28 +00:00
2022-01-16 19:37:46 +00:00
<!-- #region AUTO SCALING -->
2024-01-05 02:42:36 +00:00
< div ng-if = "ctrl.formValues.DeploymentType !== ctrl.ApplicationDeploymentTypes.Global" >
2024-01-02 21:42:39 +00:00
< auto-scaling-form-section
2024-01-05 02:42:36 +00:00
values="ctrl.formValues.AutoScaler"
2024-01-02 21:42:39 +00:00
on-change="(ctrl.onAutoScaleChange)"
validation-data="{autoScalerOverflow: ctrl.autoScalerOverflow()}"
is-metrics-enabled="ctrl.state.useServerMetrics"
>< / auto-scaling-form-section >
2021-09-22 04:01:28 +00:00
< / div >
2022-01-16 19:37:46 +00:00
<!-- #endregion -->
2023-03-01 00:11:12 +00:00
< / div >
2020-08-12 23:30:23 +00:00
2024-01-02 22:00:50 +00:00
< placement-form-section
2024-01-05 02:42:36 +00:00
ng-if="ctrl.formValues.DeploymentType === ctrl.ApplicationDeploymentTypes.Replicated"
2024-01-02 22:00:50 +00:00
values="{placements: ctrl.formValues.Placements, placementType: ctrl.formValues.PlacementType}"
on-change="(ctrl.onChangePlacements)"
>< / placement-form-section >
2023-03-01 00:11:12 +00:00
<!-- kubernetes services options -->
2024-01-02 22:00:50 +00:00
< div class = "mb-8" ng-if = "ctrl.formValues.ResourcePool" >
2023-11-05 17:37:48 +00:00
< kube-services-form
on-change="(ctrl.onServicesChange)"
values="ctrl.formValues.Services"
load-balancer-enabled="ctrl.publishViaLoadBalancerEnabled()"
app-name="ctrl.formValues.Name"
selector="ctrl.formValues.Selector"
validation-data="{nodePortServices: ctrl.state.nodePortServices, formServices: ctrl.formValues.Services, ingressPaths: ctrl.ingressPaths, originalIngressPaths: ctrl.originalIngressPaths}"
is-edit-mode="ctrl.state.isEdit"
namespace="ctrl.formValues.ResourcePool.Namespace.Name"
>< / kube-services-form >
< / div >
2023-03-01 00:11:12 +00:00
<!-- kubernetes services options -->
2024-01-10 21:14:23 +00:00
<!-- application summary start -->
<!-- below workaround is needed because we wanted react to render it again
by hiding/showing it, but the page was fluctuating. so we added two blocks for both the conditions -->
< div ng-if = "!ctrl.isTemporaryRefresh" >
<!-- summary -->
< application-summary-section
application-kind="ctrl.formValues.ApplicationType"
ng-if="!(!kubernetesApplicationCreationForm.$valid || ctrl.isDeployUpdateButtonDisabled() || !ctrl.state.pullImageValidity)"
form-values="ctrl.formValues"
old-form-values="ctrl.savedFormValues"
>< / application-summary-section >
< / div >
< div ng-if = "ctrl.isTemporaryRefresh" >
<!-- summary -->
< application-summary-section
application-kind="ctrl.formValues.ApplicationType"
ng-if="!(!kubernetesApplicationCreationForm.$valid || ctrl.isDeployUpdateButtonDisabled() || !ctrl.state.pullImageValidity)"
form-values="ctrl.formValues"
old-form-values="ctrl.savedFormValues"
>< / application-summary-section >
< / div >
<!-- application summary end -->
2022-01-16 19:37:46 +00:00
< / div >
2023-12-03 18:43:53 +00:00
<!-- #region ACTIONS -->
< div class = "col-sm-12 form-section-title !mt-6" ng-if = "ctrl.state.appType !== ctrl.KubernetesDeploymentTypes.GIT" ng-hide = "ctrl.stack.IsComposeFormat" > Actions < / div >
< div class = "form-group" ng-hide = "ctrl.stack.IsComposeFormat" >
< div class = "col-sm-12" >
< button
ng-if="ctrl.state.appType === ctrl.KubernetesDeploymentTypes.APPLICATION_FORM"
type="button"
class="btn btn-primary btn-sm !ml-0"
ng-disabled="!kubernetesApplicationCreationForm.$valid || ctrl.isDeployUpdateButtonDisabled() || !ctrl.imageValidityIsValid() || ctrl.hasPortErrors() || !ctrl.formValues.ResourcePool"
ng-click="ctrl.deployApplication()"
button-spinner="ctrl.state.actionInProgress"
data-cy="k8sAppCreate-deployButton"
>
< span ng-show = "!ctrl.state.isEdit && !ctrl.state.actionInProgress" > Deploy application< / span >
< span ng-show = "!ctrl.state.isEdit && ctrl.state.actionInProgress" > Deployment in progress...< / span >
< span ng-show = "ctrl.state.isEdit && !ctrl.state.actionInProgress" > Update application< / span >
< span ng-show = "ctrl.state.isEdit && ctrl.state.actionInProgress" > Update in progress...< / span >
< / button >
< button
ng-if="ctrl.state.isEdit & & !ctrl.state.actionInProgress & & ctrl.state.appType === ctrl.KubernetesDeploymentTypes.APPLICATION_FORM"
type="button"
class="btn btn-sm btn-default"
ui-sref="kubernetes.applications.application({ name: ctrl.application.Name, namespace: ctrl.application.ResourcePool })"
data-cy="k8sAppCreate-appCancelButton"
>
Cancel
< / button >
<!-- #Web editor buttons -->
< button
class="btn btn-sm btn-primary"
ng-click="ctrl.updateApplicationViaWebEditor()"
ng-if="ctrl.state.appType === ctrl.KubernetesDeploymentTypes.CONTENT || ctrl.state.updateWebEditorInProgress"
ng-disabled="!kubernetesApplicationCreationForm.$valid || !ctrl.state.isEditorDirty || ctrl.state.updateWebEditorInProgress"
style="margin-top: 7px; margin-left: 0"
button-spinner="ctrl.state.updateWebEditorInProgress"
>
< span ng-show = "!ctrl.state.updateWebEditorInProgress" > Update the application< / span >
< span ng-show = "ctrl.state.updateWebEditorInProgress" > Update in progress...< / span >
< / button >
2021-09-07 00:37:26 +00:00
< / div >
2021-09-24 01:00:55 +00:00
< / div >
2020-07-05 23:21:03 +00:00
< / div >
< / form >
< / rd-widget-body >
< / rd-widget >
< / div >
< / div >
< / div >