add vm single and vm alert
This commit is contained in:
parent
34e5ef12a4
commit
81d728bb6c
4 changed files with 97 additions and 0 deletions
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- vmalert.yaml
|
||||||
|
- vmsingle.yaml
|
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://ks.hsn.dev/operator.victoriametrics.com/vmalert_v1beta1.json
|
||||||
|
apiVersion: operator.victoriametrics.com/v1beta1
|
||||||
|
kind: VMAlert
|
||||||
|
metadata:
|
||||||
|
name: cluster
|
||||||
|
spec:
|
||||||
|
datasource:
|
||||||
|
url: http://vmsingle-cluster.observability.svc:8429
|
||||||
|
evaluationInterval: 1m
|
||||||
|
notifiers:
|
||||||
|
- url: http://alertmanager.observability.svc:9093
|
||||||
|
remoteRead:
|
||||||
|
url: http://vmsingle-cluster.observability.svc:8429
|
||||||
|
remoteWrite:
|
||||||
|
url: http://vmsingle-cluster.observability.svc:8429
|
||||||
|
replicaCount: 1
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 3m
|
||||||
|
limits:
|
||||||
|
memory: 128Mi
|
||||||
|
selectAllByDefault: true
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- maxSkew: 1
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
whenUnsatisfiable: DoNotSchedule
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: cluster
|
||||||
|
app.kubernetes.io/name: vmalert
|
||||||
|
useStrictSecurity: true
|
|
@ -0,0 +1,35 @@
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://ks.hsn.dev/operator.victoriametrics.com/vmsingle_v1beta1.json
|
||||||
|
apiVersion: operator.victoriametrics.com/v1beta1
|
||||||
|
kind: VMSingle
|
||||||
|
metadata:
|
||||||
|
name: cluster
|
||||||
|
spec:
|
||||||
|
extraArgs:
|
||||||
|
dedup.minScrapeInterval: 10s
|
||||||
|
maxLabelsPerTimeseries: "40"
|
||||||
|
search.minStalenessInterval: 5m
|
||||||
|
vmalert.proxyURL: http://vmalert-cluster.observability.svc:8080
|
||||||
|
replicaCount: 1
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 5m
|
||||||
|
limits:
|
||||||
|
memory: 2Gi
|
||||||
|
# -- Data retention period. Possible units character: h(ours), d(ays), w(eeks), y(ears), if no unit character specified - month. The minimum retention period is 24h. See these [docs](https://docs.victoriametrics.com/single-server-victoriametrics/#retention)
|
||||||
|
retentionPeriod: "6"
|
||||||
|
storage:
|
||||||
|
accessModes: [ReadWriteOnce]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
storageClassName: openebs-hostpath
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- maxSkew: 1
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
whenUnsatisfiable: DoNotSchedule
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: cluster
|
||||||
|
app.kubernetes.io/name: vmsingle
|
||||||
|
useStrictSecurity: true
|
|
@ -18,3 +18,26 @@ spec:
|
||||||
wait: true
|
wait: true
|
||||||
interval: 30m
|
interval: 30m
|
||||||
retryInterval: 1m
|
retryInterval: 1m
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app vm-cluster
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
targetNamespace: observability
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
dependsOn:
|
||||||
|
- name: openebs
|
||||||
|
- name: vm-operator
|
||||||
|
path: ./kubernetes/apps/observability/victoriametrics/cluster
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: theshire
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
|
Loading…
Reference in a new issue