apiVersion: apps/v1
kind: Deployment
metadata:
  name: nats-operator
  # Change to the name of the namespace where to install NATS Operator.
  # Alternatively, change to "nats-io" to perform a cluster-scoped deployment in supported versions.
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      name: nats-operator
  template:
    metadata:
      labels:
        name: nats-operator
    spec:
      serviceAccountName: nats-operator
      containers:
        - name: nats-operator
          image: connecteverything/nats-operator:0.6.0
          imagePullPolicy: IfNotPresent
          args:
            - nats-operator
          # Uncomment to perform a cluster-scoped deployment in supported versions.
          #- --feature-gates=ClusterScoped=true
          ports:
            - name: readyz
              containerPort: 8080
          env:
            - name: MY_POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: MY_POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
          readinessProbe:
            httpGet:
              path: /readyz
              port: readyz
            initialDelaySeconds: 15
            timeoutSeconds: 3
