Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for IDMapping field. #107

Merged
merged 1 commit into from
Jun 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub use windows::*;

/// Base configuration for the container.
#[derive(Builder, Clone, Debug, Deserialize, Getters, Setters, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
#[builder(
default,
pattern = "owned",
Expand Down Expand Up @@ -130,6 +131,16 @@ pub struct Spec {
#[serde(default, skip_serializing_if = "Option::is_none")]
/// VM specifies configuration for Virtual Machine based containers.
vm: Option<VM>,

#[serde(default, skip_serializing_if = "Option::is_none")]
/// UID mappings used for changing file owners w/o calling chown, fs should support it.
/// Every mount point could have its own mapping.
uid_mappings: Option<Vec<LinuxIdMapping>>,

#[serde(default, skip_serializing_if = "Option::is_none")]
/// GID mappings used for changing file owners w/o calling chown, fs should support it.
/// Every mount point could have its own mapping.
gid_mappings: Option<Vec<LinuxIdMapping>>,
}

// This gives a basic boilerplate for Spec that can be used calling
Expand All @@ -153,6 +164,8 @@ impl Default for Spec {
solaris: None,
windows: None,
vm: None,
uid_mappings: None,
gid_mappings: None,
}
}
}
Expand Down