Bind9InstanceSpec

Struct Bind9InstanceSpec 

Source
pub struct Bind9InstanceSpec {
Show 13 fields pub cluster_ref: String, pub role: ServerRole, pub replicas: Option<i32>, pub version: Option<String>, pub image: Option<ImageConfig>, pub config_map_refs: Option<ConfigMapRefs>, pub config: Option<Bind9Config>, pub primary_servers: Option<Vec<String>>, pub volumes: Option<Vec<Volume>>, pub volume_mounts: Option<Vec<VolumeMount>>, pub rndc_secret_ref: Option<RndcSecretRef>, pub storage: Option<StorageConfig>, pub bindcar_config: Option<BindcarConfig>,
}
Expand description

Bind9Instance represents a BIND9 DNS server deployment in Kubernetes.

Each Bind9Instance creates a Deployment, Service, ConfigMap, and Secret for managing a BIND9 server. The instance communicates with the controller via RNDC protocol.

§Example

apiVersion: bindy.firestoned.io/v1beta1
kind: Bind9Instance
metadata:
  name: dns-primary
  namespace: dns-system
spec:
  clusterRef: my-dns-cluster
  role: primary
  replicas: 2
  version: "9.18"

Fields§

§cluster_ref: String

Reference to the cluster this instance belongs to.

Can reference either:

  • A namespace-scoped Bind9Cluster (must be in the same namespace as this instance)
  • A cluster-scoped ClusterBind9Provider (cluster-wide, accessible from any namespace)

The cluster provides shared configuration and defines the logical grouping. The controller will automatically detect whether this references a namespace-scoped or cluster-scoped cluster resource.

§role: ServerRole

Role of this instance (primary or secondary).

Primary instances are authoritative for zones. Secondary instances replicate zones from primaries via AXFR/IXFR.

§replicas: Option<i32>

Number of pod replicas for high availability.

Defaults to 1 if not specified. For production, use 2+ replicas.

§version: Option<String>

BIND9 version override. Inherits from cluster if not specified.

Example: “9.18”, “9.16”

§image: Option<ImageConfig>

Container image configuration override. Inherits from cluster if not specified.

§config_map_refs: Option<ConfigMapRefs>

ConfigMap references override. Inherits from cluster if not specified.

§config: Option<Bind9Config>

Instance-specific BIND9 configuration overrides.

Overrides cluster-level configuration for this instance only.

§primary_servers: Option<Vec<String>>

Primary server addresses for zone transfers (required for secondary instances).

List of IP addresses or hostnames of primary servers to transfer zones from. Example: ["10.0.1.10", "primary.example.com"]

§volumes: Option<Vec<Volume>>

Volumes override for this instance. Inherits from cluster if not specified.

These volumes override cluster-level volumes. Common use cases include instance-specific PersistentVolumeClaims for zone data storage.

§volume_mounts: Option<Vec<VolumeMount>>

Volume mounts override for this instance. Inherits from cluster if not specified.

These mounts override cluster-level volume mounts.

§rndc_secret_ref: Option<RndcSecretRef>

Reference to an existing Kubernetes Secret containing RNDC key.

If specified, uses this existing Secret instead of auto-generating one. The Secret must contain the keys specified in the reference (defaults: “key-name”, “algorithm”, “secret”, “rndc.key”). This allows sharing RNDC keys across instances or using externally managed secrets.

If not specified, a Secret will be auto-generated for this instance.

§storage: Option<StorageConfig>

Storage configuration for zone files.

Specifies how zone files should be stored. Defaults to emptyDir (ephemeral storage). For persistent storage, use persistentVolumeClaim.

§bindcar_config: Option<BindcarConfig>

Bindcar RNDC API sidecar container configuration.

The API container provides an HTTP interface for managing zones via rndc. If not specified, uses default configuration.

Trait Implementations§

Source§

impl Clone for Bind9InstanceSpec

Source§

fn clone(&self) -> Bind9InstanceSpec

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Bind9InstanceSpec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Bind9InstanceSpec

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for Bind9InstanceSpec

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl Serialize for Bind9InstanceSpec

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,