apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: knative-serving-install
    app.kubernetes.io/instance: knative-serving-install-v0.8.0
    app.kubernetes.io/managed-by: kfctl
    app.kubernetes.io/name: knative-serving-install
    app.kubernetes.io/part-of: kubeflow
    app.kubernetes.io/version: v0.8.0
    kustomize.component: knative
    serving.knative.dev/release: v0.11.1
  name: autoscaler
  namespace: knative-serving
spec:
  replicas: 1
  selector:
    matchLabels:
      app: autoscaler
      app.kubernetes.io/component: knative-serving-install
      app.kubernetes.io/instance: knative-serving-install-v0.8.0
      app.kubernetes.io/managed-by: kfctl
      app.kubernetes.io/name: knative-serving-install
      app.kubernetes.io/part-of: kubeflow
      app.kubernetes.io/version: v0.8.0
      kustomize.component: knative
  template:
    metadata:
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
        sidecar.istio.io/inject: "true"
        traffic.sidecar.istio.io/includeInboundPorts: 8080,9090
      labels:
        app: autoscaler
        app.kubernetes.io/component: knative-serving-install
        app.kubernetes.io/instance: knative-serving-install-v0.8.0
        app.kubernetes.io/managed-by: kfctl
        app.kubernetes.io/name: knative-serving-install
        app.kubernetes.io/part-of: kubeflow
        app.kubernetes.io/version: v0.8.0
        kustomize.component: knative
        serving.knative.dev/release: v0.11.1
    spec:
      containers:
      - args:
        - --secure-port=8443
        - --cert-dir=/tmp
        env:
        - name: SYSTEM_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: CONFIG_LOGGING_NAME
          value: config-logging
        - name: CONFIG_OBSERVABILITY_NAME
          value: config-observability
        - name: METRICS_DOMAIN
          value: knative.dev/serving
        image: gcr.io/knative-releases/knative.dev/serving/cmd/autoscaler@sha256:ef1f01b5fb3886d4c488a219687aac72d28e72f808691132f658259e4e02bb27
        livenessProbe:
          httpGet:
            httpHeaders:
            - name: k-kubelet-probe
              value: autoscaler
            path: /healthz
            port: 8080
        name: autoscaler
        ports:
        - containerPort: 8080
          name: websocket
        - containerPort: 9090
          name: metrics
        - containerPort: 8443
          name: custom-metrics
        - containerPort: 8008
          name: profiling
        readinessProbe:
          httpGet:
            httpHeaders:
            - name: k-kubelet-probe
              value: autoscaler
            path: /healthz
            port: 8080
        resources:
          limits:
            cpu: 300m
            memory: 400Mi
          requests:
            cpu: 30m
            memory: 40Mi
        securityContext:
          allowPrivilegeEscalation: false
      serviceAccountName: controller
