---
apiVersion: v1
kind: Service
metadata:
  labels:
    name: quay-bridge-operator
  name: quay-bridge-operator
spec:
  ports:
    - name: https
      port: 443
      protocol: TCP
      targetPort: 8443
  selector:
    name: quay-bridge-operator
  sessionAffinity: None
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: quay-bridge-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: quay-bridge-operator
  template:
    metadata:
      labels:
        name: quay-bridge-operator
    spec:
      serviceAccountName: quay-bridge-operator
      containers:
        - name: quay-bridge-operator
          image: quay.io/quay/quay-bridge-operator
          command:
          - quay-bridge-operator
          imagePullPolicy: Always
          env:
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "quay-bridge-operator"
          ports:
          - containerPort: 8443
            protocol: TCP
          volumeMounts:
            - mountPath: /etc/webhook/certs
              name: certs
              readOnly: true
      serviceAccount:  quay-bridge-operator
      volumes:
        - name: certs
          secret:
            secretName: quay-bridge-operator