# Copyright 2020 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: activator
  namespace: knative-serving
  labels:
    app.kubernetes.io/name: activator
    app.kubernetes.io/part-of: knative-serving
    app.kubernetes.io/version: "1.0.0"
    serving.knative.dev/release: "v1.0.0"
spec:
  maxReplicas: 20
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        # Percentage of the requested CPU
        averageUtilization: 100
  minReplicas: 1
  scaleTargetRef:
    name: activator
    apiVersion: apps/v1
    kind: Deployment
