-
Notifications
You must be signed in to change notification settings - Fork 0
/
endpoint_subset.cr
44 lines (38 loc) · 2.34 KB
/
endpoint_subset.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
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:
# {
# Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
# Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
# }
# The resulting set of endpoints can be viewed as:
# a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
# b: [ 10.10.1.1:309, 10.10.2.2:309 ]
@[::K8S::Properties(
addresses: {type: Array(Api::Core::V1::EndpointAddress), nilable: true, key: "addresses", getter: false, setter: false},
not_ready_addresses: {type: Array(Api::Core::V1::EndpointAddress), nilable: true, key: "notReadyAddresses", getter: false, setter: false},
ports: {type: Array(Api::Core::V1::EndpointPort), nilable: true, key: "ports", getter: false, setter: false},
)]
class Api::Core::V1::EndpointSubset
include ::JSON::Serializable
include ::JSON::Serializable::Unmapped
include ::YAML::Serializable
include ::YAML::Serializable::Unmapped
# IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.
@[::JSON::Field(key: "addresses", emit_null: false)]
@[::YAML::Field(key: "addresses", emit_null: false)]
property addresses : Array(Api::Core::V1::EndpointAddress) | Nil
# IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.
@[::JSON::Field(key: "notReadyAddresses", emit_null: false)]
@[::YAML::Field(key: "notReadyAddresses", emit_null: false)]
property not_ready_addresses : Array(Api::Core::V1::EndpointAddress) | Nil
# Port numbers available on the related IP addresses.
@[::JSON::Field(key: "ports", emit_null: false)]
@[::YAML::Field(key: "ports", emit_null: false)]
property ports : Array(Api::Core::V1::EndpointPort) | Nil
def initialize(*, @addresses : Array(Api::Core::V1::EndpointAddress) | Nil = nil, @not_ready_addresses : Array(Api::Core::V1::EndpointAddress) | Nil = nil, @ports : Array(Api::Core::V1::EndpointPort) | Nil = nil)
end
end
end