1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 21:39:40 +02:00

fix(k8s/applications): fix an issue with daemonset in 0/0 state (#4288)

This commit is contained in:
Anthony Lapenna 2020-08-31 17:21:25 +12:00 committed by GitHub
parent 8dac2df7bf
commit 9300603777
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 12 deletions

View file

@ -40,6 +40,10 @@ function computeTolerations(nodes, application) {
// Some operators require empty "values" field, some only one element in "values" field, etc
function computeAffinities(nodes, application) {
if (!application.Pods || application.Pods.length === 0) {
return nodes;
}
const pod = application.Pods[0];
_.forEach(nodes, (n) => {
if (pod.NodeSelector) {