pub struct SecondaryConfig {
pub replicas: Option<i32>,
pub labels: Option<BTreeMap<String, String>>,
pub service: Option<ServiceConfig>,
pub allow_transfer: Option<Vec<String>>,
pub rndc_secret_ref: Option<RndcSecretRef>,
pub rndc_key: Option<RndcKeyConfig>,
}Expand description
Secondary instance configuration
Groups all configuration specific to secondary (replica) DNS instances.
Fields§
§replicas: Option<i32>Number of secondary instance replicas (default: 1)
This controls how many replicas each secondary instance in this cluster should have. Can be overridden at the instance level.
labels: Option<BTreeMap<String, String>>Additional labels to apply to secondary Bind9Instance resources
These labels are propagated from the cluster/provider to all secondary instances. They are merged with standard labels (app.kubernetes.io/*) and can be used for:
- Instance selection via
DNSZone.spec.bind9InstancesFromlabel selectors - Pod selectors in network policies
- Monitoring and alerting label filters
- Custom organizational taxonomy
Example:
secondary:
labels:
environment: production
tier: backend
region: us-west-2These labels will appear on the Bind9Instance metadata and can be referenced
by DNSZone resources using bind9InstancesFrom.selector.matchLabels.
service: Option<ServiceConfig>Custom Kubernetes Service configuration for secondary instances
Allows full customization of the Kubernetes Service created for secondary DNS servers, including both Service spec fields and metadata annotations.
Annotations are commonly used for:
MetalLBaddress pool selection- Cloud provider load balancer configuration
- External DNS integration
- Linkerd service mesh annotations
Allows different service configurations for primary vs secondary instances.
Example: Primaries use LoadBalancer with specific annotations, secondaries use ClusterIP
See PrimaryConfig.service for detailed field documentation.
allow_transfer: Option<Vec<String>>Allow-transfer ACL for secondary instances
Overrides the default auto-detected Pod CIDR allow-transfer configuration for all secondary instances in this cluster. Use this to restrict or expand which IP addresses can perform zone transfers from secondary servers.
If not specified, defaults to cluster Pod CIDRs (auto-detected from Kubernetes Nodes).
Examples:
["10.0.0.0/8"]- Allow transfers from entire 10.x network["any"]- Allow transfers from any IP (public internet)[]- Deny all zone transfers (empty list means “none”)
Can be overridden at the instance level via spec.config.allowTransfer.
rndc_secret_ref: Option<RndcSecretRef>rndc_key instead. This field will be removed in v1.0.0Reference to an existing Kubernetes Secret containing RNDC key for all secondary instances.
If specified, all secondary instances in this cluster will use this existing Secret instead of auto-generating individual secrets. This allows sharing the same RNDC key across all secondary instances.
Can be overridden at the instance level via spec.rndcSecretRef.
rndc_key: Option<RndcKeyConfig>RNDC key configuration for all secondary instances with lifecycle management.
Supports automatic key rotation, Secret references, and inline Secret specifications. Overrides global RNDC configuration for secondary instances.
Precedence order:
- Instance level (
spec.rndcKey) - Role level (
spec.primary.rndcKeyorspec.secondary.rndcKey) - Global level (cluster-wide RNDC configuration)
- Auto-generated (default)
Can be overridden at the instance level via spec.rndcKey.
Backward compatibility: If both rndc_key and rndc_secret_ref are specified,
rndc_key takes precedence. For smooth migration, rndc_secret_ref will continue
to work but is deprecated.
§Example
secondary:
replicas: 2
rndcKey:
autoRotate: true
rotateAfter: 720h # 30 days
algorithm: hmac-sha256Trait Implementations§
Source§impl Clone for SecondaryConfig
impl Clone for SecondaryConfig
Source§fn clone(&self) -> SecondaryConfig
fn clone(&self) -> SecondaryConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SecondaryConfig
impl Debug for SecondaryConfig
Source§impl Default for SecondaryConfig
impl Default for SecondaryConfig
Source§fn default() -> SecondaryConfig
fn default() -> SecondaryConfig
Source§impl<'de> Deserialize<'de> for SecondaryConfig
impl<'de> Deserialize<'de> for SecondaryConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for SecondaryConfig
impl JsonSchema for SecondaryConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for SecondaryConfig
impl PartialEq for SecondaryConfig
Source§impl Serialize for SecondaryConfig
impl Serialize for SecondaryConfig
impl StructuralPartialEq for SecondaryConfig
Auto Trait Implementations§
impl Freeze for SecondaryConfig
impl RefUnwindSafe for SecondaryConfig
impl Send for SecondaryConfig
impl Sync for SecondaryConfig
impl Unpin for SecondaryConfig
impl UnwindSafe for SecondaryConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].