Deployment templates (or deployment strategies) describe various SLIM deployment patterns to support the most frequent usage scenarios.
These strategies primarily describe the deployment of SLIM from the operations point of view, that is, they focus on the SLIM infrastructure and topology.
The following deployment strategies are described:
- Naive Deployment Strategy
- Statefulset Deployment Strategy
- Daemonset Deployment Strategy
- Multi-cluster Deployment Strategy
- Multi-cluster Private Kind Strategy — cluster-a exposes SLIM and SPIRE through ingress; cluster-b is private (no public slim/spire endpoints), downstream SPIRE joins cluster-a
For each identified deployment strategy we provide the following:
- The description of the strategy, target audience and sample use cases
- A set of values files for the different components
- A set of tasks to execute the deployment
- Example client resources to demonstrate and test the strategy
To mimic the real life deployments of SLIM, deployment strategies are executed in Kubernetes clusters using the publicly available SLIM Helm charts.
The following prerequisites must be met to execute the strategy examples locally via the provided taskfile:
- Task available
- Docker engine available locally (Docker Desktop or Rancher Desktop)
- Kind available on the local environment
- Access to public image repositories
Example workloads under client_apps/ use the slim-bindings Python examples (e.g. slim-bindings-p2p, slim-bindings-group). Their manifests set a container image such as agntcy/slim/bindings-examples:….
The local image is built from client_apps/Dockerfile, which installs the slim-bindings[examples] package from PyPI (version pinned via ARG SLIM_BINDINGS_VERSION). To use a different bindings release, edit that ARG in the Dockerfile, then remove the existing image (e.g. docker rmi agntcy/slim/bindings-examples:latest) so the next build is not skipped when using task apps:bindings-examples:prepare (that task skips the build step while docker image inspect still succeeds).
From any strategy directory that includes client_apps/Taskfile.yaml, run:
task apps:bindings-examples:prepareThis builds agntcy/slim/bindings-examples:latest from client_apps/Dockerfile only if that image is not already present in the local Docker engine, then runs kind load docker-image for each cluster in KIND_CLUSTER_NAMES (default: slim-cluster). Override with:
task apps:bindings-examples:prepare KIND_CLUSTER_NAMES=cluster-a,cluster-b
Strategy tasks test.sender:deploy and test.receiver:deploy depend on apps:bindings-examples:prepare (single-cluster: default cluster name; multicluster: all three Kind clusters). Kind clusters must exist before running deploy.