gitdataai/deploy/templates/gingress/deployment.yaml
ZhenYi 7148c8fd39 feat(gingress): add Git UA routing and convert gingress to Helm templates
- Route requests with git/JGit User-Agent directly to gitserver backend
- Parse gingress.io/git-backend annotation (format: namespace/name:port)
- Convert static gingress YAML to Helm templates under deploy/templates/gingress/
- Add gingress config block to values.yaml (namespace, replicas, ports, resources)
2026-05-10 22:47:18 +08:00

69 lines
2.3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: gingress-controller
namespace: {{ .Values.gingress.namespace | default "gingress-system" }}
labels:
app: gingress
spec:
replicas: {{ .Values.gingress.replicaCount | default 2 }}
selector:
matchLabels:
app: gingress
template:
metadata:
labels:
app: gingress
spec:
serviceAccountName: gingress-controller
containers:
- name: gingress
image: "{{ .Values.imageRegistry }}/{{ .Values.gingress.repository }}:{{ .Values.imageTag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.gingress.imagePullPolicy | default "IfNotPresent" }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
args:
- "--ingress-class=gingress"
- "--bind-http=0.0.0.0:{{ .Values.gingress.httpPort | default 80 }}"
- "--bind-https=0.0.0.0:{{ .Values.gingress.httpsPort | default 443 }}"
- "--metrics-bind=0.0.0.0:8080"
ports:
- name: http
containerPort: {{ .Values.gingress.httpPort | default 80 }}
protocol: TCP
- name: https
containerPort: {{ .Values.gingress.httpsPort | default 443 }}
protocol: TCP
- name: metrics
containerPort: 8080
protocol: TCP
env:
- name: RUST_LOG
value: {{ .Values.gingress.logLevel | default "info" | quote }}
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /readyz
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
{{- with .Values.gingress.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: gingress
topologyKey: kubernetes.io/hostname