apiVersion: apps/v1
kind: Deployment
metadata:
    name: expiration-depl
spec:
    replicas: 1
    selector:
        matchLabels:
            app: expiration
    template:
        metadata:
            labels:
                app: expiration
        spec:
            containers:
                - name: expiration
                  image: superclass2016/expiration
                  env:
                      - name: NATS_CLIENT_ID
                        valueFrom:
                            fieldRef:
                                fieldPath: metadata.name
                      - name: NATS_URL
                        value: 'http://nats-srv:4222'
                      - name: NATS_CLUSTER_ID
                        value: ticketing
                      - name: REDIS_HOST
                        value: expiration-redis-srv
                  resources:
                      requests:
                          cpu: '100m'
                          memory: '100Mi'
                      limits:
                          cpu: '150m'
                          memory: '150Mi'
            priorityClassName: third-priority
            tolerations:
                - key: ''
                  operator: 'Exists'
                  effect: 'NoExecute'
                  tolerationSeconds: 120
