apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller-manager
  labels:
    control-plane: controller-manager
    controller-tools.k8s.io: "1.0"
spec:
  selector:
    matchLabels:
      control-plane: controller-manager
      controller-tools.k8s.io: "1.0"
  template:
    metadata:
      labels:
        control-plane: controller-manager
        controller-tools.k8s.io: "1.0"
    spec:
      containers:
        - command:
          - /bin/sh
          - -c
          # See https://github.com/kubeflow/gcp-blueprints/issues/184.
          - |
            echo "logs are hidden because volume is too excessive" &&
            /root/manager 2> /dev/null
          # A customized image with https://github.com/kubernetes-sigs/application/pull/127
          image: registry.cn-beijing.aliyuncs.com/kubeflow1_4/ml-pipeline_application-crd-controller:1.0-beta-non-cluster-role
          imagePullPolicy: IfNotPresent
          name: manager
          env:
            - name: NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          resources:
            limits:
              cpu: 100m
              memory: 30Mi
            requests:
              cpu: 100m
              memory: 20Mi
      serviceAccountName: application
