1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00
portainer/app/kubernetes/node/formValues.js
Maxime Bajeux 32a9a2e46b
Enable the ability to cordon/uncordon/drain nodes (#4723)
* feat(node): Enable the ability to cordon/uncordon/drain nodes

* feat(cluster): check if there is a drain operation somewhere

* feat(kubernetes): allow to cordon, uncordon, drain nodes

* refacto(kubernetes): set a constant for drain label name

* fix(node): Relocate the warning message next to the dropdown and change the information message
2021-03-15 22:36:14 +01:00

41 lines
860 B
JavaScript

const _KubernetesNodeFormValues = Object.freeze({
Taints: [],
Labels: [],
Availability: '',
});
export class KubernetesNodeFormValues {
constructor() {
Object.assign(JSON.parse(JSON.stringify(_KubernetesNodeFormValues)));
}
}
const _KubernetesNodeTaintFormValues = Object.freeze({
Key: '',
Values: '',
Effect: '',
NeedsDeletion: false,
IsNew: false,
IsChanged: false,
});
export class KubernetesNodeTaintFormValues {
constructor() {
Object.assign(JSON.parse(JSON.stringify(_KubernetesNodeTaintFormValues)));
}
}
const _KubernetesNodeLabelFormValues = Object.freeze({
Key: '',
Values: '',
NeedsDeletion: false,
IsNew: false,
IsUsed: false,
IsChanged: false,
});
export class KubernetesNodeLabelFormValues {
constructor() {
Object.assign(JSON.parse(JSON.stringify(_KubernetesNodeLabelFormValues)));
}
}