apiVersion: apps/v1
kind: Deployment
metadata:
  name: registry-admission
  namespace: registry-admission
  labels:
    name: registry-admission
spec:
  replicas: 2
  selector:
    matchLabels:
      name: registry-admission
  template:
    metadata:
      name: registry-admission
      labels:
        name: registry-admission
    spec:
      containers:
        - name: webhook
          image: docker-registry.tools.wmflabs.org/registry-admission:latest
          # The following is for testing only
          # imagePullPolicy: Never
          resources:
            limits:
              memory: 50Mi
              cpu: 300m
            requests:
              memory: 50Mi
              cpu: 300m
          volumeMounts:
            - name: webhook-certs
              mountPath: /etc/webhook/certs
              readOnly: true
          securityContext:
            readOnlyRootFilesystem: true
      volumes:
        - name: webhook-certs
          secret:
            secretName: registry-admission-certs
