apiVersion: apps/v1
kind: Deployment
metadata:
  name: adoption-center
spec:
  replicas: 1
  selector:
    matchLabels:
      app: adoption-center
  template:
    metadata:
      labels:
        app: adoption-center
    spec:
      containers:
        - name: adoption-center
          image: springcloudservices/adoption-center
          imagePullPolicy: IfNotPresent
          resources:
            requests:
              memory: "256Mi"
              cpu: "100m"
            limits:
              memory: "512Mi"
              cpu: "500m"
          ports:
            - containerPort: 8080
          readinessProbe:
            httpGet:
              port: 8080
              path: actuator/health/readiness
              scheme: HTTP
            initialDelaySeconds: 20
            failureThreshold: 10
            periodSeconds: 3
            successThreshold: 1
            timeoutSeconds: 1
          env:
          - name: SPRING_CONFIG_LOCATION
            value: /config/rescue/application-animals.yaml
          - name: spring.profiles.active
            value: animals
          volumeMounts:
          - mountPath: /config/rescue/
            name: animals-volume
      volumes:
        - name: animals-volume
          configMap:
            name: animals-configmap
      restartPolicy: Always
      terminationGracePeriodSeconds: 10
