apiVersion: apps/v1
kind: Deployment
metadata:
  name: vmalert
spec:
  replicas: 1
  strategy: { type: Recreate }
  selector:
    matchLabels:
      app: vmalert
  template:
    metadata:
      labels:
        app: vmalert
      annotations:
        prometheus.io/scrape: "true"
    spec:
      serviceAccountName: victoriametrics
      containers:
        - name: vmalert
          image: bang5:5000/vmalert
          args:
            - -configCheckInterval=5s
            - -datasource.url=http://victoriametrics.default.svc.cluster.local./m/
            - -external.url=https://bigasterisk.com/vmalert
            - -loggerLevel=INFO
            - -loggerTimezone=America/Los_Angeles
            - -memory.allowedBytes=512MB
            - -notifier.url=http://alertmanager.default.svc.cluster.local.
            - -remoteRead.url=http://victoriametrics.default.svc.cluster.local./m/
            - -remoteWrite.url=http://victoriametrics.default.svc.cluster.local./m/
            - -rule=/local/rules/*.yaml
            - -rule=/local/rules/build/*.yaml
          ports:
            - containerPort: 8880
          resources:
            limits:
              memory: 0.5Gi
---
apiVersion: v1
kind: Service
metadata:
  name: vmalert
spec:
  ports:
    - port: 80
      targetPort: 8880
  selector:
    app: vmalert
