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:
|
services:
|
||||||
storageusers:
|
storageusers:
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
|
cpu: 10m
|
||||||
|
limits:
|
||||||
|
memory: 1536Mi
|
||||||
storageBackend:
|
storageBackend:
|
||||||
driver: s3ng
|
driver: s3ng
|
||||||
driverConfig:
|
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
|
apiVersion: v1
|
||||||
data:
|
data:
|
||||||
service-account-id: 2387fad3-be34-4b10-948b-421873985560
|
service-account-id: c5e80613-df24-48ee-9ddf-08f0c1023e7e
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
data:
|
data:
|
||||||
application-id: d019e54c-51c8-46ab-aded-87182aafcee4
|
application-id: b8106974-0cc9-429b-b779-c63ba898a76d
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
data:
|
data:
|
||||||
storage-uuid: 30a27136-b87a-431f-9d0d-0cfec28061e4
|
storage-uuid: 245f3f9c-dea3-4996-afb3-3fb3e73dbd8e
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,18 @@ spec:
|
||||||
app.kubernetes.io/version: 7.1.4
|
app.kubernetes.io/version: 7.1.4
|
||||||
helm.sh/chart: ocis-0.7.0
|
helm.sh/chart: ocis-0.7.0
|
||||||
spec:
|
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:
|
containers:
|
||||||
- args:
|
- args:
|
||||||
- storage-users
|
- storage-users
|
||||||
|
|
@ -168,9 +180,11 @@ spec:
|
||||||
- containerPort: 9159
|
- containerPort: 9159
|
||||||
name: metrics-debug
|
name: metrics-debug
|
||||||
resources:
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 1536Mi
|
||||||
requests:
|
requests:
|
||||||
cpu: 10m
|
cpu: 10m
|
||||||
memory: 64Mi
|
memory: 512Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
runAsGroup: 1000
|
runAsGroup: 1000
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue