apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: pywb
    tier: wayback
    uri: preserve.lib.unb.ca
  name: preserve-lib-unb-ca
  namespace: prod
spec:
  selector:
    matchLabels:
      uri: preserve.lib.unb.ca
  replicas: 1
  revisionHistoryLimit: 2
  minReadySeconds: 30
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  template:
    metadata:
      labels:
        app: pywb
        tier: wayback
        uri: preserve.lib.unb.ca
    spec:
      nodeSelector:
        deployenv: prod
      containers:
        -
          env:
            -
              name: DEPLOY_ENV
              value: prod
          image: "||DEPLOYMENTIMAGE||"
          imagePullPolicy: Always
          name: preserve-lib-unb-ca
          ports:
            -
              containerPort: 8080
          volumeMounts:
            -
              mountPath: /app/collections
              name: pywb-persistent-storage
      priorityClassName: high-priority-services
      imagePullSecrets:
        -
          name: github-container-registry-auth
      restartPolicy: Always
      volumes:
        -
          name: pywb-persistent-storage
          persistentVolumeClaim:
            claimName: preserve-lib-unb-ca
