build_labels

Function build_labels 

Source
pub fn build_labels(instance_name: &str) -> BTreeMap<String, String>
Expand description

Builds standardized Kubernetes labels for BIND9 instance resources.

Creates labels for resources managed by Bind9Instance controller. Use build_cluster_labels() for resources managed by Bind9Cluster.

§Arguments

  • instance_name - Name of the Bind9Instance resource

§Returns

A BTreeMap of label key-value pairs

§Example

use bindy::bind9_resources::build_labels;

let labels = build_labels("my-dns-server");
assert_eq!(labels.get("app").unwrap(), "bind9");
assert_eq!(labels.get("instance").unwrap(), "my-dns-server");