gcloud-lab/trading-platform/deploy/helm/api-gateway/templates/hpa.yaml
Sirius Devops d079d1239f feat: add trading platform K8s deployment infrastructure
- Add Helm chart with 19 templates (Deployments, Services, Ingress,
  ConfigMaps, Secrets, NetworkPolicy, cert-manager)
- Add Dockerfiles for 4 microservices (dashboard, data-service,
  execute-service, news-service)
- Add CI/CD workflows (build-test, build-push, deploy)
- Add raw K8s manifests, per-service Helm charts, and deploy scripts
- Add SOPS-encrypted secrets template and config
- Configure deployment to customer1 namespace
- Include infrastructure components: PostgreSQL, Redis, Kafka
2026-05-17 22:15:00 +00:00

32 lines
1,003 B
YAML

{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "api-gateway.fullname" . }}
labels:
{{- include "api-gateway.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "api-gateway.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}