apiVersion: apps/v1
kind: Deployment

metadata:
  name: postfix
  labels: &labels
    app.kubernetes.io/name: postfix
    app.kubernetes.io/version: 3.7.10
    app.kubernetes.io/instance: general
    app.kubernetes.io/component: mta
    app.kubernetes.io/part-of: mail

spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: postfix
      app.kubernetes.io/component: mta

  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  minReadySeconds: 10

  template:
    metadata:
      name: postfix
      labels: *labels
    spec:
      containers:
      - name: postfix
        image: docker.kodo.org.uk/docker/postfix:3.7.10
        imagePullPolicy: IfNotPresent
        resources:
          requests:
            memory: 50Mi
