apiVersion: apps/v1
kind: Deployment
metadata:
  name: scandalorian-discovery
  namespace: scandalorian
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app: scandalorian-discovery
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: scandalorian-discovery
    spec:
      containers:
      - image: charlesdburton/scandalorian-discovery-engine:latest
        imagePullPolicy: Always
        env:
        - name: DISCOVERY_BUSHOST
          value: "nats.default.svc"
        - name: DISCOVERY_BUSPORT
          value: "4222"
        - name: DISCOVERY_LOGLEVEL
          value: "info"
        name: scandalorian-discovery
        resources:
          requests:
            memory: "128Mi"
            cpu: "250m"
          limits:
            memory: "512Mi"
            cpu: "1100m"
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
#---
#apiVersion: v1
#kind: Service
#metadata:
#  name: scandalorian-discovery
#  namespace: scandalorian
#  labels:
#    run: scandalorian-discovery
#spec:
#  ports:
#  - port: 80
#    targetPort: 9090
#  type: LoadBalancer
#  selector:
#    run: scandalorian-discovery
