Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgres: postgres:17-alpine + securityContext #19

Merged
merged 1 commit into from
Oct 15, 2024
Merged
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
18 changes: 16 additions & 2 deletions humanitec-resource-defs/postgres/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ statefulset.yaml:
labels:
app: {{ .init.name }}
spec:
automountServiceAccountToken: false
containers:
- name: {{ .init.name }}
image: postgres:15
image: postgres:17-alpine
env:
- name: POSTGRES_USER
value: {{ .init.user | quote }}
Expand All @@ -69,6 +70,19 @@ statefulset.yaml:
volumeMounts:
- name: {{ .init.name }}
mountPath: /var/lib/postgresql/data
securityContext:
runAsUser: 1000
runAsGroup: 1000
allowPrivilegeEscalation: false
privileged: false
capabilities:
drop:
- ALL
securityContext:
runAsNonRoot: true
fsGroup: 1000
seccompProfile:
type: RuntimeDefault
volumeClaimTemplates:
- metadata:
name: {{ .init.name }}
Expand All @@ -77,7 +91,7 @@ statefulset.yaml:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storage: 1Gi
service.yaml:
location: namespace
data:
Expand Down
Loading