all-in-one/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-deployment.yaml
Simon L. cf6adc1075 helm: refactor securityContext to support restricted pod security standard
Signed-off-by: Simon L. <szaimen@e.mail.de>
2024-11-21 22:16:00 +01:00

76 lines
2.5 KiB
YAML
Executable file

{{- if eq .Values.TALK_ENABLED "yes" }}
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -c -f latest.yml --namespace "{{ .Values.NAMESPACE }}"
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: nextcloud-aio-talk
name: nextcloud-aio-talk
namespace: "{{ .Values.NAMESPACE }}"
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: nextcloud-aio-talk
template:
metadata:
annotations:
kompose.cmd: kompose convert -c -f latest.yml --namespace "{{ .Values.NAMESPACE }}"
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: nextcloud-aio-talk
spec:
securityContext:
# The items below only work in pod context
fsGroup: 1000
fsGroupChangePolicy: "OnRootMismatch"
# The items below work in both contexts
runAsUser: 1000
runAsGroup: 1000
runAsNonRoot: true
{{- if eq .Values.RPSS_ENABLED "yes" }}
seccompProfile:
type: RuntimeDefault
{{- end }}
containers:
- env:
- name: TALK_MAX_STREAM_BITRATE
value: "{{ .Values.TALK_MAX_STREAM_BITRATE }}"
- name: TALK_MAX_SCREEN_BITRATE
value: "{{ .Values.TALK_MAX_SCREEN_BITRATE }}"
- name: INTERNAL_SECRET
value: "{{ .Values.TALK_INTERNAL_SECRET }}"
- name: NC_DOMAIN
value: "{{ .Values.NC_DOMAIN }}"
- name: SIGNALING_SECRET
value: "{{ .Values.SIGNALING_SECRET }}"
- name: TALK_HOST
value: nextcloud-aio-talk
- name: TALK_PORT
value: "{{ .Values.TALK_PORT }}"
- name: TURN_SECRET
value: "{{ .Values.TURN_SECRET }}"
- name: TZ
value: "{{ .Values.TIMEZONE }}"
image: nextcloud/aio-talk:20241106_101604
name: nextcloud-aio-talk
ports:
- containerPort: {{ .Values.TALK_PORT }}
protocol: TCP
- containerPort: {{ .Values.TALK_PORT }}
protocol: UDP
- containerPort: 8081
protocol: TCP
securityContext:
# The items below only work in container context
allowPrivilegeEscalation: false
capabilities:
{{- if eq .Values.RPSS_ENABLED "yes" }}
drop: ["ALL"]
{{- else }}
drop: ["NET_RAW"]
{{- end }}
add: ["NET_BIND_SERVICE"]
{{- end }}