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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:

- name: Apply Kubernetes manifests
run: |
kubectl apply -f k8s/db_secret.yaml
kubectl apply -f k8s/db_deployment.yaml
kubectl apply -f k8s/db_config.yaml
kubectl apply -f k8s/db_service.yaml
Expand Down
8 changes: 8 additions & 0 deletions k8s/db_secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: db-secret

type: Opaque
data:
SPRING_DATASOURCE_PASSWORD: cGFzc3dvcmQ=
7 changes: 5 additions & 2 deletions k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ spec:
envFrom:
- configMapRef:
name: db-config
- configMapRef:
name: db-secret
env:
- name: SECURITY_JWT_SECRET
valueFrom:
secretKeyRef:
name: security-secret
key: jwt-secret
- name: DATASOURCE_PASSWORD
valueFrom:
secretKeyRef:
name: db-secret
key: SPRING_DATASOURCE_PASSWORD
readinessProbe:
httpGet:
path: /actuator/health
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ spring:
datasource:
url: ${SPRING_DATASOURCE_URL}/security_db
username: ${SPRING_DATASOURCE_USERNAME}
password: ${SPRING_DATASOURCE_PASSWORD}
password: ${DATASOURCE_PASSWORD}
driver-class-name: org.postgresql.Driver

jpa:
Expand Down