apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    run: message-consumer-service
  name: message-consumer-service
  namespace: default
spec:
  replicas: 1
  revisionHistoryLimit: 1
  selector:
    matchLabels:
      run: message-consumer-service
  template:
    metadata:
      labels:
        run: message-consumer-service
    spec:
      containers:
      - image: ${REGISTRY_URL}/${REGISTRY_NAMESPACE}/${IMAGE_NAME}:${IMAGE_TAG}
        name: message-consumer-service
        lifecycle:
          preStop:
            exec:
              command: ["/bin/bash", "-c", "sleep 5"]      