# apiVersion: v1
# kind: Namespace
# metadata:
#   labels:
#     control-plane: controller-manager
#   name: system
# ---
# apiVersion: apps/v1
# kind: Deployment
# metadata:
#   name: controller-manager
#   namespace: system
#   labels:
#     control-plane: controller-manager
# spec:
#   selector:
#     matchLabels:
#       control-plane: controller-manager
#   replicas: 1
#   template:
#     metadata:
#       labels:
#         control-plane: controller-manager
#     spec:
#       securityContext:
#         runAsNonRoot: true
#       containers:
#       - command:
#         - /manager
#         args:
#         - --leader-elect
#         image: controller:latest
#         name: manager
#         securityContext:
#           allowPrivilegeEscalation: false
#         livenessProbe:
#           httpGet:
#             path: /healthz
#             port: 8081
#           initialDelaySeconds: 15
#           periodSeconds: 20
#         readinessProbe:
#           httpGet:
#             path: /readyz
#             port: 8081
#           initialDelaySeconds: 5
#           periodSeconds: 10
#         resources:
#           limits:
#             cpu: 100m
#             memory: 30Mi
#           requests:
#             cpu: 100m
#             memory: 20Mi
#       serviceAccountName: controller-manager
#       terminationGracePeriodSeconds: 10


---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: local-storage-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: local-storage-operator
  template:
    metadata:
      annotations:
        target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
      labels:
        name: local-storage-operator
    spec:
      serviceAccountName: local-storage-operator
      containers:
        - name: local-storage-operator
          image: quay.io/openshift/origin-local-storage-operator
          ports:
          - containerPort: 60000
            name: metrics
          command:
          - local-storage-operator
          args:
          - --leader-elect
          imagePullPolicy: IfNotPresent
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: DISKMAKER_IMAGE
              value: quay.io/openshift/origin-local-storage-diskmaker
            - name: KUBE_RBAC_PROXY_IMAGE
              value: quay.io/openshift/origin-kube-rbac-proxy:latest
