-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- related to issue #143
- Loading branch information
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Additional PersistentVolumeClaim Example | ||
|
||
You can leverage StatefulSet override (`spec.Override.StatefulSet`) to modify any property of the statefulSet deployed as part of a RabbitmqCluster instance. `spec.Override.StatefulSet` is in the format of appsv1.StatefulSetSpec. When provided, it will be applied as a patch to the RabbitmqCluster instance StatefulSet definition, using kubernetes [Strategic Merge Patch](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md). | ||
|
||
The example creates two PersistentVolumeClaim and mounts the additional PersistentVolumeClaim to the `rabbitmq` container. | ||
|
||
|
||
```shell | ||
kubectl apply -f rabbitmq.yaml | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: rabbitmq.com/v1beta1 | ||
kind: RabbitmqCluster | ||
metadata: | ||
name: sample | ||
spec: | ||
replicas: 1 | ||
override: | ||
statefulSet: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: rabbitmq | ||
volumeMounts: | ||
- name: additional-disk | ||
mountPath: /var/lib/log | ||
volumeClaimTemplates: | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: persistence | ||
namespace: rabbitmq-system | ||
labels: | ||
"app.kubernetes.io/name": "sample" | ||
spec: | ||
storageClassName: standard | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 3Gi | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: persistence-foo | ||
namespace: rabbitmq-system | ||
labels: | ||
"app.kubernetes.io/name": "sample" | ||
spec: | ||
storageClassName: standard | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 1Gi |