mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-22 04:18:53 +00:00
Merge pull request #8862 from microsoft/danmihai1/genpolicy-dns
genpolicy: ignore pod DNS settings
This commit is contained in:
@@ -76,6 +76,12 @@ pub struct PodSpec {
|
|||||||
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub hostNetwork: Option<bool>,
|
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.
|
/// See Reference / Kubernetes API / Workload Resources / Pod.
|
||||||
@@ -439,6 +445,28 @@ struct LocalObjectReference {
|
|||||||
name: String,
|
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 {
|
impl Container {
|
||||||
pub async fn init(&mut self, use_cache: bool) {
|
pub async fn init(&mut self, use_cache: bool) {
|
||||||
// Load container image properties from the registry.
|
// Load container image properties from the registry.
|
||||||
|
Reference in New Issue
Block a user