chore(work): spinup rabbitmq cluster

This commit is contained in:
David Landry 2024-09-12 14:35:28 -04:00
parent 77592b71bd
commit 807798946f
5 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: work-rabbitmq-cluster
resources:
- ./rabbitmq.yaml
- ./pod-disruption-budget.yaml

View file

@ -0,0 +1,9 @@
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: rabbitmq-main
spec:
maxUnavailable: 1
selector:
matchLabels:
app.kubernetes.io/name: rabbitmq-main

View file

@ -0,0 +1,44 @@
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
name: rabbitmq-main
spec:
replicas: 1 # We'll want to bump this up to 3 if we're using this for customer-facing production loads
resources:
requests:
cpu: 1000m # This should be at least 2000m for customer-facing production loads; example had it as 4000m
memory: 2Gi # Not sure what we need here; example had it as 10Gi
limits:
cpu: 1000m
memory: 2Gi
rabbitmq:
additionalConfig: |
cluster_partition_handling = pause_minority
disk_free_limit.relative = 1.0
collect_statistics_interval = 10000
persistence:
storageClassName: gp2
storage: "8Gi"
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- rabbitmq-main
topologyKey: kubernetes.io/hostname
override:
statefulSet:
spec:
template:
spec:
containers: []
topologySpreadConstraints:
- maxSkew: 1
topologyKey: "topology.kubernetes.io/zone"
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: rabbitmq-main

View file

@ -0,0 +1,11 @@
{
"appName": "rabbitmq-cluster",
"userGivenName": "rabbitmq-cluster",
"destNamespace": "work-rabbitmq-clusters",
"destServer": "https://kubernetes.default.svc",
"srcPath": "apps/rabbitmq-cluster/overlays/work",
"srcRepoURL": "ssh://git@gitea-ssh.gitops.svc.cluster.local:2222/davad/argo.git",
"srcTargetRevision": "",
"labels": null,
"annotations": null
}

View file

@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base