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:
|
||||
- containerPort: 8002
|
||||
env:
|
||||
# PostgreSQL Database
|
||||
- name: DB_HOST
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: log-center-secrets
|
||||
key: db-host
|
||||
value: "pgm-7xv4811oj11j86htzo.pg.rds.aliyuncs.com"
|
||||
- name: DB_PORT
|
||||
value: "5432"
|
||||
- name: DB_NAME
|
||||
value: "log_center"
|
||||
- name: DB_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: log-center-secrets
|
||||
key: db-user
|
||||
value: "log_center"
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: log-center-secrets
|
||||
key: db-password
|
||||
value: "JogNQdtrd3WY8CBCAiYfYEGx"
|
||||
resources:
|
||||
requests:
|
||||
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