pub struct KubernetesEmitter;Expand description
Emits plain Kubernetes manifests from the export model.
The produced artifact set contains:
namespace.yaml: aNamespaceobject using the name resolved bycrate::resolve::namespace_for.<name>.yamlper enabled resource: a multi-document YAML file containing aDeployment, optionally aService(when ports are declared), aConfigMap(non-secret environment variables), aSecret(secret environment variables, values replaced with***), andPersistentVolumeClaimentries for named volumes.
Resource names are sanitised to DNS-1123 labels before being written.
§Example
use lightshuttle_export::{lower, KubernetesEmitter, Emitter};
use lightshuttle_manifest::Manifest;
let manifest: Manifest = todo!("parse from YAML");
let model = lower(&manifest)?;
let artifacts = KubernetesEmitter.emit(&model)?;
for file in &artifacts.files {
println!("{}", file.path.display());
}
// Prints: namespace.yaml, <resource>.yaml ...Trait Implementations§
Auto Trait Implementations§
impl Freeze for KubernetesEmitter
impl RefUnwindSafe for KubernetesEmitter
impl Send for KubernetesEmitter
impl Sync for KubernetesEmitter
impl Unpin for KubernetesEmitter
impl UnsafeUnpin for KubernetesEmitter
impl UnwindSafe for KubernetesEmitter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more