mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-19 09:51:29 +00:00
genpolicy: ignore SeccompProfile in PodSpec
Ignore SeccompProfile in PodSpec Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
This commit is contained in:
parent
7aeaf2502a
commit
44afb4aa5f
@ -283,6 +283,19 @@ struct SecurityContext {
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
runAsUser: Option<i64>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
seccompProfile: Option<SeccompProfile>,
|
||||
}
|
||||
|
||||
/// See Reference / Kubernetes API / Workload Resources / Pod.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
struct SeccompProfile {
|
||||
#[serde(rename = "type")]
|
||||
profile_type: String,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
localhostProfile: Option<String>,
|
||||
}
|
||||
|
||||
/// See Reference / Kubernetes API / Workload Resources / Pod.
|
||||
@ -860,6 +873,7 @@ pub async fn add_pause_container(containers: &mut Vec<Container>, config: &Confi
|
||||
privileged: None,
|
||||
capabilities: None,
|
||||
runAsUser: None,
|
||||
seccompProfile: None,
|
||||
}),
|
||||
..Default::default()
|
||||
};
|
||||
|
@ -24,3 +24,6 @@ spec:
|
||||
configMapKeyRef:
|
||||
name: policy-configmap
|
||||
key: data-2
|
||||
securityContext:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
|
Loading…
Reference in New Issue
Block a user