add vmagent

This commit is contained in:
Joseph Hanson 2024-10-10 14:09:28 -05:00
parent a85c7b58b8
commit da23c6879b
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
2 changed files with 43 additions and 0 deletions

View file

@ -3,5 +3,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- vmagent.yaml
- vmalert.yaml
- vmsingle.yaml

View file

@ -0,0 +1,42 @@
---
# yaml-language-server: $schema=https://ks.hsn.dev/operator.victoriametrics.com/vmagent_v1beta1.json
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMAgent
metadata:
name: victoria
spec:
scrapeInterval: 60s
selectAllByDefault: true
statefulMode: true
useStrictSecurity: true
vmAgentExternalLabelName: prometheus
externalLabels:
cluster: theshire
extraArgs:
promscrape.maxScrapeSize: "33554432" # 32MiB
promscrape.streamParse: "true"
# Do not store original labels in vmagent's memory by default. This reduces the amount of memory used by vmagent
# but makes vmagent debugging UI less informative. See: https://docs.victoriametrics.com/vmagent/#relabel-debug
promscrape.dropOriginalLabels: "true"
remoteWrite:
- url: http://vmsingle-victoria.observability.svc:8429/api/v1/write
resources:
requests:
cpu: 3m
limits:
memory: 512Mi
statefulStorage:
volumeClaimTemplate:
spec:
storageClassName: openebs-hostpath
resources:
requests:
storage: 1Gi
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/instance: stack
app.kubernetes.io/name: vmagent