Commit bae1a3dd authored by harshit aggarwal's avatar harshit aggarwal
Browse files

adding kubernetes scaling

parent 0fb45ac4
Pipeline #22061 failed with stages
in 20 seconds
# Source: indexer-service/templates/hpa.yaml
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
......@@ -12,31 +13,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
name: {{ .Chart.Name }}-hpa
namespace: osdu
labels:
deploymentName: {{ .Chart.Name }}
spec:
scaleTargetRef:
deploymentName: {{ .Chart.Name }}
pollingInterval: 30 # Optional. Default: 30 seconds
cooldownPeriod: 60 # Optional. Default: 300 seconds
minReplicaCount: 1 # Optional. Default: 0
maxReplicaCount: 10 # Optional. Default: 100
triggers:
- type: cpu
metadata:
apiVersion: apps/v1
kind: Deployment
name: {{ .Chart.Name }}
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
value: "50"
- type: azure-servicebus
metadata:
type: serviceBusTrigger
direction: in
name: message
subscriptionName: {{ .Values.azure.servicebusSubscription }}
topicName: {{ .Values.azure.servicebusTopic }}
queueLength: {{ .Values.azure.queueLength }}
connection: SERVICE_BUS
averageUtilization: 50
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment