mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-31 07:19:06 +00:00
genpolicy: add default implementation for use_host_network
- Provide default implementation for use_host_network - Remove default implementation from structs implementing the trait K8sResource Fixes: #8960 Signed-off-by: Archana Choudhary <archana1@microsoft.com>
This commit is contained in:
parent
9a3eac5306
commit
d5d3f9cda7
@ -99,10 +99,6 @@ impl yaml::K8sResource for ConfigMap {
|
||||
&self.metadata.annotations
|
||||
}
|
||||
|
||||
fn use_host_network(&self) -> bool {
|
||||
panic!("Unsupported");
|
||||
}
|
||||
|
||||
fn use_sandbox_pidns(&self) -> bool {
|
||||
panic!("Unsupported");
|
||||
}
|
||||
|
@ -81,10 +81,6 @@ impl yaml::K8sResource for List {
|
||||
serde_yaml::to_string(&self).unwrap()
|
||||
}
|
||||
|
||||
fn use_host_network(&self) -> bool {
|
||||
panic!("Unsupported");
|
||||
}
|
||||
|
||||
fn use_sandbox_pidns(&self) -> bool {
|
||||
panic!("Unsupported");
|
||||
}
|
||||
|
@ -35,10 +35,6 @@ impl yaml::K8sResource for NoPolicyResource {
|
||||
self.yaml.clone()
|
||||
}
|
||||
|
||||
fn use_host_network(&self) -> bool {
|
||||
panic!("Unsupported");
|
||||
}
|
||||
|
||||
fn use_sandbox_pidns(&self) -> bool {
|
||||
panic!("Unsupported");
|
||||
}
|
||||
|
@ -84,10 +84,6 @@ impl yaml::K8sResource for Secret {
|
||||
serde_yaml::to_string(&self.doc_mapping).unwrap()
|
||||
}
|
||||
|
||||
fn use_host_network(&self) -> bool {
|
||||
panic!("Unsupported");
|
||||
}
|
||||
|
||||
fn use_sandbox_pidns(&self) -> bool {
|
||||
panic!("Unsupported");
|
||||
}
|
||||
|
@ -78,7 +78,10 @@ pub trait K8sResource {
|
||||
panic!("Unsupported");
|
||||
}
|
||||
|
||||
fn use_host_network(&self) -> bool;
|
||||
fn use_host_network(&self) -> bool {
|
||||
panic!("Unsupported");
|
||||
}
|
||||
|
||||
fn use_sandbox_pidns(&self) -> bool;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user