feat(websocket): fix labels and port and remove security contexts

This commit is contained in:
jyje 2025-01-07 22:27:29 +09:00
parent added76a4c
commit 9b13a7e2af
No known key found for this signature in database
GPG Key ID: CFEECE847750DA12
2 changed files with 15 additions and 9 deletions

View File

@ -16,25 +16,27 @@ metadata:
spec: spec:
selector: selector:
matchLabels: matchLabels:
{{- include "websocket.redis.selectorLabels" . | nindent 4 }} {{- include "websocket.redis.selectorLabels" . | nindent 6 }}
template: template:
metadata: metadata:
labels: labels:
{{- include "websocket.redis.labels" . | nindent 4 }} {{- include "websocket.redis.labels" . | nindent 8 }}
spec: spec:
containers: containers:
- name: {{ .Values.websocket.redis.name }} - name: {{ .Values.websocket.redis.name }}
image: "{{ .Values.websocket.redis.image.repository }}:{{ .Values.websocket.redis.image.tag }}" image: "{{ .Values.websocket.redis.image.repository }}:{{ .Values.websocket.redis.image.tag }}"
imagePullPolicy: {{ .Values.websocket.redis.image.pullPolicy }} imagePullPolicy: {{ .Values.websocket.redis.image.pullPolicy }}
{{- with .Values.websocket.redis.command }}
command:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.websocket.redis.args }}
args:
{{- toYaml . | nindent 10 }}
{{- end }}
ports: ports:
- name: http - name: http
containerPort: {{ .Values.websocket.redis.port }} containerPort: {{ .Values.websocket.redis.service.containerPort }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service

View File

@ -54,6 +54,10 @@ websocket:
repository: redis repository: redis
tag: 7.4.2-alpine3.21 tag: 7.4.2-alpine3.21
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# -- Redis command
command: []
# -- Redis arguments
args: []
# -- Redis service # -- Redis service
service: service:
# -- Redis container/target port # -- Redis container/target port