all-in-one/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-deployment.yaml
Simon L. 45f8049548 adjust start-period and retries for fts, collabora and clamav
Signed-off-by: Simon L. <szaimen@e.mail.de>
2024-12-16 13:45:22 +01:00

104 lines
3.1 KiB
YAML
Executable file

{{- if eq .Values.CLAMAV_ENABLED "yes" }}
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.version: 1.35.0 (9532ceef3)
labels:
io.kompose.service: nextcloud-aio-clamav
name: nextcloud-aio-clamav
namespace: "{{ .Values.NAMESPACE }}"
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: nextcloud-aio-clamav
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.version: 1.35.0 (9532ceef3)
labels:
io.kompose.service: nextcloud-aio-clamav
spec:
securityContext:
# The items below only work in pod context
fsGroup: 100
fsGroupChangePolicy: "OnRootMismatch"
# The items below work in both contexts
runAsUser: 100
runAsGroup: 100
runAsNonRoot: true
{{- if eq (.Values.RPSS_ENABLED | default "no") "yes" }}
seccompProfile:
type: RuntimeDefault
{{- end }}
initContainers:
- name: init-subpath
image: "alpine:3.20"
command:
- mkdir
- "-p"
- /nextcloud-aio-clamav/data
volumeMounts:
- name: nextcloud-aio-clamav
mountPath: /nextcloud-aio-clamav
securityContext:
# The items below only work in container context
allowPrivilegeEscalation: false
capabilities:
{{- if eq (.Values.RPSS_ENABLED | default "no") "yes" }}
drop: ["ALL"]
{{- else }}
drop: ["NET_RAW"]
{{- end }}
add: ["NET_BIND_SERVICE"]
containers:
- env:
- name: CLAMD_STARTUP_TIMEOUT
value: "90"
- name: MAX_SIZE
value: "{{ .Values.NEXTCLOUD_UPLOAD_LIMIT }}"
- name: TZ
value: "{{ .Values.TIMEZONE }}"
image: nextcloud/aio-clamav:20241216_102930
readinessProbe:
exec:
command:
- clamdcheck.sh
failureThreshold: 9
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 30
livenessProbe:
exec:
command:
- clamdcheck.sh
failureThreshold: 9
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 30
name: nextcloud-aio-clamav
ports:
- containerPort: 3310
protocol: TCP
securityContext:
# The items below only work in container context
allowPrivilegeEscalation: false
capabilities:
{{- if eq (.Values.RPSS_ENABLED | default "no") "yes" }}
drop: ["ALL"]
{{- else }}
drop: ["NET_RAW"]
{{- end }}
add: ["NET_BIND_SERVICE"]
volumeMounts:
- mountPath: /var/lib/clamav
subPath: data
name: nextcloud-aio-clamav
volumes:
- name: nextcloud-aio-clamav
persistentVolumeClaim:
claimName: nextcloud-aio-clamav
{{- end }}