apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: scylla-operator
  name: scylla-operator
  namespace: scylla-operator
spec:
  replicas: 2
  strategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app.kubernetes.io/name: scylla-operator
  template:
    metadata:
      labels:
        app.kubernetes.io/name: scylla-operator
    spec:
      serviceAccountName: scylla-operator
      containers:
      - name: scylla-operator
        image: docker.io/scylladb/scylla-operator:latest
        imagePullPolicy: IfNotPresent
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        args:
        - operator
        - --log-level=debug
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8080
            scheme: HTTP
        readinessProbe:
          httpGet:
            path: /readyz
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 5
          periodSeconds: 10
        ports:
        - containerPort: 9443
          name: webhook-server
          protocol: TCP
        resources:
          requests:
            cpu: 10m
            memory: 20Mi
        volumeMounts:
        - mountPath: /tmp/k8s-webhook-server/serving-certs
          name: cert
          readOnly: true
      terminationGracePeriodSeconds: 10
      volumes:
      - name: cert
        secret:
          defaultMode: 420
          secretName: webhook-server-cert
