feat: Add Kubernetes examples and update dependencies

- Add Kubernetes examples demonstrating deployment of various
  applications (PostgreSQL, Redis, generic). This improves the
  documentation and provides practical usage examples.
- Add `tokio` dependency for async examples. This enables the use
  of asynchronous operations in the examples.
- Add `once_cell` dependency for improved resource management in
  Kubernetes module. This allows efficient management of
  singletons and other resources.
This commit is contained in:
Mahmoud-Emad
2025-07-10 00:40:11 +03:00
parent 99e121b0d8
commit 6b12001ca2
29 changed files with 1951 additions and 482 deletions

View File

@@ -88,7 +88,8 @@ urlencoding = "2.1.3"
tokio-test = "0.4.4"
[dependencies]
thiserror = "2.0.12" # For error handling in the main Error enum
thiserror = "2.0.12" # For error handling in the main Error enum
tokio = { workspace = true } # For async examples
# Optional dependencies - users can choose which modules to include
sal-git = { path = "git", optional = true }
@@ -146,3 +147,19 @@ all = [
"rhai",
"service_manager",
]
# Examples
[[example]]
name = "postgres_cluster"
path = "examples/kubernetes/clusters/postgres.rs"
required-features = ["kubernetes"]
[[example]]
name = "redis_cluster"
path = "examples/kubernetes/clusters/redis.rs"
required-features = ["kubernetes"]
[[example]]
name = "generic_cluster"
path = "examples/kubernetes/clusters/generic.rs"
required-features = ["kubernetes"]