-
Notifications
You must be signed in to change notification settings - Fork 0
/
container_status.cr
65 lines (54 loc) · 3.32 KB
/
container_status.cr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# ContainerStatus contains details for the current status of this container.
@[::K8S::Properties(
container_id: {type: String, nilable: true, key: "containerID", getter: false, setter: false},
image: {type: String, nilable: false, key: "image", getter: false, setter: false},
image_id: {type: String, nilable: false, key: "imageID", getter: false, setter: false},
last_state: {type: Api::Core::V1::ContainerState, nilable: true, key: "lastState", getter: false, setter: false},
name: {type: String, nilable: false, key: "name", getter: false, setter: false},
ready: {type: Bool, nilable: false, key: "ready", getter: false, setter: false},
restart_count: {type: Int32, nilable: false, key: "restartCount", getter: false, setter: false},
state: {type: Api::Core::V1::ContainerState, nilable: true, key: "state", getter: false, setter: false},
)]
class Api::Core::V1::ContainerStatus
include ::JSON::Serializable
include ::YAML::Serializable
# Container's ID in the format 'docker://<container_id>'.
@[::JSON::Field(key: "containerID", emit_null: false)]
@[::YAML::Field(key: "containerID", emit_null: false)]
property container_id : String | Nil
# The image the container is running. More info: [https://kubernetes.io/docs/concepts/containers/images](https://kubernetes.io/docs/concepts/containers/images)
@[::JSON::Field(key: "image", emit_null: true)]
@[::YAML::Field(key: "image", emit_null: true)]
property image : String
# ImageID of the container's image.
@[::JSON::Field(key: "imageID", emit_null: true)]
@[::YAML::Field(key: "imageID", emit_null: true)]
property image_id : String
# Details about the container's last termination condition.
@[::JSON::Field(key: "lastState", emit_null: false)]
@[::YAML::Field(key: "lastState", emit_null: false)]
property last_state : Api::Core::V1::ContainerState | Nil
# This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.
@[::JSON::Field(key: "name", emit_null: true)]
@[::YAML::Field(key: "name", emit_null: true)]
property name : String
# Specifies whether the container has passed its readiness probe.
@[::JSON::Field(key: "ready", emit_null: true)]
@[::YAML::Field(key: "ready", emit_null: true)]
property ready : Bool
# The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.
@[::JSON::Field(key: "restartCount", emit_null: true)]
@[::YAML::Field(key: "restartCount", emit_null: true)]
property restart_count : Int32
# Details about the container's current condition.
@[::JSON::Field(key: "state", emit_null: false)]
@[::YAML::Field(key: "state", emit_null: false)]
property state : Api::Core::V1::ContainerState | Nil
def initialize(*, @image : String, @image_id : String, @name : String, @ready : Bool, @restart_count : Int32, @container_id : String | Nil = nil, @last_state : Api::Core::V1::ContainerState | Nil = nil, @state : Api::Core::V1::ContainerState | Nil = nil)
end
end
end