mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
feat(k8s/application): expose tolerations and affinities (#4063)
* feat(k8s/application): expose placement conditions * feat(k8s/applications): minor UI update * feat(k8s/application): update message for admin and non admin users * feat(kubernetes/applications): minor UI update Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
This commit is contained in:
parent
63bf654d8d
commit
4431d748c2
22 changed files with 635 additions and 112 deletions
40
app/kubernetes/models/application/models/constants.js
Normal file
40
app/kubernetes/models/application/models/constants.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
export const KubernetesApplicationDeploymentTypes = Object.freeze({
|
||||
REPLICATED: 1,
|
||||
GLOBAL: 2,
|
||||
});
|
||||
|
||||
export const KubernetesApplicationDataAccessPolicies = Object.freeze({
|
||||
SHARED: 1,
|
||||
ISOLATED: 2,
|
||||
});
|
||||
|
||||
export const KubernetesApplicationTypes = Object.freeze({
|
||||
DEPLOYMENT: 1,
|
||||
DAEMONSET: 2,
|
||||
STATEFULSET: 3,
|
||||
});
|
||||
|
||||
export const KubernetesApplicationTypeStrings = Object.freeze({
|
||||
DEPLOYMENT: 'Deployment',
|
||||
DAEMONSET: 'DaemonSet',
|
||||
STATEFULSET: 'StatefulSet',
|
||||
});
|
||||
|
||||
export const KubernetesApplicationPublishingTypes = Object.freeze({
|
||||
INTERNAL: 1,
|
||||
CLUSTER: 2,
|
||||
LOAD_BALANCER: 3,
|
||||
});
|
||||
|
||||
export const KubernetesApplicationQuotaDefaults = {
|
||||
CpuLimit: 0.1,
|
||||
MemoryLimit: 64, // MB
|
||||
};
|
||||
|
||||
export const KubernetesPortainerApplicationStackNameLabel = 'io.portainer.kubernetes.application.stack';
|
||||
|
||||
export const KubernetesPortainerApplicationNameLabel = 'io.portainer.kubernetes.application.name';
|
||||
|
||||
export const KubernetesPortainerApplicationOwnerLabel = 'io.portainer.kubernetes.application.owner';
|
||||
|
||||
export const KubernetesPortainerApplicationNote = 'io.portainer.kubernetes.application.note';
|
|
@ -1,43 +1,4 @@
|
|||
export const KubernetesApplicationDeploymentTypes = Object.freeze({
|
||||
REPLICATED: 1,
|
||||
GLOBAL: 2,
|
||||
});
|
||||
|
||||
export const KubernetesApplicationDataAccessPolicies = Object.freeze({
|
||||
SHARED: 1,
|
||||
ISOLATED: 2,
|
||||
});
|
||||
|
||||
export const KubernetesApplicationTypes = Object.freeze({
|
||||
DEPLOYMENT: 1,
|
||||
DAEMONSET: 2,
|
||||
STATEFULSET: 3,
|
||||
});
|
||||
|
||||
export const KubernetesApplicationTypeStrings = Object.freeze({
|
||||
DEPLOYMENT: 'Deployment',
|
||||
DAEMONSET: 'DaemonSet',
|
||||
STATEFULSET: 'StatefulSet',
|
||||
});
|
||||
|
||||
export const KubernetesApplicationPublishingTypes = Object.freeze({
|
||||
INTERNAL: 1,
|
||||
CLUSTER: 2,
|
||||
LOAD_BALANCER: 3,
|
||||
});
|
||||
|
||||
export const KubernetesApplicationQuotaDefaults = {
|
||||
CpuLimit: 0.1,
|
||||
MemoryLimit: 64, // MB
|
||||
};
|
||||
|
||||
export const KubernetesPortainerApplicationStackNameLabel = 'io.portainer.kubernetes.application.stack';
|
||||
|
||||
export const KubernetesPortainerApplicationNameLabel = 'io.portainer.kubernetes.application.name';
|
||||
|
||||
export const KubernetesPortainerApplicationOwnerLabel = 'io.portainer.kubernetes.application.owner';
|
||||
|
||||
export const KubernetesPortainerApplicationNote = 'io.portainer.kubernetes.application.note';
|
||||
export * from './constants';
|
||||
|
||||
/**
|
||||
* KubernetesApplication Model (Composite)
|
|
@ -1,40 +0,0 @@
|
|||
/**
|
||||
* KubernetesNode Model
|
||||
*/
|
||||
const _KubernetesNode = Object.freeze({
|
||||
Id: '',
|
||||
Name: '',
|
||||
Role: '',
|
||||
Status: '',
|
||||
CPU: 0,
|
||||
Memory: '',
|
||||
Version: '',
|
||||
IPAddress: '',
|
||||
});
|
||||
|
||||
export class KubernetesNode {
|
||||
constructor() {
|
||||
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesNode)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* KubernetesNodeDetails Model
|
||||
*/
|
||||
const _KubernetesNodeDetails = Object.freeze({
|
||||
CreationDate: '',
|
||||
OS: {
|
||||
Architecture: '',
|
||||
Platform: '',
|
||||
Image: '',
|
||||
},
|
||||
Conditions: [],
|
||||
Yaml: '',
|
||||
});
|
||||
|
||||
export class KubernetesNodeDetails {
|
||||
constructor() {
|
||||
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesNode)));
|
||||
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesNodeDetails)));
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
/**
|
||||
* KubernetesPod Model
|
||||
*/
|
||||
const _KubernetesPod = Object.freeze({
|
||||
Id: '',
|
||||
Name: '',
|
||||
Namespace: '',
|
||||
Images: [],
|
||||
Status: '',
|
||||
Restarts: 0,
|
||||
Node: '',
|
||||
CreationDate: '',
|
||||
Containers: [],
|
||||
Labels: [],
|
||||
});
|
||||
|
||||
export class KubernetesPod {
|
||||
constructor() {
|
||||
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesPod)));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue