apiVersion: apps/v1
kind: Deployment

metadata:
  labels:
    app: anonymizer-image
  name: anonymizer-image

spec:
  replicas: 1
  selector:
    matchLabels:
      app: anonymizer-image
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: anonymizer-image
    spec:
      containers:
        - name: presidio
          image: mcr.microsoft.com/presidio-anonymizer-image:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 3001
              protocol: TCP
              name: grpc
          envFrom:
            - configMapRef:
                name: anonymizer-image
            - configMapRef:
                name: common
            - secretRef:
                name: anonymizer-image
          env:
            - name: PRESIDIO_NAMESPACE
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.namespace
            - name: GRPC_PORT
              value: "3001"
          resources: {}
      restartPolicy: Always
