refactor: simplify k8s config by using direct env vars instead of secrets
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 1m24s
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 1m24s
This commit is contained in:
parent
637c479818
commit
704e9b1a83
@ -21,25 +21,17 @@ spec:
|
|||||||
ports:
|
ports:
|
||||||
- containerPort: 8002
|
- containerPort: 8002
|
||||||
env:
|
env:
|
||||||
|
# PostgreSQL Database
|
||||||
- name: DB_HOST
|
- name: DB_HOST
|
||||||
valueFrom:
|
value: "pgm-7xv4811oj11j86htzo.pg.rds.aliyuncs.com"
|
||||||
secretKeyRef:
|
|
||||||
name: log-center-secrets
|
|
||||||
key: db-host
|
|
||||||
- name: DB_PORT
|
- name: DB_PORT
|
||||||
value: "5432"
|
value: "5432"
|
||||||
- name: DB_NAME
|
- name: DB_NAME
|
||||||
value: "log_center"
|
value: "log_center"
|
||||||
- name: DB_USER
|
- name: DB_USER
|
||||||
valueFrom:
|
value: "log_center"
|
||||||
secretKeyRef:
|
|
||||||
name: log-center-secrets
|
|
||||||
key: db-user
|
|
||||||
- name: DB_PASSWORD
|
- name: DB_PASSWORD
|
||||||
valueFrom:
|
value: "JogNQdtrd3WY8CBCAiYfYEGx"
|
||||||
secretKeyRef:
|
|
||||||
name: log-center-secrets
|
|
||||||
key: db-password
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "128Mi"
|
memory: "128Mi"
|
||||||
|
|||||||
@ -1,19 +0,0 @@
|
|||||||
# K8s Secret for Log Center database credentials
|
|
||||||
# Apply this ONCE before first deployment:
|
|
||||||
# kubectl apply -f k8s/secrets.yaml
|
|
||||||
#
|
|
||||||
# You can also create it with kubectl directly:
|
|
||||||
# kubectl create secret generic log-center-secrets \
|
|
||||||
# --from-literal=db-host=pgm-7xv4811oj11j86htzo.pg.rds.aliyuncs.com \
|
|
||||||
# --from-literal=db-user=log_center \
|
|
||||||
# --from-literal=db-password=JogNQdtrd3WY8CBCAiYfYEGx
|
|
||||||
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: log-center-secrets
|
|
||||||
type: Opaque
|
|
||||||
stringData:
|
|
||||||
db-host: pgm-7xv4811oj11j86htzo.pg.rds.aliyuncs.com
|
|
||||||
db-user: log_center
|
|
||||||
db-password: JogNQdtrd3WY8CBCAiYfYEGx
|
|
||||||
Loading…
x
Reference in New Issue
Block a user