Add namespace, secret for image registry, and prod configs
This commit is contained in:
@@ -2,6 +2,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: todo-backend
|
||||
namespace: todo-test
|
||||
labels:
|
||||
app: todo-backend
|
||||
spec:
|
||||
@@ -14,10 +15,12 @@ spec:
|
||||
labels:
|
||||
app: todo-backend
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: todo-registry-secret
|
||||
containers:
|
||||
- name: todo-backend
|
||||
image: todo-backend:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
image: ccr.ccs.tencentyun.com/todo-test/todo-backend:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
@@ -34,7 +37,7 @@ spec:
|
||||
- name: SPRING_DATASOURCE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: todo-secret
|
||||
name: todo-db-secret
|
||||
key: DATABASE_PASSWORD
|
||||
- name: SPRING_REDIS_HOST
|
||||
valueFrom:
|
||||
@@ -70,6 +73,7 @@ apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: todo-postgres
|
||||
namespace: todo-test
|
||||
labels:
|
||||
app: todo-postgres
|
||||
spec:
|
||||
@@ -99,7 +103,7 @@ spec:
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: todo-secret
|
||||
name: todo-db-secret
|
||||
key: DATABASE_PASSWORD
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
@@ -124,6 +128,7 @@ apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: todo-redis
|
||||
namespace: todo-test
|
||||
labels:
|
||||
app: todo-redis
|
||||
spec:
|
||||
@@ -142,7 +147,7 @@ spec:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
command: ["redis-server", "--requirepass", ""]
|
||||
command: ["redis-server"]
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
|
||||
@@ -2,6 +2,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: todo-backend
|
||||
namespace: todo-test
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
@@ -15,6 +16,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: todo-postgres
|
||||
namespace: todo-test
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
@@ -28,6 +30,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: todo-redis
|
||||
namespace: todo-test
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
|
||||
Reference in New Issue
Block a user