apiVersion: apps/v1
kind: Deployment
metadata:
  name: jsm-syncer
  labels:
    app: jsm-syncer
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jsm-syncer
  template:
    metadata:
      labels:
        app: jsm-syncer
    spec:
      serviceAccountName: jsm-syncer-sa
      containers:
        - name: jsm-syncer
          image: jsm-syncer:latest
          imagePullPolicy: IfNotPresent
          args:
            - "--config"
            - "/etc/jsm-syncer/config.yaml"
          ports:
            - name: http
              containerPort: 8080
          livenessProbe:
            httpGet:
              path: /healthz
              port: http
            initialDelaySeconds: 10
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /healthz
              port: http
            initialDelaySeconds: 5
            periodSeconds: 10
          volumeMounts:
            - name: config
              mountPath: /etc/jsm-syncer
              readOnly: true
      volumes:
        - name: config
          configMap:
            name: jsm-syncer-config
