feat(kube/app): show image pull policy (#4785)

* feat(kube/app): show image pull policy

* fix(kube/app): remove image pull policy

* feat(kube/apps): show container image pull policy
pull/4758/head
Chaim Lev-Ari 4 years ago committed by GitHub
parent fc0de913c3
commit 0cfa912d77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -78,6 +78,13 @@
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'Image' && $ctrl.state.reverseOrder"></i>
</a>
</th>
<th>
<a ng-click="$ctrl.changeOrderBy('ImagePullPolicy')">
Image Pull Policy
<i class="fa fa-sort-alpha-down" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'ImagePullPolicy' && !$ctrl.state.reverseOrder"></i>
<i class="fa fa-sort-alpha-up" aria-hidden="true" ng-if="$ctrl.state.orderBy === 'ImagePullPolicy' && $ctrl.state.reverseOrder"></i>
</a>
</th>
<th>
<a ng-click="$ctrl.changeOrderBy('Status')">
Status
@ -110,6 +117,7 @@
<td ng-if="!$ctrl.isPod">{{ item.PodName }}</td>
<td>{{ item.Name }}</td>
<td>{{ item.Image }}</td>
<td>{{ item.ImagePullPolicy }}</td>
<td
><span class="label label-{{ item.Status | kubernetesPodStatusColor }}">{{ item.Status }}</span></td
>

@ -59,7 +59,9 @@ class KubernetesApplicationConverter {
res.Note = data.metadata.annotations ? data.metadata.annotations[KubernetesPortainerApplicationNote] || '' : '';
res.ApplicationName = data.metadata.labels ? data.metadata.labels[KubernetesPortainerApplicationNameLabel] || res.Name : res.Name;
res.ResourcePool = data.metadata.namespace;
res.Image = containers[0].image;
if (containers.length) {
res.Image = containers[0].image;
}
res.CreationDate = data.metadata.creationTimestamp;
res.Env = _.without(_.flatMap(_.map(containers, 'env')), undefined);
res.Pods = data.spec.selector ? KubernetesApplicationHelper.associatePodsAndApplication(pods, data.spec.selector) : [data];

@ -70,6 +70,7 @@ function computeContainers(data) {
res.PodName = data.metadata.name;
res.Name = item.name;
res.Image = item.image;
res.ImagePullPolicy = item.imagePullPolicy;
res.Node = data.spec.nodeName;
res.CreationDate = data.status.startTime;
res.Status = computeContainerStatus(data.status.containerStatuses, item.name);

@ -47,6 +47,7 @@ const _KubernetesPodContainer = Object.freeze({
PodName: '',
Name: '',
Image: '',
ImagePullPolicy: '',
Node: '',
CreationDate: '',
Status: '',

Loading…
Cancel
Save