refactor(deploy): add SSH service annotations and externalTrafficPolicy support

This commit is contained in:
ZhenYi 2026-05-14 10:01:18 +08:00
parent 96ce6fde1c
commit 18b4864050
2 changed files with 12 additions and 2 deletions

View File

@ -5,10 +5,15 @@ metadata:
labels:
{{- include "deploy.labels" . | nindent 4 }}
app.kubernetes.io/component: gitserver
annotations:
{{- with .Values.services.gitserver.sshService.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: LoadBalancer
externalTrafficPolicy: Local
ports:
- port: {{ .Values.services.gitserver.ports.ssh }}
- port: 22
targetPort: ssh
protocol: TCP
name: ssh

View File

@ -87,6 +87,11 @@ services:
# SSH port must match the containerPort
extraEnv:
APP_SSH_PORT: "2222"
# SSH service config (MetalLB + Cilium)
# Shared IP: nginx ingress (80/443) + SSH (22) on same VIP
# Requires ingress-nginx svc also annotated with allow-shared-ip: "gitdata-shared"
sshService:
annotations: {}
resources:
requests:
cpu: 100m