apiVersion: apps/v1
kind: Deployment
metadata:
  name: byoip-mutator
  labels:
    app: byoip-mutator
  namespace: byoip
spec:
  replicas: 1
  selector:
    matchLabels:
      app: byoip-mutator
  template:
    metadata:
      labels:
        app: byoip-mutator
      annotations:
        iam.amazonaws.com/role: modify-alb-auth-role
    spec:
      containers:
        - name: byoip-mutator
          image: 554773729771.dkr.ecr.us-east-1.amazonaws.com/byoip-mutator:latest
          imagePullPolicy: Always
          args:
            - -tlsCertFile=/etc/webhook/certs/cert.pem
            - -tlsKeyFile=/etc/webhook/certs/key.pem
            - -alsologtostderr
            - -v=4
            - 2>&1
          env:
            - name: AWS_REGION
              value: us-east-1
          volumeMounts:
            - name: webhook-certs
              mountPath: /etc/webhook/certs
              readOnly: true
      volumes:
        - name: webhook-certs
          secret:
            secretName: byoip-mutator-certs
