Skip to content

Commit 9f58c38

Browse files
committed
Moving .k8s files to .k8s/backend folder, and add securityContext to postgres helm.
1 parent c285333 commit 9f58c38

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,15 @@ spec:
4949
httpGet:
5050
path: /actuator/health
5151
port: 8080
52-
periodSeconds: 20
52+
periodSeconds: 20
53+
54+
securityContext:
55+
allowPrivilegeEscalation: false
56+
runAsNonRoot: true
57+
runAsUser: 1000
58+
capabilities:
59+
drop:
60+
- ALL
61+
seccompProfile:
62+
type: RuntimeDefault
63+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: api-env
55
data:
66
SPRING_PROFILES_ACTIVE: "docker"
7-
SPRING_DATASOURCE_URL: "jdbc:postgresql://my-app-db:5432/people"
7+
SPRING_DATASOURCE_URL: "jdbc:postgresql://people-db:5432/people"
88
SPRING_DATASOURCE_USERNAME: "people"
99
SPRING_DATASOURCE_PASSWORD: "people"
1010
JAVA_OPTS: "-XX:+UseG1GC -XX:MaxRAMPercentage=75"

helm/postgres/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ spec:
6666
- -c
6767
- pg_isready -U "$(POSTGRES_USER:-postgres)"
6868
periodSeconds: 20
69+
securityContext:
70+
allowPrivilegeEscalation: false
6971
volumes:
7072
- name: {{ .Release.Name }}-storage
7173
persistentVolumeClaim:

0 commit comments

Comments
 (0)