Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions helm/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.podSecurityContext }}
podSecurityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: coder-logstream-kube
image: "{{ .Values.image.repo }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
14 changes: 13 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@ labels: {}

# securityContext -- Container-level security context
# See: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
securityContext: {}
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
allowPrivilegeEscalation: false
# Optional; enable after validation if the app never writes to disk:
# readOnlyRootFilesystem: true
#
# allowPrivilegeEscalation: false
# capabilities:
# drop:
Expand All @@ -101,3 +108,8 @@ securityContext: {}
# runAsNonRoot: true
# seccompProfile:
# type: RuntimeDefault

podSecurityContext: {}
# Optional, only if your cluster requires group ownership for mounted volumes:
# podSecurityContext:
# fsGroup: 65532
3 changes: 2 additions & 1 deletion scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM --platform=$BUILDPLATFORM scratch AS base
ARG TARGETARCH
COPY ./coder-logstream-kube-${TARGETARCH} /coder-logstream-kube
COPY --chmod=0555 ./coder-logstream-kube-${TARGETARCH} /coder-logstream-kube
USER 65532:65532
ENTRYPOINT ["/coder-logstream-kube"]
Loading