container_device_interface/internal/validation/validate.rs
1use crate::internal::validation::k8s::objectmeta as k8s;
2use anyhow::Result;
3use std::collections::BTreeMap;
4
5pub fn validate_spec_annotations(name: &str, annotations: &BTreeMap<String, String>) -> Result<()> {
6 let path = if !name.is_empty() {
7 format!("{}.annotations", name)
8 } else {
9 "annotations".to_string()
10 };
11
12 k8s::validate_annotations(annotations, &path)
13}