2022-07-06 06:08:45 +00:00
|
|
|
<page-header ng-if="ctrl.state.viewReady" title="'Node details'" breadcrumbs="[{ label:'Cluster', link:'kubernetes.cluster' }, ctrl.node.Name]" reload="true"></page-header>
|
2020-07-05 23:21:03 +00:00
|
|
|
|
|
|
|
<kubernetes-view-loading view-ready="ctrl.state.viewReady"></kubernetes-view-loading>
|
|
|
|
|
|
|
|
<div ng-if="ctrl.state.viewReady">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<rd-widget>
|
|
|
|
<rd-widget-body classes="no-padding">
|
|
|
|
<uib-tabset active="ctrl.state.activeTab" justified="true" type="pills">
|
|
|
|
<uib-tab index="0" classes="btn-sm" select="ctrl.selectTab(0)">
|
2022-07-17 23:48:24 +00:00
|
|
|
<uib-tab-heading class="flex-center gap-1"> <pr-icon icon="'hard-drive'" size="'sm'" feather="true"></pr-icon> Node </uib-tab-heading>
|
2020-07-05 23:21:03 +00:00
|
|
|
|
2022-01-17 05:53:32 +00:00
|
|
|
<form class="form-horizontal" name="kubernetesNodeUpdateForm" style="padding: 20px" autocomplete="off">
|
2020-07-05 23:21:03 +00:00
|
|
|
<table class="table">
|
|
|
|
<tbody ng-if="ctrl.node">
|
|
|
|
<tr>
|
|
|
|
<td>Hostname</td>
|
2020-08-05 00:15:17 +00:00
|
|
|
<td>
|
|
|
|
{{ ctrl.node.Name }}
|
2022-01-17 05:53:32 +00:00
|
|
|
<span class="label label-primary image-tag" style="margin-left: 5px" ng-if="ctrl.node.Api">api</span>
|
2020-08-05 00:15:17 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2020-08-11 00:38:19 +00:00
|
|
|
<tr ng-if="ctrl.node.Api">
|
2022-01-17 05:53:32 +00:00
|
|
|
<td> Kubernetes API </td>
|
2020-08-05 00:15:17 +00:00
|
|
|
<td>{{ ctrl.node.IPAddress }}:{{ ctrl.node.Port }}</td>
|
2020-07-05 23:21:03 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Role</td>
|
|
|
|
<td>{{ ctrl.node.Role }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Kubelet version</td>
|
|
|
|
<td>{{ ctrl.node.Version }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Creation date</td>
|
|
|
|
<td>{{ ctrl.node.CreationDate | getisodate }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Status</td>
|
|
|
|
<td>
|
|
|
|
<span class="label label-{{ ctrl.node.Status | kubernetesNodeStatusColor }}">
|
|
|
|
{{ ctrl.node.Status }}
|
|
|
|
</span>
|
|
|
|
<span ng-if="ctrl.node.Status == 'Warning'" class="text text-warning">
|
|
|
|
{{ ctrl.node.Conditions | kubernetesNodeConditionsMessage }}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2021-03-15 21:36:14 +00:00
|
|
|
<tr>
|
2022-01-17 05:53:32 +00:00
|
|
|
<td class="col-xs-3"> Availability </td>
|
2021-03-15 21:36:14 +00:00
|
|
|
<td class="col-xs-9">
|
2022-01-17 05:53:32 +00:00
|
|
|
<select class="form-control" name="availability" style="display: inline-block; width: 16rem" ng-model="ctrl.formValues.Availability">
|
2021-03-15 21:36:14 +00:00
|
|
|
<option>{{ ctrl.availabilities.ACTIVE }}</option>
|
|
|
|
<option>{{ ctrl.availabilities.PAUSE }}</option>
|
|
|
|
<option>{{ ctrl.availabilities.DRAIN }}</option>
|
|
|
|
</select>
|
2022-07-17 23:48:24 +00:00
|
|
|
<span class="small vertical-center" ng-if="ctrl.state.isDrainOperation && ctrl.formValues.Availability === ctrl.availabilities.DRAIN">
|
|
|
|
<pr-icon icon="'alert-triangle'" feather="true" mode="'warning'"></pr-icon>
|
2021-03-15 21:36:14 +00:00
|
|
|
Cannot use this action while another node is currently being drained.
|
|
|
|
</span>
|
2022-07-17 23:48:24 +00:00
|
|
|
<span class="small vertical-center" ng-if="ctrl.state.isContainPortainer && ctrl.formValues.Availability === ctrl.availabilities.DRAIN">
|
|
|
|
<pr-icon icon="'alert-triangle'" feather="true" mode="'warning'"></pr-icon>
|
2021-03-15 21:36:14 +00:00
|
|
|
Cannot drain a node where this Portainer instance is running.
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2020-07-05 23:21:03 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2020-08-11 23:42:55 +00:00
|
|
|
|
2022-01-17 05:53:32 +00:00
|
|
|
<div style="padding: 8px">
|
2020-07-05 23:21:03 +00:00
|
|
|
<kubernetes-resource-reservation
|
|
|
|
ng-if="ctrl.resourceReservation"
|
2021-07-28 02:26:03 +00:00
|
|
|
cpu-reservation="ctrl.resourceReservation.CPU"
|
|
|
|
cpu-usage="ctrl.resourceUsage.CPU"
|
2020-07-05 23:21:03 +00:00
|
|
|
cpu-limit="ctrl.node.CPU"
|
2021-07-28 02:26:03 +00:00
|
|
|
memory-reservation="ctrl.resourceReservation.Memory"
|
|
|
|
memory-usage="ctrl.resourceUsage.Memory"
|
2020-07-05 23:21:03 +00:00
|
|
|
memory-limit="ctrl.memoryLimit"
|
|
|
|
description="Resource reservation represents the total amount of resource assigned to all the applications running on this node."
|
2021-08-13 04:46:18 +00:00
|
|
|
display-usage="ctrl.hasResourceUsageAccess()"
|
2020-07-05 23:21:03 +00:00
|
|
|
>
|
|
|
|
</kubernetes-resource-reservation>
|
|
|
|
</div>
|
2020-08-11 23:42:55 +00:00
|
|
|
|
2022-01-17 05:53:32 +00:00
|
|
|
<div style="padding: 8px">
|
2020-08-11 23:42:55 +00:00
|
|
|
<!-- #region labels -->
|
2022-01-17 05:53:32 +00:00
|
|
|
<div class="col-sm-12 form-section-title"> Labels </div>
|
2020-08-11 23:42:55 +00:00
|
|
|
|
2022-01-17 05:53:32 +00:00
|
|
|
<div style="margin-bottom: 10px">
|
2022-07-17 23:48:24 +00:00
|
|
|
<span class="label label-default interactive vertical-center" ng-click="ctrl.addLabel()"> <pr-icon icon="'plus'" feather="true"></pr-icon> add label </span>
|
2020-08-11 23:42:55 +00:00
|
|
|
</div>
|
|
|
|
|
2022-07-17 23:48:24 +00:00
|
|
|
<div class="form-inline py-1" ng-repeat="label in ctrl.formValues.Labels">
|
2020-08-11 23:42:55 +00:00
|
|
|
<div class="input-group col-sm-3 input-group-sm" ng-class="{ striked: label.NeedsDeletion }">
|
|
|
|
<span class="input-group-addon">Key</span>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
name="label_key_{{ $index }}"
|
|
|
|
ng-model="label.Key"
|
|
|
|
ng-change="ctrl.onChangeLabelKey($index)"
|
|
|
|
ng-disabled="ctrl.isSystemLabel($index)"
|
|
|
|
required
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div class="input-group col-sm-3 input-group-sm" ng-class="{ striked: label.NeedsDeletion }">
|
|
|
|
<span class="input-group-addon">Value</span>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
name="label_value_{{ $index }}"
|
|
|
|
ng-change="ctrl.onChangeLabel($index)"
|
|
|
|
ng-model="label.Value"
|
|
|
|
ng-disabled="ctrl.isSystemLabel($index)"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div class="input-group col-sm-1 input-group-sm">
|
2022-01-17 05:53:32 +00:00
|
|
|
<div style="white-space: nowrap">
|
2022-07-17 23:48:24 +00:00
|
|
|
<button
|
|
|
|
ng-if="!ctrl.isSystemLabel($index) && !label.NeedsDeletion"
|
|
|
|
class="btn btn-sm btn-dangerlight btn-only-icon"
|
|
|
|
type="button"
|
|
|
|
ng-click="ctrl.removeLabel($index)"
|
|
|
|
>
|
|
|
|
<pr-icon icon="'x'" feather="true" mode="'error'" size="'sm'"></pr-icon>
|
2020-08-11 23:42:55 +00:00
|
|
|
</button>
|
|
|
|
<button ng-if="!ctrl.isSystemLabel($index) && label.NeedsDeletion" class="btn btn-sm btn-primary" type="button" ng-click="ctrl.restoreLabel($index)">
|
|
|
|
Restore
|
|
|
|
</button>
|
2022-01-17 05:53:32 +00:00
|
|
|
<span class="label label-warning label-sm image-tag" ng-if="label.IsUsed && !ctrl.isSystemLabel($index)" style="margin-left: 5px">used</span>
|
|
|
|
<span class="label label-info image-tag" ng-if="ctrl.isSystemLabel($index)" style="margin-left: 5px">system</span>
|
2020-08-11 23:42:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-07-17 23:48:24 +00:00
|
|
|
<div class="small mt-2" ng-show="kubernetesNodeUpdateForm['label_key_' + $index].$invalid || ctrl.state.duplicateLabelKeys[$index] !== undefined">
|
2020-08-11 23:42:55 +00:00
|
|
|
<ng-messages for="kubernetesNodeUpdateForm['label_key_' + $index].$error">
|
2022-07-17 23:48:24 +00:00
|
|
|
<p ng-message="required" class="vertical-center"> <pr-icon icon="'alert-triangle'" feather="true" mode="'warning'"></pr-icon> Label key is required. </p>
|
2020-08-11 23:42:55 +00:00
|
|
|
</ng-messages>
|
2022-07-17 23:48:24 +00:00
|
|
|
<p ng-if="ctrl.state.duplicateLabelKeys[$index] !== undefined" class="vertical-center">
|
|
|
|
<pr-icon icon="'alert-triangle'" feather="true" mode="'warning'"></pr-icon> This label key is already defined.
|
|
|
|
</p>
|
2020-08-11 23:42:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- #endregion -->
|
|
|
|
|
|
|
|
<!-- #region taints -->
|
|
|
|
|
2022-01-17 05:53:32 +00:00
|
|
|
<div class="col-sm-12 form-section-title" style="margin-top: 20px"> Taints </div>
|
2020-08-11 23:42:55 +00:00
|
|
|
|
2022-01-17 05:53:32 +00:00
|
|
|
<div style="margin-bottom: 10px">
|
2022-07-17 23:48:24 +00:00
|
|
|
<span class="label label-default interactive vertical-center" ng-click="ctrl.addTaint()"> <pr-icon icon="'plus'" feather="true"></pr-icon> add taint </span>
|
2020-08-11 23:42:55 +00:00
|
|
|
</div>
|
|
|
|
|
2022-01-17 05:53:32 +00:00
|
|
|
<div class="form-inline" ng-repeat="taint in ctrl.formValues.Taints" style="padding: 3px 0 3px 0">
|
2020-08-11 23:42:55 +00:00
|
|
|
<div class="input-group col-sm-3 input-group-sm" ng-class="{ striked: taint.NeedsDeletion }">
|
|
|
|
<span class="input-group-addon">Key</span>
|
|
|
|
<input type="text" class="form-control" name="taint_key_{{ $index }}" ng-model="taint.Key" ng-change="ctrl.onChangeTaintKey($index)" required />
|
|
|
|
</div>
|
|
|
|
<div class="input-group col-sm-3 input-group-sm" ng-class="{ striked: taint.NeedsDeletion }">
|
|
|
|
<span class="input-group-addon">Value</span>
|
|
|
|
<input type="text" class="form-control" name="taint_value_{{ $index }}" ng-model="taint.Value" ng-change="ctrl.onChangeTaint($index)" />
|
|
|
|
</div>
|
|
|
|
<div class="input-group col-sm-3 input-group-sm" ng-class="{ striked: taint.NeedsDeletion }">
|
|
|
|
<span class="input-group-addon">Effect</span>
|
|
|
|
<select
|
|
|
|
id="taint_effect_{{ $index }}"
|
|
|
|
name="taint_effect_{{ $index }}"
|
|
|
|
class="form-control"
|
|
|
|
ng-model="taint.Effect"
|
|
|
|
ng-change="ctrl.onChangeTaint($index)"
|
|
|
|
;
|
|
|
|
ng-options="effect as effect for effect in ctrl.availableEffects"
|
|
|
|
></select>
|
|
|
|
</div>
|
|
|
|
<div class="input-group col-sm-1 input-group-sm">
|
|
|
|
<div>
|
2022-07-17 23:48:24 +00:00
|
|
|
<button ng-if="!taint.NeedsDeletion" class="btn btn-sm btn-dangerlight btn-only-icon" type="button" ng-click="ctrl.removeTaint($index)">
|
|
|
|
<pr-icon icon="'x'" feather="true" mode="'error'" size="'sm'"></pr-icon>
|
2020-08-11 23:42:55 +00:00
|
|
|
</button>
|
2022-01-17 05:53:32 +00:00
|
|
|
<button ng-if="taint.NeedsDeletion" class="btn btn-sm btn-primary" type="button" ng-click="ctrl.restoreTaint($index)"> Restore </button>
|
2020-08-11 23:42:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
2022-07-17 23:48:24 +00:00
|
|
|
class="small"
|
2022-01-17 05:53:32 +00:00
|
|
|
style="margin-top: 5px"
|
2020-08-11 23:42:55 +00:00
|
|
|
ng-show="kubernetesNodeUpdateForm['taint_key_' + $index].$invalid || ctrl.state.duplicateTaintKeys[$index] !== undefined"
|
|
|
|
>
|
|
|
|
<ng-messages for="kubernetesNodeUpdateForm['taint_key_' + $index].$error">
|
2022-07-17 23:48:24 +00:00
|
|
|
<p ng-message="required" class="vertical-center"> <pr-icon icon="'alert-triangle'" feather="true" mode="'warning'"></pr-icon> Taint key is required. </p>
|
2020-08-11 23:42:55 +00:00
|
|
|
</ng-messages>
|
2022-07-17 23:48:24 +00:00
|
|
|
<p ng-if="ctrl.state.duplicateTaintKeys[$index] !== undefined">
|
|
|
|
<pr-icon icon="'alert-triangle'" feather="true" mode="'warning'"></pr-icon> This taint key is already defined.
|
|
|
|
</p>
|
2020-08-11 23:42:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- #endregion -->
|
|
|
|
|
|
|
|
<!-- #region actions -->
|
|
|
|
|
2022-01-17 05:53:32 +00:00
|
|
|
<div class="col-sm-12 form-section-title" style="margin-top: 20px"> Actions </div>
|
2020-08-11 23:42:55 +00:00
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<button
|
|
|
|
class="btn btn-primary btn-sm"
|
|
|
|
type="button"
|
2022-01-17 05:53:32 +00:00
|
|
|
style="margin-left: 0"
|
2020-08-11 23:42:55 +00:00
|
|
|
ng-click="ctrl.updateNode()"
|
|
|
|
ng-disabled="kubernetesNodeUpdateForm.$invalid || !ctrl.isFormValid()"
|
|
|
|
>
|
|
|
|
Update node
|
|
|
|
</button>
|
2022-01-17 05:53:32 +00:00
|
|
|
<button class="btn btn-default btn-sm" type="button" ng-click="ctrl.resetFormValues()" ng-disabled="ctrl.isNoChangesMade()"> Cancel </button>
|
2020-08-11 23:42:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- #endregion -->
|
|
|
|
</div>
|
2020-07-05 23:21:03 +00:00
|
|
|
</form>
|
|
|
|
</uib-tab>
|
|
|
|
<uib-tab index="1" classes="btn-sm" select="ctrl.selectTab(1)">
|
|
|
|
<uib-tab-heading>
|
2022-07-17 23:48:24 +00:00
|
|
|
<div class="flex-center gap-1"> <pr-icon icon="'rotate-ccw'" size="'sm'" feather="true"></pr-icon> Events </div>
|
|
|
|
<div class="flex-center gap-1" ng-if="ctrl.hasEventWarnings()">
|
|
|
|
<pr-icon icon="'alert-circle'" mode="'warning-alt'" size="'sm'" feather="true"></pr-icon>
|
2020-07-05 23:21:03 +00:00
|
|
|
{{ ctrl.state.eventWarningCount }} warning(s)
|
|
|
|
</div>
|
|
|
|
</uib-tab-heading>
|
|
|
|
<kubernetes-events-datatable
|
|
|
|
title-text="Events"
|
|
|
|
title-icon="fa-history"
|
|
|
|
dataset="ctrl.events"
|
|
|
|
table-key="kubernetes.node.events"
|
|
|
|
order-by="Date"
|
|
|
|
reverse-order="true"
|
|
|
|
loading="ctrl.state.eventsLoading"
|
|
|
|
refresh-callback="ctrl.getEvents"
|
|
|
|
>
|
|
|
|
</kubernetes-events-datatable>
|
|
|
|
</uib-tab>
|
|
|
|
<uib-tab index="2" ng-if="ctrl.node.Yaml" select="ctrl.showEditor()" classes="btn-sm">
|
2022-07-17 23:48:24 +00:00
|
|
|
<uib-tab-heading class="vertical-center">
|
|
|
|
<div class="flex-center gap-1"> <pr-icon icon="'code'" size="'sm'" feather="true"></pr-icon> YAML </div>
|
|
|
|
</uib-tab-heading>
|
2022-01-17 05:53:32 +00:00
|
|
|
<div style="padding-right: 25px" ng-if="ctrl.state.showEditorTab">
|
2020-07-05 23:21:03 +00:00
|
|
|
<kubernetes-yaml-inspector key="node-yaml" data="ctrl.node.Yaml"> </kubernetes-yaml-inspector>
|
|
|
|
</div>
|
|
|
|
</uib-tab>
|
|
|
|
</uib-tabset>
|
|
|
|
</rd-widget-body>
|
|
|
|
</rd-widget>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row" ng-if="ctrl.applications && ctrl.applications.length > 0">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<kubernetes-node-applications-datatable
|
|
|
|
dataset="ctrl.applications"
|
|
|
|
table-key="kubernetes.node.applications"
|
|
|
|
order-by="Name"
|
|
|
|
refresh-callback="ctrl.getApplications"
|
|
|
|
loading="ctrl.state.applicationsLoading"
|
|
|
|
title-text="Applications running on this node"
|
|
|
|
title-icon="fa-laptop-code"
|
|
|
|
>
|
|
|
|
</kubernetes-node-applications-datatable>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|