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 # Copyright © Microsoft Corporation
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
...@@ -12,31 +13,22 @@ ...@@ -12,31 +13,22 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
apiVersion: keda.k8s.io/v1alpha1 apiVersion: autoscaling/v2beta2
kind: ScaledObject kind: HorizontalPodAutoscaler
metadata: metadata:
name: {{ .Chart.Name }} name: {{ .Chart.Name }}-hpa
namespace: osdu namespace: osdu
labels:
deploymentName: {{ .Chart.Name }}
spec: spec:
scaleTargetRef: scaleTargetRef:
deploymentName: {{ .Chart.Name }} apiVersion: apps/v1
pollingInterval: 30 # Optional. Default: 30 seconds kind: Deployment
cooldownPeriod: 60 # Optional. Default: 300 seconds name: {{ .Chart.Name }}
minReplicaCount: 1 # Optional. Default: 0 minReplicas: 1
maxReplicaCount: 10 # Optional. Default: 100 maxReplicas: 10
triggers: metrics:
- type: cpu - type: Resource
metadata: resource:
type: Utilization name: cpu
value: "50" target:
- type: azure-servicebus type: Utilization
metadata: averageUtilization: 50
type: serviceBusTrigger \ No newline at end of file
direction: in
name: message
subscriptionName: {{ .Values.azure.servicebusSubscription }}
topicName: {{ .Values.azure.servicebusTopic }}
queueLength: {{ .Values.azure.queueLength }}
connection: SERVICE_BUS
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