apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubesail-agent
spec:
  selector:
    matchLabels:
      app: kubesail-agent
      tier: service
  minReadySeconds: 0
  strategy:
    type: Recreate
  replicas: 1
  template:
    metadata:
      annotations:
        prometheus.io/port: "5000"
        prometheus.io/scrape: "true"
      labels:
        app: kubesail-agent
        tier: service
    spec:
      terminationGracePeriodSeconds: 0
      containers:
        - name: kubesail-agent
          image: kubesail/agent:latest
          imagePullPolicy: IfNotPresent
          command: ["/app/bin/kubesail-agent"]
          ports:
            - name: metrics
              containerPort: 5000
            - name: http
              containerPort: 6000
          env:
            - name: GET_HOSTS_FROM
              value: dns
            - name: LOG_LEVEL
              value: debug
            - name: LOGGING_LABEL
              value: kubesail-agent
            - name: NODE_ENV
              value: development
          resources:
            requests:
              cpu: 50m
              memory: 100Mi
            limits:
              cpu: "2"
              memory: 1500Mi
