Skip to content

Commit 0396895

Browse files
authored
[postgres] make postgres run on openshift (CloudPirates-io#184)
make postgres run on openshift
1 parent d850b7b commit 0396895

File tree

5 files changed

+22
-24
lines changed

5 files changed

+22
-24
lines changed

charts/postgres/Chart.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies:
22
- name: common
33
repository: oci://registry-1.docker.io/cloudpirates
4-
version: 1.0.0
5-
digest: sha256:4dc4489391e65614af4cd64d56a213e353a7a70b231faf64c584779774304d96
6-
generated: "2025-08-14T12:32:38.1323+02:00"
4+
version: 1.1.1
5+
digest: sha256:8da3c04e2c4a1ebfff4f21936399938e0f3fcf9fbd2f7135e7e907ce725b8f00
6+
generated: "2025-09-29T21:42:58.149716+02:00"

charts/postgres/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: postgres
33
description: The World's Most Advanced Open Source Relational Database
44
type: application
5-
version: 0.6.1
5+
version: 0.7.0
66
appVersion: "18.0"
77
keywords:
88
- postgres

charts/postgres/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ The following table lists the configurable parameters of the PostgreSQL chart an
9696

9797
### Security Context
9898

99-
| Parameter | Description | Default |
100-
| ------------------------------------------ | ------------------------------------------------- | --------- |
101-
| `podSecurityContext.fsGroup` | Group ID for the volumes of the pod | `999` |
102-
| `securityContext.allowPrivilegeEscalation` | Enable container privilege escalation | `false` |
103-
| `securityContext.runAsNonRoot` | Configure the container to run as a non-root user | `true` |
104-
| `securityContext.runAsUser` | User ID for the PostgreSQL container | `999` |
105-
| `securityContext.runAsGroup` | Group ID for the PostgreSQL container | `999` |
106-
| `securityContext.readOnlyRootFilesystem` | Mount container root filesystem as read-only | `false` |
107-
| `securityContext.capabilities.drop` | Linux capabilities to be dropped | `["ALL"]` |
99+
| Parameter | Description | Default |
100+
| --------------------------------------------------- | ------------------------------------------------- | --------- |
101+
| `podSecurityContext.fsGroup` | Group ID for the volumes of the pod | `999` |
102+
| `containerSecurityContext.allowPrivilegeEscalation` | Enable container privilege escalation | `false` |
103+
| `containerSecurityContext.runAsNonRoot` | Configure the container to run as a non-root user | `true` |
104+
| `containerSecurityContext.runAsUser` | User ID for the PostgreSQL container | `999` |
105+
| `containerSecurityContext.runAsGroup` | Group ID for the PostgreSQL container | `999` |
106+
| `containerSecurityContext.readOnlyRootFilesystem` | Mount container root filesystem as read-only | `false` |
107+
| `containerSecurityContext.capabilities.drop` | Linux capabilities to be dropped | `["ALL"]` |
108108

109109
### PostgreSQL Authentication
110110

charts/postgres/templates/statefulset.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ spec:
3434
{{- with (include "postgres.imagePullSecrets" .) }}
3535
{{ . | nindent 6 }}
3636
{{- end }}
37-
securityContext:
38-
{{- toYaml .Values.podSecurityContext | nindent 8 }}
37+
securityContext: {{ include "common.renderPodSecurityContext" . | nindent 8 }}
3938
containers:
4039
- name: {{ .Chart.Name }}
41-
securityContext:
42-
{{- toYaml .Values.securityContext | nindent 12 }}
40+
securityContext: {{ include "common.renderContainerSecurityContext" . | nindent 12 }}
4341
image: {{ include "postgres.image" . }}
4442
imagePullPolicy: {{ .Values.image.imagePullPolicy }}
4543
args:

charts/postgres/values.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ podSecurityContext:
4141
## @param podSecurityContext.fsGroup Group ID for the volumes of the pod
4242
fsGroup: 999
4343

44-
securityContext:
45-
## @param securityContext.allowPrivilegeEscalation Enable container privilege escalation
44+
containerSecurityContext:
45+
## @param containerSecurityContext.allowPrivilegeEscalation Enable container privilege escalation
4646
allowPrivilegeEscalation: false
47-
## @param securityContext.runAsNonRoot Configure the container to run as a non-root user
47+
## @param containerSecurityContext.runAsNonRoot Configure the container to run as a non-root user
4848
runAsNonRoot: true
49-
## @param securityContext.runAsUser User ID for the PostgreSQL container
49+
## @param containerSecurityContext.runAsUser User ID for the PostgreSQL container
5050
runAsUser: 999
51-
## @param securityContext.runAsGroup Group ID for the PostgreSQL container
51+
## @param containerSecurityContext.runAsGroup Group ID for the PostgreSQL container
5252
runAsGroup: 999
53-
## @param securityContext.readOnlyRootFilesystem Mount container root filesystem as read-only
53+
## @param containerSecurityContext.readOnlyRootFilesystem Mount container root filesystem as read-only
5454
readOnlyRootFilesystem: false
55-
## @param securityContext.capabilities.drop Linux capabilities to be dropped
55+
## @param containerSecurityContext.capabilities.drop Linux capabilities to be dropped
5656
capabilities:
5757
drop:
5858
- ALL

0 commit comments

Comments
 (0)