Skip to content

Commit

Permalink
Improvements db variables
Browse files Browse the repository at this point in the history
  • Loading branch information
mapeveri committed Feb 25, 2024
1 parent 565eb70 commit d483a77
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .k8s/REAMDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Getting started
3. Create secret


kubectl create secret generic languages-secret --from-literal=GOOGLE_CLIENT_ID=password --from-literal=POSTGRES_DATABASE=db --from-literal=POSTGRES_USER=user --from-literal=POSTGRES_PASSWORD=password
kubectl create secret generic languages-secret --from-literal=GOOGLE_CLIENT_ID=key --from-literal=POSTGRES_DATABASE=database --from-literal=POSTGRES_USER=user --from-literal=POSTGRES_PASSWORD=password --from-literal=POSTGRESQL_DB_URL=dbconnectionstring


4. Execute
Expand Down
5 changes: 5 additions & 0 deletions .k8s/app-consumer-events-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ spec:
secretKeyRef:
name: languages-secret
key: GOOGLE_CLIENT_ID
- name: POSTGRESQL_DB_URL
valueFrom:
secretKeyRef:
name: languages-secret
key: POSTGRESQL_DB_URL
volumeMounts:
- name: secret-volume
mountPath: /etc/languages/secret
Expand Down
5 changes: 5 additions & 0 deletions .k8s/app-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ spec:
secretKeyRef:
name: languages-secret
key: GOOGLE_CLIENT_ID
- name: POSTGRESQL_DB_URL
valueFrom:
secretKeyRef:
name: languages-secret
key: POSTGRESQL_DB_URL
volumeMounts:
- name: secret-volume
mountPath: /etc/languages/secret
Expand Down
5 changes: 0 additions & 5 deletions .k8s/config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ metadata:
data:
NODE_ENV: development
SERVER_PORT: "4000"
POSTGRES_USER: postgres
POSTGRES_PASSWORD: app123456
POSTGRES_DATABASE: languages
POSTGRES_HOST: db
POSTGRESQL_DB_URL: postgresql://postgres:app123456@db/languages
MONGO_DB_DATABASE: languages
MONGO_DB_URL: mongodb://mongo1:27017/languages?replicaSet=rs0&directConnection=true
JWT_SECRET: "45wef4we566dwdwgv.fi)__d"
Expand Down
3 changes: 3 additions & 0 deletions .k8s/db-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ spec:
volumeMounts:
- mountPath: /var/lib/postgresql/data/pgdata
name: db-claim0
- name: secret-volume
mountPath: /etc/languages/secret
readOnly: true
restartPolicy: Always
volumes:
- name: secret-volume
Expand Down

0 comments on commit d483a77

Please sign in to comment.