kind: Deployment
apiVersion: apps/v1
metadata:
  name: fluentbit-operator
  namespace: kubesphere-logging-system
  labels:
    app.kubernetes.io/component: operator
    app.kubernetes.io/name: fluentbit-operator
    app.kubernetes.io/version: v0.2.0
spec:
  selector:
    matchLabels:
      app.kubernetes.io/component: operator
      app.kubernetes.io/name: fluentbit-operator
      app.kubernetes.io/version: v0.2.0
  template:
    metadata:
      labels:
        app.kubernetes.io/component: operator
        app.kubernetes.io/name: fluentbit-operator
        app.kubernetes.io/version: v0.2.0
    spec:
      volumes:
      - name: env
        emptyDir: {}
      - name: dockersock
        hostPath:
          path: /var/run/docker.sock
      initContainers:
      - name: setenv
        image: 'docker:19.03'
        command:
        - /bin/sh
        - '-c'
        - set -ex;
          echo DOCKER_ROOT_DIR=$(docker info -f '{{.DockerRootDir}}') > /fluentbit-operator/fluent-bit.env
        volumeMounts:
        - name: env
          mountPath: /fluentbit-operator
        - name: dockersock
          readOnly: true
          mountPath: /var/run/docker.sock
      containers:
      - name: fluentbit-operator
        image: 'kubespheredev/fluentbit-operator:v0.2.0'
        resources:
          limits:
            cpu: 100m
            memory: 30Mi
          requests:
            cpu: 100m
            memory: 20Mi
        volumeMounts:
        - name: env
          mountPath: /fluentbit-operator
      serviceAccountName: fluentbit-operator
