Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/examples/sidecar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Sidecar Example

This example adds an additional container in the rabbitmq pod using the StatefulSet override. You can add multiple additional containers and add additional containers to `initContainers` as well.

You can deploy this example:

```shell
kubectl apply -f rabbitmq.yaml
```
15 changes: 15 additions & 0 deletions docs/examples/sidecar/rabbitmq.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
name: sidecar
spec:
replicas: 1
override:
statefulSet:
spec:
template:
spec:
containers:
- name: additional-container
image: busybox
command: ['sh', '-c', 'echo "Hello, Kubernetes!" && sleep 5000']
5 changes: 5 additions & 0 deletions docs/examples/sidecar/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

kubectl get pod sidecar-server-0 -o jsonpath="{.spec.containers[*].image}" | grep busybox
kubectl get pod sidecar-server-0 | grep 2/2