1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19:41 +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

@ -3,14 +3,14 @@ import { KubernetesPortMapping, KubernetesPortMappingPort } from 'Kubernetes/mod
import { KubernetesServiceTypes } from 'Kubernetes/models/service/models';
import { KubernetesConfigurationTypes } from 'Kubernetes/models/configuration/models';
import {
KubernetesApplicationConfigurationFormValueOverridenKeyTypes,
KubernetesApplicationEnvironmentVariableFormValue,
KubernetesApplicationAutoScalerFormValue,
KubernetesApplicationConfigurationFormValue,
KubernetesApplicationConfigurationFormValueOverridenKey,
KubernetesApplicationConfigurationFormValueOverridenKeyTypes,
KubernetesApplicationEnvironmentVariableFormValue,
KubernetesApplicationPersistedFolderFormValue,
KubernetesApplicationPublishedPortFormValue,
KubernetesApplicationAutoScalerFormValue,
KubernetesApplicationPlacementFormValue,
KubernetesApplicationPublishedPortFormValue,
} from 'Kubernetes/models/application/formValues';
import {
KubernetesApplicationEnvConfigMapPayload,
@ -23,13 +23,13 @@ import {
KubernetesApplicationVolumeSecretPayload,
} from 'Kubernetes/models/application/payloads';
import KubernetesVolumeHelper from 'Kubernetes/helpers/volumeHelper';
import { KubernetesApplicationPlacementTypes, KubernetesApplicationDeploymentTypes } from 'Kubernetes/models/application/models';
import { KubernetesPodNodeAffinityNodeSelectorRequirementOperators, KubernetesPodAffinity } from 'Kubernetes/pod/models';
import { KubernetesApplicationDeploymentTypes, KubernetesApplicationPlacementTypes } from 'Kubernetes/models/application/models';
import { KubernetesPodAffinity, KubernetesPodNodeAffinityNodeSelectorRequirementOperators } from 'Kubernetes/pod/models';
import {
KubernetesNodeSelectorTermPayload,
KubernetesPreferredSchedulingTermPayload,
KubernetesPodNodeAffinityPayload,
KubernetesNodeSelectorRequirementPayload,
KubernetesNodeSelectorTermPayload,
KubernetesPodNodeAffinityPayload,
KubernetesPreferredSchedulingTermPayload,
} from 'Kubernetes/pod/payloads/affinities';
class KubernetesApplicationHelper {
@ -65,7 +65,7 @@ class KubernetesApplicationHelper {
}
static associateContainersAndApplication(app) {
if (!app.Pods) {
if (!app.Pods || app.Pods.length === 0) {
return [];
}
const containers = app.Pods[0].Containers;