This commit is contained in:
2025-07-12 15:25:26 +08:00
commit de2ab4d182
278 changed files with 34453 additions and 0 deletions

6
scripts/Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM alpine
COPY ./go-admin /
EXPOSE 8000
CMD ["/go-admin","server","-c", "/config/settings.yml"]

57
scripts/k8s/deploy.yml Normal file
View File

@ -0,0 +1,57 @@
---
apiVersion: v1
kind: Service
metadata:
name: go-admin
labels:
app: go-admin
service: go-admin
spec:
ports:
- port: 8000
name: http
protocol: TCP
selector:
app: go-admin
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: go-admin-v1
labels:
app: go-admin
version: v1
spec:
replicas: 1
selector:
matchLabels:
app: go-admin
version: v1
template:
metadata:
labels:
app: go-admin
version: v1
spec:
containers:
- name: go-admin
image: registry.cn-shanghai.aliyuncs.com/go-admin-team/go-admin
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8000
volumeMounts:
- name: go-admin
mountPath: /temp
- name: go-admin
mountPath: /static
- name: go-admin-config
mountPath: /config/
readOnly: true
volumes:
- name: go-admin
persistentVolumeClaim:
claimName: go-admin
- name: go-admin-config
configMap:
name: settings-admin
---

3
scripts/k8s/prerun.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
kubectl create ns go-admin
kubectl create configmap settings-admin --from-file=../../config/settings.yml -n go-admin

13
scripts/k8s/storage.yml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: go-admin
namespace: go-admin
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: "1Mi"
volumeName:
storageClassName: nfs-csi