apiVersion: apps/v1
kind: Deployment
metadata:
  name: trillo-rt
  namespace: trillo
  labels:
    app: trillo-rt
spec:
  replicas: 3
  template:
    metadata:
      name: trillo-rt
      namespace: trillo
      labels:
        app: trillo-rt
    spec:
      serviceAccountName: trillo-rt
      containers:
        - name: trillo-rt
          image: trillo/trillo-rt:1.0.0-BUILD-SNAPSHOT_429
          imagePullPolicy: IfNotPresent
          env:
            - name: DATA_SERVICE_URL
              value: https://trillo-ds.trillo.svc.cluster.local
            - name: CONTAINER_ORCHESTRATOR
              value: EKS
          ports:
            - containerPort: 8020
              name: trillo-rt
          volumeMounts:
            - name: trillo-repo
              mountPath: /trillo-repo
            - name: trillo-rt-appdata
              mountPath: /trillo-rt-appdata
          livenessProbe:
            initialDelaySeconds: 30
            httpGet:
              scheme: HTTPS
              port: 8020
              path: /health.json
      restartPolicy: Always
      imagePullSecrets:
        - name: trillo-dockerhub-secret
      volumes:
      - name: trillo-repo
        persistentVolumeClaim:
          claimName: trillo-repo-pvc
      - name: trillo-rt-appdata
        persistentVolumeClaim:
          claimName: trillo-rt-appdata-pvc
  selector:
    matchLabels:
      app: trillo-rt
