Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ WORKDIR /app

COPY --from=builder /app/control-plane .

# OpenShift runs arbitrary UIDs in group 0; g+rwX keeps /app usable.
RUN chown -R 1001:0 /app && chmod -R g+rwX /app

USER 1001

EXPOSE 8080

ENTRYPOINT ["./control-plane"]
2 changes: 2 additions & 0 deletions deploy/helm/dcm/templates/control-plane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ spec:
containers:
- name: control-plane
image: "{{ .Values.controlPlane.image }}:{{ include "dcm.imageTag" (dict "tag" .Values.controlPlane.tag "global" .Values.global) }}"
securityContext:
{{- toYaml .Values.controlPlane.securityContext | nindent 12 }}
ports:
- containerPort: 8080
protocol: TCP
Expand Down
7 changes: 7 additions & 0 deletions deploy/helm/dcm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ nats:
controlPlane:
image: quay.io/dcm-project/control-plane
tag: "" # defaults to global.imageTag
securityContext:
runAsNonRoot: true
runAsUser: 1001
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
route:
enabled: true
host: "" # leave empty for auto-generated OpenShift hostname
Expand Down