...
1# Copyright 2022 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# TODO(b/246999435): Migrate to autoscaling/v2 once most of our customers have moved to K8s v1.23+
16apiVersion: autoscaling/v1
17kind: HorizontalPodAutoscaler
18metadata:
19 name: webhook
20 annotations:
21 autoscaling.alpha.kubernetes.io/metrics: '[{"type":"Resource","resource":{"name":"memory","targetAverageUtilization":70}}]'
22spec:
23 maxReplicas: 20
24 minReplicas: 2
25 scaleTargetRef:
26 apiVersion: apps/v1
27 kind: Deployment
28 name: webhook-manager
29 targetCPUUtilizationPercentage: 90
View as plain text