apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: seldon
    app.kubernetes.io/component: seldon
    app.kubernetes.io/instance: seldon-core
    app.kubernetes.io/name: seldon-core-operator
    app.kubernetes.io/version: 1.4.0
    control-plane: seldon-controller-manager
  name: seldon-controller-manager
  namespace: kubeflow
spec:
  replicas: 1
  selector:
    matchLabels:
      app: seldon
      app.kubernetes.io/component: seldon
      app.kubernetes.io/instance: seldon1
      app.kubernetes.io/name: seldon-core-operator
      app.kubernetes.io/version: v0.5
      control-plane: seldon-controller-manager
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
        sidecar.istio.io/inject: "false"
      labels:
        app: seldon
        app.kubernetes.io/component: seldon
        app.kubernetes.io/instance: seldon1
        app.kubernetes.io/name: seldon-core-operator
        app.kubernetes.io/version: v0.5
        control-plane: seldon-controller-manager
    spec:
      containers:
      - args:
        - --enable-leader-election
        - --webhook-port=443
        - --create-resources=$(MANAGER_CREATE_RESOURCES)
        - ""
        command:
        - /manager
        env:
        - name: WATCH_NAMESPACE
          value: ""
        - name: RELATED_IMAGE_EXECUTOR
          value: ""
        - name: RELATED_IMAGE_ENGINE
          value: ""
        - name: RELATED_IMAGE_STORAGE_INITIALIZER
          value: ""
        - name: RELATED_IMAGE_SKLEARNSERVER_REST
          value: ""
        - name: RELATED_IMAGE_SKLEARNSERVER_GRPC
          value: ""
        - name: RELATED_IMAGE_XGBOOSTSERVER_REST
          value: ""
        - name: RELATED_IMAGE_XGBOOSTSERVER_GRPC
          value: ""
        - name: RELATED_IMAGE_MLFLOWSERVER_REST
          value: ""
        - name: RELATED_IMAGE_MLFLOWSERVER_GRPC
          value: ""
        - name: RELATED_IMAGE_TFPROXY_REST
          value: ""
        - name: RELATED_IMAGE_TFPROXY_GRPC
          value: ""
        - name: RELATED_IMAGE_TENSORFLOW
          value: ""
        - name: RELATED_IMAGE_EXPLAINER
          value: ""
        - name: RELATED_IMAGE_MOCK_CLASSIFIER
          value: ""
        - name: MANAGER_CREATE_RESOURCES
          value: "false"
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: CONTROLLER_ID
          value: ""
        - name: AMBASSADOR_ENABLED
          value: "true"
        - name: AMBASSADOR_SINGLE_NAMESPACE
          value: "false"
        - name: ENGINE_CONTAINER_IMAGE_AND_VERSION
          value: docker.io/seldonio/engine:1.4.0
        - name: ENGINE_CONTAINER_IMAGE_PULL_POLICY
          value: IfNotPresent
        - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME
          value: default
        - name: ENGINE_CONTAINER_USER
          value: "8888"
        - name: ENGINE_LOG_MESSAGES_EXTERNALLY
          value: "false"
        - name: PREDICTIVE_UNIT_SERVICE_PORT
          value: "9000"
        - name: PREDICTIVE_UNIT_DEFAULT_ENV_SECRET_REF_NAME
          value: ""
        - name: PREDICTIVE_UNIT_METRICS_PORT_NAME
          value: metrics
        - name: ENGINE_SERVER_GRPC_PORT
          value: "5001"
        - name: ENGINE_SERVER_PORT
          value: "8000"
        - name: ENGINE_PROMETHEUS_PATH
          value: /prometheus
        - name: ISTIO_ENABLED
          value: "true"
        - name: KEDA_ENABLED
          value: "false"
        - name: ISTIO_GATEWAY
          value: kubeflow/kubeflow-gateway
        - name: ISTIO_TLS_MODE
          value: ""
        - name: USE_EXECUTOR
          value: "true"
        - name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION
          value: docker.io/seldonio/seldon-core-executor:1.4.0
        - name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY
          value: IfNotPresent
        - name: EXECUTOR_PROMETHEUS_PATH
          value: /prometheus
        - name: EXECUTOR_SERVER_PORT
          value: "8000"
        - name: EXECUTOR_CONTAINER_USER
          value: "8888"
        - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME
          value: default
        - name: EXECUTOR_SERVER_METRICS_PORT_NAME
          value: metrics
        - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT
          value: http://default-broker
        - name: DEFAULT_USER_ID
          value: "8888"
        - name: EXECUTOR_DEFAULT_CPU_REQUEST
          value: 500m
        - name: EXECUTOR_DEFAULT_MEMORY_REQUEST
          value: 512Mi
        - name: EXECUTOR_DEFAULT_CPU_LIMIT
          value: 500m
        - name: EXECUTOR_DEFAULT_MEMORY_LIMIT
          value: 512Mi
        - name: ENGINE_DEFAULT_CPU_REQUEST
          value: 500m
        - name: ENGINE_DEFAULT_MEMORY_REQUEST
          value: 512Mi
        - name: ENGINE_DEFAULT_CPU_LIMIT
          value: 500m
        - name: ENGINE_DEFAULT_MEMORY_LIMIT
          value: 512Mi
        image: docker.io/seldonio/seldon-core-operator:1.4.0
        imagePullPolicy: IfNotPresent
        name: manager
        ports:
        - containerPort: 443
          name: webhook-server
          protocol: TCP
        - containerPort: 8080
          name: metrics
          protocol: TCP
        resources:
          limits:
            cpu: 500m
            memory: 300Mi
          requests:
            cpu: 100m
            memory: 200Mi
        volumeMounts:
        - mountPath: /tmp/k8s-webhook-server/serving-certs
          name: cert
          readOnly: true
      serviceAccountName: seldon-manager
      terminationGracePeriodSeconds: 10
      volumes:
      - name: cert
        secret:
          defaultMode: 420
          secretName: seldon-webhook-server-cert
