{% macro container_table(title, containers_list) %}
{{ title }}
Name |
Image |
State |
Ready |
Restart Count |
{% for container in containers_list %}
{{ container.name }} |
{{ container.image }} |
{{ container.status }} |
{{ container.ready }} |
{{ container.restart_count }} |
{% endfor %}
{% endmacro %}
{% extends "base.html.j2" %}
{% block title %}Pod {{ pod.name }}{% endblock %}
{% block content %}
{{ two_level_breadcrumb('Pod', pod.name) | indent(width=4) }}
{{ summary('Pod', pod.name, [
{
'title': 'Init containers',
'failing': ((pod.init_containers | length) - pod.runned_init_containers),
'total': (pod.init_containers | length)
},
{
'title': 'Containers',
'failing': ((pod.containers | length) - pod.running_containers),
'total': (pod.containers | length)
}])
}}
{{ description(pod.k8s) | indent(width=6) }}
{% if (pod.init_containers | length) > 0 %}
{{ container_table("Init Containers", pod.init_containers) | indent(width=6) }}
{% endif %}
{% if (pod.containers | length) > 0 %}
{{ container_table("Containers", pod.containers) | indent(width=8) }}
{% endif %}
{% if pod.k8s.spec.volumes %}
Volumes
Name |
Type |
Properties |
{% for volume_name, volume in pod.volumes.items() %}
{% for volume_type, details in volume.items() %}
{{ volume_name }} |
{{ volume_type }} |
{% for key, value in details.items() %}
{{ key }} |
{{ value }} |
{% endfor %}
|
{% endfor %}
{% endfor %}
{% endif %}
{{ events(pod.events) }}
{% endblock %}