Rust structs representing Kubernetes Volume resources with serde support.
// Source: https://github.com/kata-containers/kata-containers | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright (c) 2023 Microsoft Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
// Allow K8s YAML field names.
#![allow(non_snake_case)]
use crate::pod;
use serde::{Deserialize, Serialize};
/// See Reference / Kubernetes API / Config and Storage Resources / Volume.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Volume {
pub name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub emptyDir: Option<EmptyDirVolumeSource>,
#[serde(skip_serializing_if = "Option::is_none")]
pub hostPath: Option<HostPathVolumeSource>,
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key