apiVersion: apps/v1
kind: Deployment
metadata:
  name: bitfusion-webhook-deployment
  namespace: bwki
  labels:
    app: bwki
spec:
  replicas: 1
  selector:
    matchLabels:
      app: bwki
  template:
    metadata:
      labels:
        app: bwki
    spec:
      containers:
        - name: bwki
          image: phaedobf/sidecar-injector:v0.1
          imagePullPolicy: IfNotPresent
          env:
            - name: TOTAL_GPU_MEMORY
              value: "0"
          args:
          - -sidecarCfgFile=/etc/webhook/config/sidecarconfig.yaml
          - -bitfusionClientConfig=/etc/webhook/bitfusion-client-config/bitfusion-client-config.yaml
          - -tlsCertFile=/etc/webhook/certs/cert.pem
          - -tlsKeyFile=/etc/webhook/certs/key.pem
          - -alsologtostderr
          - -v=4
          - 2>&1
          volumeMounts:
          - name: webhook-certs
            mountPath: /etc/webhook/certs
            readOnly: true
          - name: webhook-config
            mountPath: /etc/webhook/config
          - name: webhook-bitfusion-client-config
            mountPath: /etc/webhook/bitfusion-client-config
      volumes:
      - name: webhook-certs
        secret:
          secretName: bwki-webhook-certs
      - name: webhook-config
        configMap:
          name: bwki-webhook-configmap
      - name: webhook-bitfusion-client-config
        configMap:
          name: bwki-bitfusion-client-configmap
