76 lines
2.3 KiB
YAML
76 lines
2.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "gitea-reports.fullname" . }}
|
|
labels:
|
|
{{- include "gitea-reports.componentLabels" . | nindent 4 }}
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
{{- include "gitea-reports.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "gitea-reports.componentLabels" . | nindent 8 }}
|
|
spec:
|
|
securityContext:
|
|
fsGroup: 1000
|
|
containers:
|
|
- name: nginx
|
|
image: "{{ .Values.nginx.image }}:{{ .Values.nginx.tag }}"
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: http-read
|
|
containerPort: {{ .Values.nginx.port }}
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- name: nginx-conf
|
|
mountPath: /etc/nginx/conf.d
|
|
readOnly: true
|
|
{{- if .Values.persistence.enabled }}
|
|
- name: data
|
|
mountPath: /app/data
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.nginx.resources | nindent 12 }}
|
|
- name: upload
|
|
image: "{{ .Values.upload.image }}:{{ .Values.upload.tag }}"
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- python3
|
|
- /upload/upload-server.py
|
|
ports:
|
|
- name: http-write
|
|
containerPort: {{ .Values.upload.port }}
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- name: upload-script
|
|
mountPath: /upload
|
|
readOnly: true
|
|
{{- if .Values.persistence.enabled }}
|
|
- name: data
|
|
mountPath: /app/data
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.upload.resources | nindent 12 }}
|
|
volumes:
|
|
- name: nginx-conf
|
|
configMap:
|
|
name: {{ include "gitea-reports.fullname" . }}-config
|
|
items:
|
|
- key: default.conf
|
|
path: default.conf
|
|
- name: upload-script
|
|
configMap:
|
|
name: {{ include "gitea-reports.fullname" . }}-config
|
|
defaultMode: 0755
|
|
items:
|
|
- key: upload-server.py
|
|
path: upload-server.py
|
|
{{- if .Values.persistence.enabled }}
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "gitea-reports.fullname" . }}-data
|
|
{{- end }}
|