Add Kubernetes manifests to deploy rbcs and kaya-rbcs in the rbcs namespace
- memcached (1Gi) shared by both cache servers via a single service - rbcs (java) and kaya-rbcs deployments with identical resource limits (1 cpu / 512Mi) - strict network policies whitelisting only the required communications - manually-triggered benchmark jobs running 'client benchmark -s 256 -e 10000' against the rbcs and rbcs-kaya services
This commit is contained in:
@@ -0,0 +1,130 @@
|
||||
# Manually-triggered benchmark jobs comparing rbcs (java) vs rbcs-kaya (kaya-rbcs).
|
||||
# Create them with:
|
||||
# kubectl create -f k8s/benchmark-jobs.yaml
|
||||
# (or `kubectl apply` — they only run when created, not on updates).
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: rbcs-client-config
|
||||
namespace: rbcs
|
||||
data:
|
||||
rbcs-client.xml: |
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<profiles xmlns="urn:net.woggioni.rbcs.client">
|
||||
<profile name="rbcs"
|
||||
base-url="http://rbcs:8080/"
|
||||
max-connections="50"
|
||||
enable-compression="false">
|
||||
<no-auth/>
|
||||
</profile>
|
||||
<profile name="rbcs-kaya"
|
||||
base-url="http://rbcs-kaya:8080/"
|
||||
max-connections="50"
|
||||
enable-compression="false">
|
||||
<no-auth/>
|
||||
</profile>
|
||||
</profiles>
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: benchmark-rbcs
|
||||
namespace: rbcs
|
||||
labels:
|
||||
role: benchmark
|
||||
target: rbcs
|
||||
spec:
|
||||
backoffLimit: 1
|
||||
ttlSecondsAfterFinished: 3600
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
role: benchmark
|
||||
target: rbcs
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: client
|
||||
image: gitea.woggioni.net/woggioni/rbcs:latest
|
||||
args:
|
||||
- client
|
||||
- -p
|
||||
- rbcs
|
||||
- benchmark
|
||||
- -s
|
||||
- "256"
|
||||
- -e
|
||||
- "10000"
|
||||
env:
|
||||
- name: RBCS_CONFIGURATION_DIR
|
||||
value: /etc/rbcs-config
|
||||
volumeMounts:
|
||||
- name: client-config
|
||||
mountPath: /etc/rbcs-config
|
||||
readOnly: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
volumes:
|
||||
- name: client-config
|
||||
configMap:
|
||||
name: rbcs-client-config
|
||||
items:
|
||||
- key: rbcs-client.xml
|
||||
path: rbcs-client.xml
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: benchmark-kaya-rbcs
|
||||
namespace: rbcs
|
||||
labels:
|
||||
role: benchmark
|
||||
target: rbcs-kaya
|
||||
spec:
|
||||
backoffLimit: 1
|
||||
ttlSecondsAfterFinished: 3600
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
role: benchmark
|
||||
target: rbcs-kaya
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: client
|
||||
image: gitea.woggioni.net/woggioni/rbcs:latest
|
||||
args:
|
||||
- client
|
||||
- -p
|
||||
- rbcs-kaya
|
||||
- benchmark
|
||||
- -s
|
||||
- "256"
|
||||
- -e
|
||||
- "10000"
|
||||
env:
|
||||
- name: RBCS_CONFIGURATION_DIR
|
||||
value: /etc/rbcs-config
|
||||
volumeMounts:
|
||||
- name: client-config
|
||||
mountPath: /etc/rbcs-config
|
||||
readOnly: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
volumes:
|
||||
- name: client-config
|
||||
configMap:
|
||||
name: rbcs-client-config
|
||||
items:
|
||||
- key: rbcs-client.xml
|
||||
path: rbcs-client.xml
|
||||
Reference in New Issue
Block a user