policy: support optional metadata uid field

This prevents a deserialization error when uid is specified

Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
This commit is contained in:
Saul Paredes
2024-12-02 11:03:34 -08:00
parent 6f4f94a9f0
commit 711d12e5db
2 changed files with 4 additions and 0 deletions

View File

@@ -26,6 +26,9 @@ pub struct ObjectMeta {
#[serde(skip_serializing_if = "Option::is_none")]
pub namespace: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub uid: Option<String>,
}
impl ObjectMeta {

View File

@@ -7,6 +7,7 @@ apiVersion: v1
kind: Pod
metadata:
name: policy-pod
uid: policy-pod-uid
spec:
terminationGracePeriodSeconds: 0
runtimeClassName: kata