apiVersion: apps/v1
kind: Deployment
metadata:
  name: sendshake-serverside
  labels:
    app: sendshake-serverside
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sendshake-serverside
  template:
    metadata:
      labels:
        app: sendshake-serverside
    spec:
      imagePullSecrets:
        - name: ecr-secret
      containers:
        - name: sendshake-serverside
          image: CONTAINER_REPOSITORY_URL:TAG
          imagePullPolicy: Always
          ports:
            - containerPort: 80
              name: http
          resources:
            requests:
              cpu: "100m"
              memory: "256Mi"
            limits:
              cpu: "500m"
              memory: "512Mi"
          volumeMounts:
            - name: sendshake-config
              mountPath: /app/inc/settings.php
              subPath: settings.php
            - name: sendshake-config
              mountPath: /app/inc/payment_settings.php
              subPath: payment_settings.php
          readinessProbe:
            httpGet:
              path: /query
              port: http
            initialDelaySeconds: 15
            periodSeconds: 10
            failureThreshold: 3
          livenessProbe:
            httpGet:
              path: /query
              port: http
            initialDelaySeconds: 30
            periodSeconds: 20
            failureThreshold: 3
          startupProbe:
            httpGet:
              path: /query
              port: http
            failureThreshold: 30
            periodSeconds: 10
      volumes:
        - name: sendshake-config
          secret:
            secretName: sendshake-serverside-secrets
