# Kubernetes deployment description for Identifiers.org Resource Recommender API Service
# Author: Manuel Bernal Llinares <mbdebian@gmail.com>
apiVersion: apps/v1
kind: Deployment
metadata:
    name: resource-recommender
    namespace: idorg-satellite
spec:
    selector:
        matchLabels:
            environment: production
            tier: api
            app: resource-recommender
            deployment: satellite
    replicas: 1
    template:
        metadata:
            labels:
                environment: production
                tier: api
                app: resource-recommender
                deployment: satellite
        spec:
            tolerations:
            - key: "idorg-node-reliability"
              operator: "Equal"
              value: "ephemeral"
              effect: "PreferNoSchedule"
            affinity:
              nodeAffinity:
                preferredDuringSchedulingIgnoredDuringExecution:
                  - weight: 5
                    preference:
                      matchExpressions:
                        - key: idorg-node-reliability
                          operator: In
                          values:
                            - stable
            containers:
                - name: cloud-ws-resource-recommender
                  image: identifiersorg/cloud-ws-resource-recommender:1.3.2
                  imagePullPolicy: Always
                  resources:
                      requests:
                          memory: 360Mi
                          cpu: 150m
                  env:
                  - name: WS_RESOURCE_RECOMMENDER_JVM_MEMORY_MAX
                    value: "360m"
                  - name: WS_RESOURCE_RECOMMENDER_CONFIG_BACKEND_SERVICE_LINK_CHECKER_HOST
                    value: link-checker
                  ports:
                  - containerPort: 8083
