apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller
  namespace: system
spec:
  selector:
    matchLabels:
      app.kubernetes.io/component: controller
  replicas: 1
  template:
    metadata:
      labels:
        app.kubernetes.io/component: controller
    spec:
      serviceAccountName: controller
      containers:
      - command:
        - /pvc-autoresizer
        args:
        - --prometheus-url=http://prometheus-prometheus-oper-prometheus.prometheus.svc:9090
        - --interval=10s
        image: pvc-autoresizer:devel
        name: manager
        resources:
          requests:
            cpu: 100m
            memory: 20Mi
        ports:
        - name: metrics
          containerPort: 8080
          protocol: TCP
        - name: health
          containerPort: 8081
          protocol: TCP
        readinessProbe:
          httpGet:
            path: /readyz
            port: health
        livenessProbe:
          httpGet:
            path: /healthz
            port: health
      terminationGracePeriodSeconds: 10
