Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.

Commit 1c6d26d

Browse files
pratap0007tekton-robot
authored andcommitted
config: set readOnlyRootFilesystem on Database container
readOnlyRootFilesystem prevents writing to any part of the container’s root filesystem, not just the root directory (/) Signed-off-by: Shiv Verma <shverma@redhat.com>
1 parent 3ef9b2f commit 1c6d26d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

config/00-init/03-db-deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ spec:
4949
protocol: TCP
5050
securityContext:
5151
allowPrivilegeEscalation: false
52+
readOnlyRootFilesystem: true
5253
runAsUser: 65532
5354
capabilities:
5455
drop:
@@ -74,6 +75,10 @@ spec:
7475
volumeMounts:
7576
- name: tekton-hub-db
7677
mountPath: /var/lib/postgresql/data
78+
- name: pg-run
79+
mountPath: /var/run/postgresql
80+
- name: pg-tmp
81+
mountPath: /tmp
7782
readinessProbe:
7883
exec:
7984
command: [bash, -c, "psql -w -U ${POSTGRES_USER} -d ${POSTGRES_DB} -c 'SELECT 1'"]
@@ -90,4 +95,8 @@ spec:
9095
- name: tekton-hub-db
9196
persistentVolumeClaim:
9297
claimName: tekton-hub-db
98+
- name: pg-run
99+
emptyDir: {}
100+
- name: pg-tmp
101+
emptyDir: {}
93102
restartPolicy: Always

0 commit comments

Comments
 (0)