1
Some checks failed
Build / build (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
build / Build (push) Has been cancelled
GitHub Actions Mirror / mirror_to_gitee (push) Has been cancelled
GitHub Actions Mirror / mirror_to_gitlab (push) Has been cancelled
Issue Close Require / issue-close-require (push) Has been cancelled
Issue Check Inactive / issue-check-inactive (push) Has been cancelled
Some checks failed
Build / build (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
build / Build (push) Has been cancelled
GitHub Actions Mirror / mirror_to_gitee (push) Has been cancelled
GitHub Actions Mirror / mirror_to_gitlab (push) Has been cancelled
Issue Close Require / issue-close-require (push) Has been cancelled
Issue Check Inactive / issue-check-inactive (push) Has been cancelled
This commit is contained in:
6
scripts/Dockerfile
Normal file
6
scripts/Dockerfile
Normal 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
57
scripts/k8s/deploy.yml
Normal 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
3
scripts/k8s/prerun.sh
Normal 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
13
scripts/k8s/storage.yml
Normal 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
|
||||
Reference in New Issue
Block a user