build_service_account

Function build_service_account 

Source
pub fn build_service_account(
    namespace: &str,
    _instance: &Bind9Instance,
) -> ServiceAccount
Expand description

Builds a Kubernetes ServiceAccount for BIND9 pods.

Creates a ServiceAccount that will be used by BIND9 pods for authentication to the bindcar API sidecar. This enables service-to-service authentication using Kubernetes service account tokens.

§Arguments

  • namespace - The namespace where the ServiceAccount will be created
  • instance - The Bind9Instance that owns this ServiceAccount

§Returns

A ServiceAccount configured for BIND9 pods

§Example

use bindy::bind9_resources::build_service_account;
use bindy::crd::Bind9Instance;

let service_account = build_service_account("dns-system", &instance);
assert_eq!(service_account.metadata.name, Some("bind9".to_string()));