{{ if .Values.mdc_converter.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mdc-converter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mdc-converter
  template:
    metadata:
      name: mdc-converter
      labels:
        app: mdc-converter
    spec:
      containers:
      - name: mdc-converter
        image: goalprofit/mdc-converter:{{.Values.mdc_converter.version}}
        imagePullPolicy: Always
        volumeMounts:
        - mountPath: /data
          name: data
          subPath: data/mdc/
      imagePullSecrets:
      - name: regcred
      {{ include "app.affinity" . | nindent 6}}

      volumes:
      - name: data
        {{ include "app.customer_volume" . | nindent 8}}

---
apiVersion: v1
kind: Service
metadata:
  name: mdc-converter
spec:
  type: ClusterIP
  selector:
    app: mdc-converter
  ports:
    - name: http
      protocol: TCP
      port: 5000
      targetPort: 5000

{{ end }}
