feat(k8s): add Kubernetes deployment resource handling

Introduce new modules to handle Kubernetes resources specifically focusing on Deployment resources. Added `K8sResource` and `K8sDeployment` structs along with necessary traits implementations for interpretation and execution in the inventory system. Also, fixed module reordering issues in opnsense-config-xml and corrected some fields types within its data structures.
This commit is contained in:
2025-01-24 10:44:27 -05:00
parent caec71f06d
commit d6c8650d52
14 changed files with 245 additions and 53 deletions

View File

@@ -1,10 +1,10 @@
mod opnsense;
mod interfaces;
mod caddy;
mod dhcpd;
mod haproxy;
mod caddy;
mod interfaces;
mod opnsense;
pub use caddy::*;
pub use haproxy::*;
pub use opnsense::*;
pub use interfaces::*;
pub use dhcpd::*;
pub use haproxy::*;
pub use interfaces::*;
pub use opnsense::*;

View File

@@ -141,6 +141,7 @@ pub struct Rule {
pub struct Source {
pub any: Option<u8>,
pub network: Option<MaybeString>,
pub address: Option<MaybeString>,
}
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
@@ -164,7 +165,7 @@ pub struct Sysctl {
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
pub struct SysctlItem {
pub descr: String,
pub descr: MaybeString,
pub tunable: String,
pub value: String,
}

View File

@@ -1,4 +1,4 @@
mod xml_utils;
mod data;
mod xml_utils;
pub use data::*;
pub use yaserde::MaybeString;