apiVersion: apps/v1
kind: Deployment
metadata:
  name: converter
  labels:
    app: converter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: converter
  template:
    metadata:
      labels:
        app: converter
    spec:
      containers:
        - image: 279559645400.dkr.ecr.us-west-1.amazonaws.com/solui/doc-converter:G8R2i020
          name: converter
          imagePullPolicy: Always
          ports:
            - containerPort: 8090
          volumeMounts:
            - mountPath: /opt/ibaset/doc-converter/lib/extras
              name: driver
              readOnly: true

            - mountPath: /opt/ibaset/doc-converter/config/application.properties
              name: application
              subPath: application.properties

            - mountPath: /opt/ibaset/doc-converter/config/loader.properties
              name: loader
              subPath: loader.properties

            - mountPath: /opt/ibaset/doc-converter/config/logback.xml
              name: logback
              subPath: logback.xml

            - mountPath: /opt/ibaset/doc-converter/logs
              name: logs
              readOnly: false

      volumes:
        - configMap:
            defaultMode: 420
            name: converter-application-cm
          name: application

        - configMap:
            defaultMode: 420
            name: converter-loader-cm
          name: loader

        - configMap:
            defaultMode: 420
            name: converter-logback-cm
          name: logback

        - name: logs
          nfs:
            server: --fs--.efs.--region--.amazonaws.com
            path: /logs/converter

        - name: driver
          nfs:
            server: --fs--.efs.--region--.amazonaws.com
            path: /driver
