bindy/reconcilers/dnszone/
types.rs

1// Copyright (c) 2025 Erick Bourgeois, firestoned
2// SPDX-License-Identifier: MIT
3
4//! Types used in DNS zone reconciliation.
5
6/// Information about a duplicate zone conflict.
7#[derive(Debug, Clone)]
8pub struct DuplicateZoneInfo {
9    /// The zone name that has a conflict
10    pub zone_name: String,
11    /// List of conflicting zones that already claim this zone name
12    pub conflicting_zones: Vec<ConflictingZone>,
13}
14
15/// Information about a zone that conflicts with the current zone.
16#[derive(Debug, Clone)]
17pub struct ConflictingZone {
18    /// Name of the conflicting DNSZone resource
19    pub name: String,
20    /// Namespace of the conflicting DNSZone resource
21    pub namespace: String,
22    /// Instance names where this zone is configured
23    pub instance_names: Vec<String>,
24}
25
26/// Information about a BIND9 pod discovered during reconciliation.
27#[derive(Debug, Clone)]
28pub struct PodInfo {
29    /// Pod name
30    pub name: String,
31    /// Pod IP address
32    pub ip: String,
33    /// Name of the Bind9Instance this pod belongs to
34    pub instance_name: String,
35    /// Namespace of the pod
36    pub namespace: String,
37}
38
39/// Endpoint address (IP + port) for connecting to BIND9 API.
40#[derive(Debug, Clone)]
41pub struct EndpointAddress {
42    /// IP address of the pod
43    pub ip: String,
44    /// Container port number
45    pub port: i32,
46}