PVC name is now immutable — hardcoded in all 4 deployment templates instead of being a configurable Helm value. Removed pvcName from values.yaml and --set pvcName from deploy.sh. This ensures the PVC can never be renamed or deleted by Helm operations, only manually via kubectl.
88 lines
2.8 KiB
YAML
88 lines
2.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "deploy.serviceFullname" (dict "root" . "svcKey" "gitserver") }}
|
|
labels:
|
|
{{- include "deploy.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: gitserver
|
|
spec:
|
|
replicas: {{ .Values.services.gitserver.replicaCount | default 1 }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "deploy.serviceSelectorLabels" (dict "root" . "svcKey" "gitserver") | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "deploy.labels" . | nindent 8 }}
|
|
app.kubernetes.io/component: gitserver
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "deploy.serviceAccountName" . }}
|
|
{{- with .Values.podSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: gitserver
|
|
{{- with .Values.securityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
image: "{{ .Values.imageRegistry }}/{{ .Values.services.gitserver.repository }}:{{ .Values.imageTag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.services.gitserver.ports.http }}
|
|
protocol: TCP
|
|
- name: ssh
|
|
containerPort: {{ .Values.services.gitserver.ports.ssh }}
|
|
protocol: TCP
|
|
envFrom:
|
|
- configMapRef:
|
|
name: {{ .Values.configMapName }}
|
|
{{- with .Values.services.gitserver.extraEnv }}
|
|
env:
|
|
{{- range $key, $val := . }}
|
|
- name: {{ $key }}
|
|
value: {{ $val | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 15
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
{{- with .Values.services.gitserver.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.services.gitserver.volumeMounts }}
|
|
volumeMounts:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: shared-data
|
|
persistentVolumeClaim:
|
|
claimName: shared-data
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }} |