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
2 changes: 1 addition & 1 deletion k8s/backend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
Expand Down
25 changes: 22 additions & 3 deletions k8s/backend-migrate-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,32 @@ spec:
app.kubernetes.io/part-of: app
spec:
restartPolicy: Never
serviceAccountName: backend
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
seccompProfile:
type: RuntimeDefault
containers:
- name: migrate
image: ghcr.io/example/backend:latest
command: ["./migrate"]
image: backend-migrate
command: ["./node_modules/.bin/drizzle-kit", "migrate"]
env:
- name: HOME
value: /tmp
- name: XDG_CACHE_HOME
value: /tmp
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: [ALL]
envFrom:
- secretRef:
name: backend-secrets
name: backend-secret
resources:
requests:
cpu: 100m
Expand Down
Loading