apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: thingverse-backend
  name: thingverse-backend-read
  namespace: thingverse
spec:
  replicas: 1
  selector:
    matchLabels:
      app: thingverse-backend
      thingverse-backend-role: read-model
  template:
    metadata:
      namespace: thingverse
      labels:
        app: thingverse-backend
        thingverse-backend-role: read-model
    spec:
      serviceAccountName: thingverse-svc-account
      containers:
        - name: thingverse-backend
          image: thingverse-backend:1.0.0
          ports:
            - name: remoting
              containerPort: 2551
              protocol: TCP
            - name: management
              containerPort: 8558
              protocol: TCP
            - name: http
              containerPort: 8080
              protocol: TCP
          env:
            - name: THINGVERSE_BACKEND_OPERATION_MODE
              value: "cluster"
            - name: THINGVERSE_REMOTE_THING_TIMEOUT_DURATION
              value: "off"
            - name: THINGVERSE_BACKEND_ROLES
              value: "read-model"
            - name: RUNTIME_ENVIRONMENT
              value: "kubernetes"
            - name: THINGVERSE_CASSANDRA_CONTACT_POINTS
              value: "cassandra.thingverse.svc.cluster.local\":\"9042"
