apiVersion: apps/v1
kind: Deployment
metadata:
  name: sparkoperator
  namespace: sparkoperator
  labels:
    app.kubernetes.io/name: sparkoperator
    app.kubernetes.io/version: v2.4.5-v1beta2
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: sparkoperator
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "10254"
        prometheus.io/path: "/metrics"
      labels:
        app.kubernetes.io/name: sparkoperator
        app.kubernetes.io/version: v2.4.5-v1beta2
    spec:
      serviceAccountName: sparkoperator
      volumes:
        - name: webhook-certs
          secret:
            secretName: spark-webhook-certs
      containers:
      - name: sparkoperator-unknown
        image: gcr.io/spark-operator/spark-operator:v1beta2-1.1.2-2.4.5
        volumeMounts:
          - name: webhook-certs
            mountPath: /etc/webhook-certs
        imagePullPolicy: Always
        command: ["/usr/bin/spark-operator"]
        ports:
          - containerPort: 10254
          - containerPort: 8080
        args:
        - -logtostderr
        - -v=2
        - -controller-threads=20
        - -enable-metrics=true
        - "-metrics-prefix=service:"
        - -metrics-labels=task_name
        - -metrics-labels=workflow_name
        - -enable-webhook=true
        - -webhook-svc-namespace=sparkoperator
