apiVersion: apps/v1
kind: StatefulSet
metadata:
  labels:
    app.kubernetes.io/component: kfserving-install
    app.kubernetes.io/instance: kfserving-install
    app.kubernetes.io/managed-by: kfctl
    app.kubernetes.io/name: kfserving-install
    app.kubernetes.io/part-of: kubeflow
    app.kubernetes.io/version: v0.3.0
    control-plane: kfserving-controller-manager
    controller-tools.k8s.io: "1.0"
    kustomize.component: kfserving
  name: kfserving-controller-manager
  namespace: kubeflow
spec:
  selector:
    matchLabels:
      app.kubernetes.io/component: kfserving-install
      app.kubernetes.io/instance: kfserving-install
      app.kubernetes.io/managed-by: kfctl
      app.kubernetes.io/name: kfserving-install
      app.kubernetes.io/part-of: kubeflow
      app.kubernetes.io/version: v0.3.0
      control-plane: kfserving-controller-manager
      controller-tools.k8s.io: "1.0"
      kustomize.component: kfserving
  serviceName: controller-manager-service
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
      labels:
        app.kubernetes.io/component: kfserving-install
        app.kubernetes.io/instance: kfserving-install
        app.kubernetes.io/managed-by: kfctl
        app.kubernetes.io/name: kfserving-install
        app.kubernetes.io/part-of: kubeflow
        app.kubernetes.io/version: v0.3.0
        control-plane: kfserving-controller-manager
        controller-tools.k8s.io: "1.0"
        kustomize.component: kfserving
    spec:
      containers:
      - args:
        - --secure-listen-address=0.0.0.0:8443
        - --upstream=http://127.0.0.1:8080/
        - --logtostderr=true
        - --v=10
        image: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0
        name: kube-rbac-proxy
        ports:
        - containerPort: 8443
          name: https
      - args:
        - --metrics-addr=127.0.0.1:8080
        command:
        - /manager
        env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: SECRET_NAME
          value: kfserving-webhook-server-cert
        - name: ENABLE_WEBHOOK_NAMESPACE_SELECTOR
          value: enabled
        image: gcr.io/kfserving/kfserving-controller:v0.3.0
        imagePullPolicy: Always
        name: manager
        ports:
        - containerPort: 443
          name: webhook-server
          protocol: TCP
        resources:
          limits:
            cpu: 100m
            memory: 300Mi
          requests:
            cpu: 100m
            memory: 200Mi
        volumeMounts:
        - mountPath: /tmp/k8s-webhook-server/serving-certs
          name: cert
          readOnly: true
      terminationGracePeriodSeconds: 10
      volumes:
      - name: cert
        secret:
          defaultMode: 420
          secretName: kfserving-webhook-server-cert
