mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 22:39:41 +02:00
feat(k8s/application): add/edit placement preferences/constraints (#4210)
* feat(k8s/application): create application with placement preferences/constraints * feat(k8s/application): edit application placement preferences/constraints
This commit is contained in:
parent
32bac9ffcc
commit
52bdcf2e2b
22 changed files with 451 additions and 190 deletions
|
@ -1,4 +1,4 @@
|
|||
import { KubernetesApplicationDataAccessPolicies, KubernetesApplicationDeploymentTypes, KubernetesApplicationPublishingTypes } from './models';
|
||||
import { KubernetesApplicationDataAccessPolicies, KubernetesApplicationDeploymentTypes, KubernetesApplicationPublishingTypes, KubernetesApplicationPlacementTypes } from './models';
|
||||
|
||||
/**
|
||||
* KubernetesApplicationFormValues Model
|
||||
|
@ -10,19 +10,21 @@ const _KubernetesApplicationFormValues = Object.freeze({
|
|||
StackName: '',
|
||||
ApplicationOwner: '',
|
||||
Image: '',
|
||||
ReplicaCount: 1,
|
||||
Note: '',
|
||||
EnvironmentVariables: [], // KubernetesApplicationEnvironmentVariableFormValue list
|
||||
PersistedFolders: [], // KubernetesApplicationPersistedFolderFormValue list
|
||||
PublishedPorts: [], // KubernetesApplicationPublishedPortFormValue list
|
||||
MemoryLimit: 0,
|
||||
CpuLimit: 0,
|
||||
DeploymentType: KubernetesApplicationDeploymentTypes.REPLICATED,
|
||||
PublishingType: KubernetesApplicationPublishingTypes.INTERNAL,
|
||||
DataAccessPolicy: KubernetesApplicationDataAccessPolicies.SHARED,
|
||||
Configurations: [], // KubernetesApplicationConfigurationFormValue list
|
||||
Containers: [],
|
||||
ReplicaCount: 1,
|
||||
AutoScaler: {},
|
||||
Containers: [],
|
||||
EnvironmentVariables: [], // KubernetesApplicationEnvironmentVariableFormValue list
|
||||
DataAccessPolicy: KubernetesApplicationDataAccessPolicies.SHARED,
|
||||
PersistedFolders: [], // KubernetesApplicationPersistedFolderFormValue list
|
||||
Configurations: [], // KubernetesApplicationConfigurationFormValue list
|
||||
PublishingType: KubernetesApplicationPublishingTypes.INTERNAL,
|
||||
PublishedPorts: [], // KubernetesApplicationPublishedPortFormValue list
|
||||
PlacementType: KubernetesApplicationPlacementTypes.PREFERRED,
|
||||
Placements: [], // KubernetesApplicationPlacementFormValue list
|
||||
OriginalIngresses: undefined,
|
||||
});
|
||||
|
||||
|
@ -123,6 +125,15 @@ export function KubernetesApplicationPublishedPortFormValue() {
|
|||
};
|
||||
}
|
||||
|
||||
export function KubernetesApplicationPlacementFormValue() {
|
||||
return {
|
||||
Label: {},
|
||||
Value: '',
|
||||
NeedsDeletion: false,
|
||||
IsNew: true,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* KubernetesApplicationAutoScalerFormValue Model
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue