pub fn build_service_account(
namespace: &str,
_instance: &Bind9Instance,
) -> ServiceAccountExpand 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 theServiceAccountwill be createdinstance- TheBind9Instancethat owns thisServiceAccount
§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()));