mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 14:32:33 +00:00
Merge pull request #8862 from microsoft/danmihai1/genpolicy-dns
genpolicy: ignore pod DNS settings
This commit is contained in:
commit
1e30fde8fa
@ -76,6 +76,12 @@ pub struct PodSpec {
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub hostNetwork: Option<bool>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
dnsConfig: Option<PodDNSConfig>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
dnsPolicy: Option<String>,
|
||||
}
|
||||
|
||||
/// See Reference / Kubernetes API / Workload Resources / Pod.
|
||||
@ -439,6 +445,28 @@ struct LocalObjectReference {
|
||||
name: String,
|
||||
}
|
||||
|
||||
/// See Reference / Kubernetes API / Workload Resources / Pod.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
struct PodDNSConfig {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
nameservers: Option<Vec<String>>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
options: Option<Vec<PodDNSConfigOption>>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
searches: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
/// See Reference / Kubernetes API / Workload Resources / Pod.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
struct PodDNSConfigOption {
|
||||
name: String,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
value: Option<String>,
|
||||
}
|
||||
|
||||
impl Container {
|
||||
pub async fn init(&mut self, use_cache: bool) {
|
||||
// Load container image properties from the registry.
|
||||
|
Loading…
Reference in New Issue
Block a user