更新k8s deployment
This commit is contained in:
@@ -7,7 +7,7 @@ database:
|
|||||||
params: "charset=utf8mb4&parseTime=True&loc=Local"
|
params: "charset=utf8mb4&parseTime=True&loc=Local"
|
||||||
redis:
|
redis:
|
||||||
host: "localhost"
|
host: "localhost"
|
||||||
port: 6379
|
port: 30079
|
||||||
username: "default"
|
username: "default"
|
||||||
password: ""
|
password: ""
|
||||||
jwtsecret: "clka1af83af15vhyt8s652avre"
|
jwtsecret: "clka1af83af15vhyt8s652avre"
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ func Userkill(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 发送MQ消息(关键:发送失败需回滚Redis)
|
// 2. 发送MQ消息
|
||||||
msgSent := false
|
msgSent := false
|
||||||
defer func() {
|
defer func() {
|
||||||
// 若消息未发送成功,回滚Redis库存
|
// 若消息未发送成功,回滚Redis库存
|
||||||
|
|||||||
47
docker/minio/minio-deployment.yml
Normal file
47
docker/minio/minio-deployment.yml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: minio
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: minio
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: minio
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: minio
|
||||||
|
image: minio/minio:latest
|
||||||
|
args:
|
||||||
|
- server
|
||||||
|
- /storage
|
||||||
|
env:
|
||||||
|
- name: MINIO_ROOT_USER
|
||||||
|
value: "admin"
|
||||||
|
- name: MINIO_ROOT_PASSWORD
|
||||||
|
value: "password123"
|
||||||
|
ports:
|
||||||
|
- containerPort: 9000
|
||||||
|
- containerPort: 9001
|
||||||
|
volumeMounts:
|
||||||
|
- name: storage
|
||||||
|
mountPath: "/storage"
|
||||||
|
volumes:
|
||||||
|
- name: storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: minio-pvc
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: minio-service
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: minio
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 9000
|
||||||
|
targetPort: 9000
|
||||||
|
type: NodePort
|
||||||
10
docker/minio/minio-pvc.yml
Normal file
10
docker/minio/minio-pvc.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: minio-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
17
docker/minio/minio-service.yaml
Normal file
17
docker/minio/minio-service.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: minio-service
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: minio # 确保与 MinIO Pod 标签一致
|
||||||
|
ports:
|
||||||
|
- name: minio-api # 服务端口(用于 API 访问)
|
||||||
|
port: 9000
|
||||||
|
targetPort: 9000
|
||||||
|
nodePort: 32690 # 已有的 NodePort
|
||||||
|
- name: minio-console # 新增控制台端口
|
||||||
|
port: 9001
|
||||||
|
targetPort: 9001
|
||||||
|
nodePort: 32691 # 新增 NodePort(30000-32767 范围内选一个未占用的)
|
||||||
|
type: NodePort
|
||||||
Reference in New Issue
Block a user