diff --git a/app/kubernetes/views/applications/create/createApplication.html b/app/kubernetes/views/applications/create/createApplication.html index d590c6c38..c7d635213 100644 --- a/app/kubernetes/views/applications/create/createApplication.html +++ b/app/kubernetes/views/applications/create/createApplication.html @@ -1771,7 +1771,7 @@ ng-if="ctrl.state.appType === ctrl.KubernetesDeploymentTypes.APPLICATION_FORM" type="button" class="btn btn-primary btn-sm" - ng-disabled="!kubernetesApplicationCreationForm.$valid || ctrl.isDeployUpdateButtonDisabled() || !ctrl.state.pullImageValidity" + ng-disabled="!kubernetesApplicationCreationForm.$valid || ctrl.isDeployUpdateButtonDisabled() || !ctrl.imageValidityIsValid()" ng-click="ctrl.deployApplication()" button-spinner="ctrl.state.actionInProgress" data-cy="k8sAppCreate-deployButton" diff --git a/app/kubernetes/views/applications/create/createApplicationController.js b/app/kubernetes/views/applications/create/createApplicationController.js index 24578a374..a11218673 100644 --- a/app/kubernetes/views/applications/create/createApplicationController.js +++ b/app/kubernetes/views/applications/create/createApplicationController.js @@ -2,6 +2,7 @@ import angular from 'angular'; import _ from 'lodash-es'; import filesizeParser from 'filesize-parser'; import * as JsonPatch from 'fast-json-patch'; +import { RegistryTypes } from '@/portainer/models/registryTypes'; import { KubernetesApplicationDataAccessPolicies, @@ -193,6 +194,10 @@ class KubernetesCreateApplicationController { this.state.pullImageValidity = validity; } + imageValidityIsValid() { + return this.state.pullImageValidity || this.formValues.ImageModel.Registry.Type !== RegistryTypes.DOCKERHUB; + } + onChangeName() { const existingApplication = _.find(this.applications, { Name: this.formValues.Name }); this.state.alreadyExists = (this.state.isEdit && existingApplication && this.application.Id !== existingApplication.Id) || (!this.state.isEdit && existingApplication);