feat: configure storageusers resources and anti-affinity
Assigns specific CPU and memory requests and limits to the storageusers service to ensure stable operation and efficient resource utilization. Introduces pod anti-affinity for storageusers to prevent it from being scheduled on the same node as victoria-metrics-single, improving resilience and preventing potential resource contention.
This commit is contained in:
parent
1122c3f0e2
commit
f442255833
|
|
@ -38,6 +38,12 @@ secretRefs:
|
|||
|
||||
services:
|
||||
storageusers:
|
||||
resources:
|
||||
requests:
|
||||
memory: 512Mi
|
||||
cpu: 10m
|
||||
limits:
|
||||
memory: 1536Mi
|
||||
storageBackend:
|
||||
driver: s3ng
|
||||
driverConfig:
|
||||
|
|
|
|||
20
prototypes/ocis/ytt/storageusers-affinity.ytt.yaml
Normal file
20
prototypes/ocis/ytt/storageusers-affinity.ytt.yaml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#@ load("@ytt:overlay", "overlay")
|
||||
|
||||
#@overlay/match by=overlay.subset({"kind": "Deployment", "metadata": {"name": "storageusers"}})
|
||||
---
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
#@overlay/match missing_ok=True
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/name
|
||||
operator: In
|
||||
values:
|
||||
- victoria-metrics-single
|
||||
topologyKey: kubernetes.io/hostname
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
apiVersion: v1
|
||||
data:
|
||||
service-account-id: 2387fad3-be34-4b10-948b-421873985560
|
||||
service-account-id: c5e80613-df24-48ee-9ddf-08f0c1023e7e
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
apiVersion: v1
|
||||
data:
|
||||
application-id: d019e54c-51c8-46ab-aded-87182aafcee4
|
||||
application-id: b8106974-0cc9-429b-b779-c63ba898a76d
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
apiVersion: v1
|
||||
data:
|
||||
storage-uuid: 30a27136-b87a-431f-9d0d-0cfec28061e4
|
||||
storage-uuid: 245f3f9c-dea3-4996-afb3-3fb3e73dbd8e
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
|
|
|
|||
|
|
@ -31,6 +31,18 @@ spec:
|
|||
app.kubernetes.io/version: 7.1.4
|
||||
helm.sh/chart: ocis-0.7.0
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/name
|
||||
operator: In
|
||||
values:
|
||||
- victoria-metrics-single
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
containers:
|
||||
- args:
|
||||
- storage-users
|
||||
|
|
@ -168,9 +180,11 @@ spec:
|
|||
- containerPort: 9159
|
||||
name: metrics-debug
|
||||
resources:
|
||||
limits:
|
||||
memory: 1536Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 64Mi
|
||||
memory: 512Mi
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
runAsGroup: 1000
|
||||
|
|
|
|||
Loading…
Reference in a new issue