- Add web Deployment/Service with nginx SPA on port 80 - Remove env generation from chart, use external ConfigMap (configMap.create=false) - Add SSH host key Secret injection for gitpod (/etc/ssh) - Fix ServiceMonitor to scrape /metrics uniformly for all services - Fix container names to be service-specific (gitdata/gitpod/gitsync/email/web) - Parameterize PVC claimName and data mountPath - Fix Ingress routing: / -> web, /api /socket.io -> gitdata - Add web to HPA/PDB support lists
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
{{- range $svcName := list "gitdata" "gitpod" "gitsync" "email" "web" }}
|
|
{{- $svcCfg := index $.Values $svcName }}
|
|
{{- $hpaCfg := index $.Values.autoscaling $svcName }}
|
|
{{- if and $svcCfg.enabled $hpaCfg.enabled }}
|
|
---
|
|
apiVersion: autoscaling/v2
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: {{ include "app.serviceFullname" (dict "root" $ "name" $svcName) }}
|
|
namespace: {{ include "app.namespace" $ }}
|
|
labels:
|
|
{{- include "app.serviceLabels" (dict "root" $ "name" $svcName) | nindent 4 }}
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: {{ include "app.serviceFullname" (dict "root" $ "name" $svcName) }}
|
|
minReplicas: {{ $hpaCfg.minReplicas }}
|
|
maxReplicas: {{ $hpaCfg.maxReplicas }}
|
|
metrics:
|
|
{{- if $hpaCfg.targetCPUUtilizationPercentage }}
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: {{ $hpaCfg.targetCPUUtilizationPercentage }}
|
|
{{- end }}
|
|
{{- if $hpaCfg.targetMemoryUtilizationPercentage }}
|
|
- type: Resource
|
|
resource:
|
|
name: memory
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: {{ $hpaCfg.targetMemoryUtilizationPercentage }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|