mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59: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
29
app/kubernetes/pod/payloads/affinities.js
Normal file
29
app/kubernetes/pod/payloads/affinities.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
export function KubernetesPodNodeAffinityPayload() {
|
||||
return {
|
||||
requiredDuringSchedulingIgnoredDuringExecution: {
|
||||
nodeSelectorTerms: [], // []KubernetesNodeSelectorTermPayload
|
||||
},
|
||||
preferredDuringSchedulingIgnoredDuringExecution: [], // []KubernetesPreferredSchedulingTermPayload
|
||||
};
|
||||
}
|
||||
|
||||
export function KubernetesPreferredSchedulingTermPayload() {
|
||||
return {
|
||||
weight: 1,
|
||||
preference: {}, // KubernetesNodeSelectorTermPayload
|
||||
};
|
||||
}
|
||||
|
||||
export function KubernetesNodeSelectorTermPayload() {
|
||||
return {
|
||||
matchExpressions: [], // []KubernetesNodeSelectorRequirementPayload
|
||||
};
|
||||
}
|
||||
|
||||
export function KubernetesNodeSelectorRequirementPayload() {
|
||||
return {
|
||||
key: '', // string
|
||||
operator: '', // KubernetesPodNodeAffinityNodeSelectorRequirementOperators
|
||||
values: [], // []string
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue