[management] Add support for tcp/udp allocations (#3381)

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
Bethuel Mmbaga 2025-02-25 10:11:50 +00:00 committed by GitHub
parent 4ebf1410c6
commit 62b978c050
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 5 deletions

View File

@ -1649,9 +1649,7 @@ components:
type: string
example: 192.34.0.123
available_ports:
description: Number of available ports left on the ingress peer
type: integer
example: 45765
$ref: '#/components/schemas/AvailablePorts'
enabled:
description: Indicates if an ingress peer is enabled
type: boolean
@ -1677,6 +1675,21 @@ components:
- connected
- fallback
- region
AvailablePorts:
type: object
properties:
tcp:
description: Number of available TCP ports left on the ingress peer
type: integer
example: 45765
udp:
description: Number of available UDP ports left on the ingress peer
type: integer
example: 50000
required:
- tcp
- udp
IngressPortAllocationRequest:
type: object
properties:

View File

@ -274,6 +274,15 @@ type AccountSettings struct {
RoutingPeerDnsResolutionEnabled *bool `json:"routing_peer_dns_resolution_enabled,omitempty"`
}
// AvailablePorts defines model for AvailablePorts.
type AvailablePorts struct {
// Tcp Number of available TCP ports left on the ingress peer
Tcp int `json:"tcp"`
// Udp Number of available UDP ports left on the ingress peer
Udp int `json:"udp"`
}
// Checks List of objects that perform the actual checks
type Checks struct {
// GeoLocationCheck Posture check for geo location
@ -449,8 +458,7 @@ type GroupRequest struct {
// IngressPeer defines model for IngressPeer.
type IngressPeer struct {
// AvailablePorts Number of available ports left on the ingress peer
AvailablePorts int `json:"available_ports"`
AvailablePorts AvailablePorts `json:"available_ports"`
// Connected Indicates if an ingress peer is connected to the management server
Connected bool `json:"connected"`