Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 4 additions & 0 deletions charts/collab/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ spec:
name: codetogether-runtime
- mountPath: /tmp
name: codetogether-tmp
- mountPath: /var/log/nginx
name: codetogether-runtime
- mountPath: /var/cache/nginx
name: codetogether-runtime
{{- if .Values.favicon.enabled }}
- mountPath: /opt/volatile-template/nginx/favicon.ico
name: favicon-volume
Expand Down
6 changes: 3 additions & 3 deletions charts/collab/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,13 @@ serviceAccount:

podAnnotations: {}

securityContext: {}
securityContext:
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
readOnlyRootFilesystem: true
Comment thread
danc094codetogether marked this conversation as resolved.
Outdated
runAsUser: 0
Comment thread
danc094codetogether marked this conversation as resolved.
Outdated

readinessProbe:
initialDelaySeconds: 60
Expand Down
35 changes: 35 additions & 0 deletions charts/intel/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ spec:
imagePullSecrets:
- name: {{ include "codetogether.fullname" . }}-pull-secret
{{- end }}
{{- if .Values.readOnlyMode.enabled }}
initContainers:
- name: prepare-ro
image: busybox:latest
securityContext:
runAsUser: 0
command: ["sh", "-lc", "mkdir -p /mnt/volatile/var-log-nginx /mnt/volatile/var-cache-nginx /mnt/var/log-codetogether || true"]
volumeMounts:
- name: volatile
mountPath: /mnt/volatile
{{- end }}
serviceAccountName: {{ include "codetogether.serviceAccountName" . }}
containers:
- name: {{ .Chart.Name }}
Expand Down Expand Up @@ -108,6 +119,20 @@ spec:
mountPath: /etc/ssl/certs/java/cacerts
subPath: cacerts
{{- end }}
{{- if .Values.readOnlyMode.enabled }}
- name: volatile
mountPath: /run/volatile
- name: run
mountPath: /run
- name: tmp
mountPath: /tmp
- name: volatile
mountPath: /var/log/nginx
subPath: var-log-nginx
- name: volatile
mountPath: /var/cache/nginx
subPath: var-cache-nginx
{{- end }}
ports:
- name: http
containerPort: 1080
Expand Down Expand Up @@ -156,6 +181,16 @@ spec:
secret:
secretName: {{ .Values.java.customCacerts.cacertsSecretName }}
{{- end }}
{{- if .Values.readOnlyMode.enabled }}
- name: volatile
emptyDir: {}
- name: run
emptyDir:
medium: Memory
- name: tmp
emptyDir:
medium: Memory
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
9 changes: 7 additions & 2 deletions charts/intel/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,13 @@ serviceAccount:

podAnnotations: {}

securityContext: {}
securityContext:

# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
readOnlyRootFilesystem: true
runAsUser: 0
# runAsNonRoot: true
# runAsUser: 1000

Expand Down Expand Up @@ -179,3 +181,6 @@ tolerations: []
affinity: {}

replicaCount: 1

readOnlyMode:
enabled: true
Comment thread
danc094codetogether marked this conversation as resolved.
Outdated
Loading