Commit 8065cee7 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'feat/context-performance-scalability' into 'develop'

Context Performance Scalability

See merge request !81
parents be7ab5e3 a1d411e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ function nats_deploy_single() {
        echo ">>> NATS is present; skipping step."
    else
        echo ">>> Deploy NATS"
        helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image.tag=2.9-alpine
        helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image=nats:2.9-alpine

        echo ">>> Waiting NATS statefulset to be created..."
        while ! kubectl get --namespace ${NATS_NAMESPACE} statefulset/${NATS_NAMESPACE} &> /dev/null; do
+26 −4
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ spec:
  selector:
    matchLabels:
      app: contextservice
  replicas: 1
  #replicas: 1
  template:
    metadata:
      labels:
@@ -52,11 +52,11 @@ spec:
            command: ["/bin/grpc_health_probe", "-addr=:1010"]
        resources:
          requests:
            cpu: 50m
            cpu: 75m
            memory: 64Mi
          limits:
            cpu: 500m
            memory: 512Mi
            cpu: 100m
            memory: 128Mi
---
apiVersion: v1
kind: Service
@@ -77,3 +77,25 @@ spec:
    protocol: TCP
    port: 9192
    targetPort: 9192
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: contextservice-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: contextservice
  minReplicas: 1
  maxReplicas: 20
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 80
  #behavior:
  #  scaleDown:
  #    stabilizationWindowSeconds: 30
+3 −3
Original line number Diff line number Diff line
@@ -45,11 +45,11 @@ spec:
            command: ["/bin/grpc_health_probe", "-addr=:2020"]
        resources:
          requests:
            cpu: 50m
            cpu: 128m
            memory: 64Mi
          limits:
            cpu: 500m
            memory: 512Mi
            cpu: 256m
            memory: 128Mi
---
apiVersion: v1
kind: Service
+3 −3
Original line number Diff line number Diff line
@@ -44,11 +44,11 @@ spec:
            command: ["/bin/grpc_health_probe", "-addr=:50052"]
        resources:
          requests:
            cpu: 50m
            cpu: 256m
            memory: 64Mi
          limits:
            cpu: 500m
            memory: 512Mi
            cpu: 512m
            memory: 128Mi
---
apiVersion: v1
kind: Service
+25 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ spec:
  selector:
    matchLabels:
      app: pathcompservice
  replicas: 1
  #replicas: 1
  template:
    metadata:
      labels:
@@ -53,6 +53,8 @@ spec:
      - name: backend
        image: labs.etsi.org:5050/tfs/controller/pathcomp-backend:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 8081
        #readinessProbe:
        #  httpGet:
        #    path: /health
@@ -96,3 +98,25 @@ spec:
    protocol: TCP
    port: 9192
    targetPort: 9192
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: pathcompservice-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: pathcompservice
  minReplicas: 1
  maxReplicas: 20
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 80
  #behavior:
  #  scaleDown:
  #    stabilizationWindowSeconds: 30
Loading