blob: ea52c081c9868ece5e391153b0450af399237c51 [file] [log] [blame]
刘洪青47205852020-08-14 13:39:30 +08001# 2.authx-service-minio.yaml
2
3####################################################
4# minio
5# 文件服务器,对象存储
6####################################################
7
刘洪青a43a0082020-09-28 16:25:27 +08008# 手动初始化默认的图片
9#
刘洪青fa0a5a22020-10-14 16:11:43 +080010# 访问 https://authx-minio.paas.xxx.edu.cn
刘洪青a43a0082020-09-28 16:25:27 +080011# 登录 1y8N@8R@a_2u , 8pxlIe9#lN7Q
12# 创建 bucket:portrait,cas-server-site-ui
13# 将 portrait 目录下的 图片,上传到 portrait 中(此为用户的默认头像)
14# 将 cas-server-site-ui 目录下的 图片,上传到 cas-server-site-ui 中(此为认证登录界面上使用的图片,实际项目中,由UI进行设计后,替换)
15
16---
刘洪青47205852020-08-14 13:39:30 +080017apiVersion: v1
18kind: PersistentVolumeClaim
19metadata:
20 name: minio-data-pvc
21 namespace: authx-service
22spec:
23 accessModes:
24 - ReadWriteMany
25 # 根据情况修改
26 storageClassName: nfs-client
27 resources:
28 requests:
29 storage: 50Gi
30
31---
32apiVersion: v1
33kind: Secret
34metadata:
35 name: minio-env-secret
36 namespace: authx-service
37type: Opaque
38data:
39 # 修改 access_key,并使用 base64 工具进行编码
40 # 默认值:1y8N@8R@a_2u
41 MINIO_ACCESS_KEY: MXk4TkA4UkBhXzJ1
42 # 修改 secret_key,并使用 base64 工具进行编码
43 # 默认至:8pxlIe9#lN7Q
44 MINIO_SECRET_KEY: OHB4bEllOSNsTjdR
45
46
47---
48apiVersion: v1
49kind: Service
50metadata:
51 namespace: authx-service
52 name: minio-svc
53 labels:
54 app: minio
55spec:
56 ports:
57 - port: 9000
58 targetPort: http
59 protocol: TCP
60 name: http
61 selector:
62 app: minio
63---
64apiVersion: apps/v1
65kind: Deployment
66metadata:
67 namespace: authx-service
68 name: minio
69spec:
70 selector:
71 matchLabels:
72 app: minio
73 replicas: 1
74 template:
75 metadata:
76 labels:
77 app: minio
78 spec:
79 containers:
80 - name: minio
81 image: minio/minio:RELEASE.2020-04-23T00-58-49Z
82 imagePullPolicy: Always
83 args:
84 - "server"
85 - "/data"
86 ports:
87 - containerPort: 9000
88 name: http
89 envFrom:
90 - secretRef:
91 name: minio-env-secret
92 volumeMounts:
93 - mountPath: /data
94 name: minio-data
95 resources:
96 requests:
97 memory: "256Mi"
98 limits:
99 memory: "256Mi"
100 volumes:
101 - name: minio-data
102 persistentVolumeClaim:
103 claimName: minio-data-pvc
104
105
106# 该 ingress 配置可选,主要用于实施调试用
刘洪青d288d9c2020-09-07 12:21:47 +0800107---
108apiVersion: extensions/v1beta1
109kind: Ingress
110metadata:
111 name: minio-ingress
112 namespace: authx-service
刘洪青f3498be2020-10-12 16:22:44 +0800113 annotations:
114 nginx.ingress.kubernetes.io/proxy-body-size: 8m
刘洪青d288d9c2020-09-07 12:21:47 +0800115spec:
116 rules:
117 # 修改为学校的根域名
刘洪青fa0a5a22020-10-14 16:11:43 +0800118 - host: authx-minio.paas.xxx.edu.cn
刘洪青d288d9c2020-09-07 12:21:47 +0800119 http:
120 paths:
121 - path: /
122 backend:
123 serviceName: minio-svc
124 servicePort: http