Skip to content

Commit

Permalink
Merge pull request #260 from microsoft/saulparedes/ignore_metadata_uid
Browse files Browse the repository at this point in the history
policy: ignore optional metadata uid field
  • Loading branch information
Redent0r authored Dec 4, 2024
2 parents cc96a4a + 8cb5160 commit c180917
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/agent/samples/policy/yaml/pod/pod-one-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: Pod
metadata:
name: one-container
uid: one-container-uid
labels:
run: busybox
annotations:
Expand Down
3 changes: 3 additions & 0 deletions src/tools/genpolicy/src/obj_meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c180917

Please sign in to comment.