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