---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: openfaas
    component: nats
  name: nats
  namespace: "openfaas"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nats
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
        prometheus.io.scrape: "false" 
      labels:
        app: nats
    spec:
      priorityClassName: system-node-critical
      containers:
      - name:  nats
        resources:
            requests:
              memory: 120Mi
        image: nats-streaming:0.17.0
        imagePullPolicy: Always
        ports:
        - containerPort: 4222
          protocol: TCP
        command: ["/nats-streaming-server"]
        args:
          - --store
          - memory
          - --cluster_id
          - faas-cluster
      nodeSelector:
        beta.kubernetes.io/arch: amd64
