pub struct RndcKeyConfig {
pub auto_rotate: bool,
pub rotate_after: String,
pub secret_ref: Option<RndcSecretRef>,
pub secret: Option<SecretSpec>,
pub algorithm: RndcAlgorithm,
}Expand description
RNDC key lifecycle configuration with automatic rotation support.
Provides three configuration modes:
- Auto-generated with optional rotation (default) - Operator creates and manages keys
- Reference to existing Secret - Use pre-existing Kubernetes Secret (no rotation)
- Inline Secret specification - Define Secret inline with optional rotation
When auto_rotate is enabled, the operator automatically rotates keys after the
rotate_after duration has elapsed. Rotation timestamps are tracked in Secret annotations.
§Examples
# Auto-generated with 30-day rotation
rndcKeys:
autoRotate: true
rotateAfter: 720h
algorithm: hmac-sha256
# Reference existing Secret (no rotation)
rndcKeys:
secretRef:
name: my-rndc-key
algorithm: hmac-sha256
# Inline Secret with rotation
rndcKeys:
autoRotate: true
rotateAfter: 2160h # 90 days
secret:
metadata:
name: custom-rndc-key
labels:
app: bindyFields§
§auto_rotate: boolEnable automatic key rotation (default: false for backward compatibility).
When true, the operator automatically rotates the RNDC key after the
rotate_after interval. When false, keys are generated once and never rotated.
Important: Rotation only applies to operator-managed Secrets. If you
specify secret_ref, that Secret will NOT be rotated automatically.
Default: false
rotate_after: StringDuration after which to rotate the key (Go duration format: “720h”, “30d”).
Supported units:
h(hours): “720h” = 30 daysd(days): “30d” = 30 daysw(weeks): “4w” = 28 days
Constraints:
- Minimum: 1h (1 hour)
- Maximum: 8760h (365 days / 1 year)
Only applies when auto_rotate is true.
Default: "720h" (30 days)
secret_ref: Option<RndcSecretRef>Reference to an existing Kubernetes Secret containing RNDC credentials.
When specified, the operator uses this existing Secret instead of auto-generating
one. The Secret must contain the rndc.key field with BIND9 key file content.
Mutually exclusive with secret - if both are specified, secret_ref takes
precedence and secret is ignored.
Rotation note: User-managed Secrets (via secret_ref) are NOT automatically
rotated even if auto_rotate is true. You must rotate these manually.
Default: None (auto-generate key)
secret: Option<SecretSpec>Inline Secret specification for operator-managed Secret with optional rotation.
Embeds a full Kubernetes Secret specification. The operator will create and
manage this Secret, and rotate it if auto_rotate is true.
Mutually exclusive with secret_ref - if both are specified, secret_ref
takes precedence and this field is ignored.
Default: None (auto-generate key)
algorithm: RndcAlgorithmHMAC algorithm for the RNDC key.
Only used when auto-generating keys (when neither secret_ref nor secret are
specified). If using secret_ref, the algorithm is specified in that reference.
Default: hmac-sha256
Trait Implementations§
Source§impl Clone for RndcKeyConfig
impl Clone for RndcKeyConfig
Source§fn clone(&self) -> RndcKeyConfig
fn clone(&self) -> RndcKeyConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RndcKeyConfig
impl Debug for RndcKeyConfig
Source§impl Default for RndcKeyConfig
impl Default for RndcKeyConfig
Source§fn default() -> RndcKeyConfig
fn default() -> RndcKeyConfig
Source§impl<'de> Deserialize<'de> for RndcKeyConfig
impl<'de> Deserialize<'de> for RndcKeyConfig
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 RndcKeyConfig
impl JsonSchema for RndcKeyConfig
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 RndcKeyConfig
impl PartialEq for RndcKeyConfig
Source§impl Serialize for RndcKeyConfig
impl Serialize for RndcKeyConfig
impl StructuralPartialEq for RndcKeyConfig
Auto Trait Implementations§
impl Freeze for RndcKeyConfig
impl RefUnwindSafe for RndcKeyConfig
impl Send for RndcKeyConfig
impl Sync for RndcKeyConfig
impl Unpin for RndcKeyConfig
impl UnwindSafe for RndcKeyConfig
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].