Skip to content
Snippets Groups Projects
Commit da70c0b6 authored by Rostislav Vatolin [SLB]'s avatar Rostislav Vatolin [SLB]
Browse files

Merge branch 'setup-hpa' into 'master'

Setup hpa for legal service

See merge request !156
parents cecd1407 754251a0
No related branches found
No related tags found
1 merge request!156Setup hpa for legal service
Pipeline #70960 failed
......@@ -3,6 +3,8 @@ global:
# Service(s) Replica Count
replicaCount: 2
maxReplicaCount: 20
minReplicaCount: 4
nodepool: services
isAutoscalingEnabled: false
......@@ -23,3 +25,5 @@ featureFlag:
resourceLimits:
enabledEnvs:
- demo
hpa:
enabledEnvs: []
......@@ -18,7 +18,10 @@ metadata:
name: {{ .Release.Name }}
namespace: osdu
spec:
{{- if has .Values.env .Values.featureFlag.hpa.enabledEnvs }}
{{- else }}
replicas: {{ .Values.global.replicaCount }}
{{- end }}
selector:
matchLabels:
app: {{ .Chart.Name }}
......
# Copyright © Microsoft Corporation
#
# 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
#
# http://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.
{{- if has .Values.env .Values.featureFlag.hpa.enabledEnvs }}
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
namespace: osdu
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ .Chart.Name }}
minReplicas: {{ .Values.global.minReplicaCount }}
maxReplicas: {{ .Values.global.maxReplicaCount }}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
behavior:
scaleDown:
stabilizationWindowSeconds: 150
policies:
- type: Pods
value: 2
periodSeconds: 30
scaleUp:
stabilizationWindowSeconds: 10
selectPolicy: Max
policies:
- type: Pods
value: 6
periodSeconds: 10
- type: Percent
value: 50
periodSeconds: 10
{{- end }}
\ No newline at end of file
......@@ -14,6 +14,8 @@
global:
replicaCount: 1
maxReplicaCount: 1
minReplicaCount: 1
nodepool: services
isAutoscalingEnabled: false
......@@ -29,4 +31,6 @@ env: demo
featureFlag:
resourceLimits:
enabledEnvs:
- demo
\ No newline at end of file
- demo
hpa:
enabledEnvs: []
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment