apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: nats
  namespace: leaq
spec:
  serviceName: nats
  replicas: 1
  selector:
    matchLabels:
      app: nats
  template:
    metadata:
      labels:
        app: nats
    spec:
      containers:
        - name: nats
          image: nats:2.1-alpine
          ports:
            - containerPort: 4222
              name: client
            - containerPort: 8222
              name: monitoring
          resources:
            requests:
              cpu: 50m
              memory: 10Mi
            limits:
              cpu: "1"
              memory: 1Gi
