Skip to content

Commit 44de6f2

Browse files
authored
set readOnlyRootFilesystem: true for workloads (#2018)
Signed-off-by: Joe Lanford <[email protected]>
1 parent 061b107 commit 44de6f2

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.tilt-support

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ COPY {} /
6767
live_update=[
6868
sync('.tiltbuild/bin/{}'.format(binary_name), '/{}'.format(binary_name)),
6969
],
70+
restart_file="/.tilt_restart_proc",
7071
# The command to run in the container.
7172
entrypoint=entrypoint,
7273
)

config/base/catalogd/manager/manager.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@ spec:
5252
volumeMounts:
5353
- name: cache
5454
mountPath: /var/cache/
55+
- name: tmp
56+
mountPath: /tmp
5557
securityContext:
5658
allowPrivilegeEscalation: false
59+
readOnlyRootFilesystem: true
5760
capabilities:
5861
drop:
5962
- ALL
@@ -80,3 +83,5 @@ spec:
8083
volumes:
8184
- name: cache
8285
emptyDir: {}
86+
- name: tmp
87+
emptyDir: {}

config/base/operator-controller/manager/manager.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@ spec:
5252
volumeMounts:
5353
- name: cache
5454
mountPath: /var/cache
55+
- name: tmp
56+
mountPath: /tmp
5557
securityContext:
5658
allowPrivilegeEscalation: false
59+
readOnlyRootFilesystem: true
5760
capabilities:
5861
drop:
5962
- "ALL"
@@ -69,8 +72,6 @@ spec:
6972
port: 8081
7073
initialDelaySeconds: 5
7174
periodSeconds: 10
72-
# TODO(user): Configure the resources accordingly based on the project requirements.
73-
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
7475
resources:
7576
requests:
7677
cpu: 10m
@@ -81,3 +82,5 @@ spec:
8182
volumes:
8283
- name: cache
8384
emptyDir: {}
85+
- name: tmp
86+
emptyDir: { }

0 commit comments

Comments
 (0)