8
// InspectPodData contains detailed information on a pod's configuration and
9
// state. It is used as the output of Inspect on pods.
10
type InspectPodData struct {
11
// ID is the ID of the pod.
13
// Name is the name of the pod.
15
// Namespace is the Libpod namespace the pod is placed in.
16
Namespace string `json:"Namespace,omitempty"`
17
// Created is the time when the pod was created.
19
// CreateCommand is the full command plus arguments of the process the
20
// container has been created with.
21
CreateCommand []string `json:"CreateCommand,omitempty"`
22
// ExitPolicy of the pod.
23
ExitPolicy string `json:"ExitPolicy,omitempty"`
24
// State represents the current state of the pod.
25
State string `json:"State"`
26
// Hostname is the hostname that the pod will set.
28
// Labels is a set of key-value labels that have been applied to the
30
Labels map[string]string `json:"Labels,omitempty"`
31
// CreateCgroup is whether this pod will create its own Cgroup to group
34
// CgroupParent is the parent of the pod's Cgroup.
35
CgroupParent string `json:"CgroupParent,omitempty"`
36
// CgroupPath is the path to the pod's Cgroup.
37
CgroupPath string `json:"CgroupPath,omitempty"`
38
// CreateInfra is whether this pod will create an infra container to
41
// InfraContainerID is the ID of the pod's infra container, if one is
43
InfraContainerID string `json:"InfraContainerID,omitempty"`
44
// InfraConfig is the configuration of the infra container of the pod.
45
// Will only be set if CreateInfra is true.
46
InfraConfig *InspectPodInfraConfig `json:"InfraConfig,omitempty"`
47
// SharedNamespaces contains a list of namespaces that will be shared by
48
// containers within the pod. Can only be set if CreateInfra is true.
49
SharedNamespaces []string `json:"SharedNamespaces,omitempty"`
50
// NumContainers is the number of containers in the pod, including the
53
// Containers gives a brief summary of all containers in the pod and
54
// their current status.
55
Containers []InspectPodContainerInfo `json:"Containers,omitempty"`
56
// CPUPeriod contains the CPU period of the pod
57
CPUPeriod uint64 `json:"cpu_period,omitempty"`
58
// CPUQuota contains the CPU quota of the pod
59
CPUQuota int64 `json:"cpu_quota,omitempty"`
60
// CPUShares contains the cpu shares for the pod
61
CPUShares uint64 `json:"cpu_shares,omitempty"`
62
// CPUSetCPUs contains linux specific CPU data for the pod
63
CPUSetCPUs string `json:"cpuset_cpus,omitempty"`
64
// CPUSetMems contains linux specific CPU data for the pod
65
CPUSetMems string `json:"cpuset_mems,omitempty"`
66
// Mounts contains volume related information for the pod
67
Mounts []InspectMount `json:"mounts,omitempty"`
68
// Devices contains the specified host devices
69
Devices []InspectDevice `json:"devices,omitempty"`
70
// BlkioDeviceReadBps contains the Read/Access limit for the pod's devices
71
BlkioDeviceReadBps []InspectBlkioThrottleDevice `json:"device_read_bps,omitempty"`
72
// BlkioDeviceReadBps contains the Read/Access limit for the pod's devices
73
BlkioDeviceWriteBps []InspectBlkioThrottleDevice `json:"device_write_bps,omitempty"`
74
// VolumesFrom contains the containers that the pod inherits mounts from
75
VolumesFrom []string `json:"volumes_from,omitempty"`
76
// SecurityOpt contains the specified security labels and related SELinux information
77
SecurityOpts []string `json:"security_opt,omitempty"`
78
// MemoryLimit contains the specified cgroup memory limit for the pod
79
MemoryLimit uint64 `json:"memory_limit,omitempty"`
80
// MemorySwap contains the specified memory swap limit for the pod
81
MemorySwap uint64 `json:"memory_swap,omitempty"`
82
// BlkioWeight contains the blkio weight limit for the pod
83
BlkioWeight uint64 `json:"blkio_weight,omitempty"`
84
// BlkioWeightDevice contains the blkio weight device limits for the pod
85
BlkioWeightDevice []InspectBlkioWeightDevice `json:"blkio_weight_device,omitempty"`
86
// RestartPolicy of the pod.
87
RestartPolicy string `json:"RestartPolicy,omitempty"`
88
// Number of the pod's Libpod lock.
92
// InspectPodInfraConfig contains the configuration of the pod's infra
94
type InspectPodInfraConfig struct {
95
// PortBindings are ports that will be forwarded to the infra container
96
// and then shared with the pod.
97
PortBindings map[string][]InspectHostPort
98
// HostNetwork is whether the infra container (and thus the whole pod)
99
// will use the host's network and not create a network namespace.
101
// StaticIP is a static IPv4 that will be assigned to the infra
102
// container and then used by the pod.
103
// swagger:strfmt ipv4
105
// StaticMAC is a static MAC address that will be assigned to the infra
106
// container and then used by the pod.
108
// NoManageResolvConf indicates that the pod will not manage resolv.conf
109
// and instead each container will handle their own.
110
NoManageResolvConf bool
111
// DNSServer is a set of DNS Servers that will be used by the infra
112
// container's resolv.conf and shared with the remainder of the pod.
114
// DNSSearch is a set of DNS search domains that will be used by the
115
// infra container's resolv.conf and shared with the remainder of the
118
// DNSOption is a set of DNS options that will be used by the infra
119
// container's resolv.conf and shared with the remainder of the pod.
121
// NoManageHosts indicates that the pod will not manage /etc/hosts and
122
// instead each container will handle their own.
124
// HostAdd adds a number of hosts to the infra container's resolv.conf
125
// which will be shared with the rest of the pod.
127
// Networks is a list of networks the pod will join.
129
// NetworkOptions are additional options for each network
130
NetworkOptions map[string][]string
131
// CPUPeriod contains the CPU period of the pod
132
CPUPeriod uint64 `json:"cpu_period,omitempty"`
133
// CPUQuota contains the CPU quota of the pod
134
CPUQuota int64 `json:"cpu_quota,omitempty"`
135
// CPUSetCPUs contains linux specific CPU data for the container
136
CPUSetCPUs string `json:"cpuset_cpus,omitempty"`
137
// Pid is the PID namespace mode of the pod's infra container
138
PidNS string `json:"pid_ns,omitempty"`
139
// UserNS is the usernamespace that all the containers in the pod will join.
140
UserNS string `json:"userns,omitempty"`
141
// UtsNS is the uts namespace that all containers in the pod will join
142
UtsNS string `json:"uts_ns,omitempty"`
145
// InspectPodContainerInfo contains information on a container in a pod.
146
type InspectPodContainerInfo struct {
147
// ID is the ID of the container.
148
ID string `json:"Id"`
149
// Name is the name of the container.
151
// State is the current status of the container.