Commit f4622d72 authored by Miklós Tóth's avatar Miklós Tóth 🤷
Browse files

improve helm chart

parent 05f70ff3
apiVersion: v2
name: matrix-aggregator
description: Helm chart for Matrix aggregator backend 2021
name: matrix-team-sync
description: Helm chart for QPA team syncing 2021
type: application
......
{{ $app := "mtrx-aggregator" }}
{{ $app := "mtrx-qpa-sync" }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: matrix-aggregator
name: matrix-qpa-sync
labels:
app: {{ $app }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
app: {{ $app }}
......@@ -38,6 +36,8 @@ spec:
envFrom:
- secretRef:
name: mtrx-redis
- secretRef:
name: authsch-cookie
livenessProbe:
httpGet:
path: /live
......
{{- if .Values.autoscaling.enabled }}
{{ $app := "mtrx-aggregator" }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: matrix-backend
labels:
app: {{ $app }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: matrix-aggregator
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
{{ if .Values.redis }}
apiVersion: v1
kind: Secret
metadata:
name: mtrx-redis
labels:
app: mtrx-aggregator
app: mtrx-qpa-sync
stringData:
REDIS: {{.Values.redis}}
AUTHSCH: "{49bf9076771e2631f68a1bc7833d0ed4:9d17b96b48ddd29bfbd0720f836bae0b6223cf77a%3A4%3A%7Bi%3A0%3Bs%3A11%3A%22mikewashere%22%3Bi%3A1%3Bs%3A11%3A%22mikewashere%22%3Bi%3A2%3Bi%3A2592000%3Bi%3A3%3Ba%3A1%3A%7Bs%3A11%3A%22internal_id%22%3Bs%3A36%3A%2234033625-3020-e612-13b9-fde6a8791cb0%22%3B%7D%7D}"
{{ end }}
\ No newline at end of file
{{ $app := "mtrx-aggregator" }}
{{ $app := "mtrx-qpa-sync" }}
apiVersion: v1
kind: Service
metadata:
name: matrix-aggregator
name: matrix-qpa-sync
labels:
app: {{$app}}
spec:
......
......@@ -12,13 +12,6 @@ resources:
cpu: "4"
memory: "1Gi"
autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 5
targetCPUUtilizationPercentage: 300
# targetMemoryUtilizationPercentage: 80
redis: "redis://default:password@redis-cluster-leader-headless:6379,redis-cluster-follower-headless:6379"
#redis: "redis://default:password@redis-cluster-leader-headless:6379,redis-cluster-follower-headless:6379"
prioClass: apps
\ No newline at end of file
Markdown is supported
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