apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: ocm-webhook
  name: ocm-webhook
  namespace: open-cluster-management
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ocm-webhook
  template:
    metadata:
      labels:
        app: ocm-webhook
    spec:
      containers:
        - name: ocm-webhook
          args:
            - /webhook
            - --tls-cert-file=/var/run/ocm-webhook/tls.crt
            - --tls-private-key-file=/var/run/ocm-webhook/tls.key
          image: quay.io/stolostron/multicloud-manager
          imagePullPolicy: Always
          ports:
            - containerPort: 8000
              protocol: TCP
          volumeMounts:
            - mountPath: /var/run/ocm-webhook
              name: webhook-cert
      serviceAccountName: foundation-hub-sa
      volumes:
        - name: webhook-cert
          secret:
            defaultMode: 420
            secretName: ocm-webhook
