add deploy
This commit is contained in:
1 parent
82c63f991c
commit
ebd5c1cecd
4 files changed
+69
-2
No files matched your search
@@ -0,0 +1,31 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: zhishuyun-frontend
|
||||
name: zhishuyun-frontend
|
||||
namespace: zhishuyun
|
||||
spec:
|
||||
replicas: 2
|
||||
revisionHistoryLimit: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: zhishuyun-frontend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: zhishuyun-frontend
|
||||
spec:
|
||||
containers:
|
||||
- image: zhishuyun/frontend:${TAG}
|
||||
name: zhishuyun-frontend
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
memory: '200Mi'
|
||||
cpu: '100m'
|
||||
limits:
|
||||
memory: '512Mi'
|
||||
cpu: '200m'
|
||||
restartPolicy: Always
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ingress-zhishuyun-frontend
|
||||
namespace: zhishuyun
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: 'nginx'
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: 'true'
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- www.zhishuyun.com
|
||||
secretName: tls-www-zhishuyun-com
|
||||
rules:
|
||||
- host: www.zhishuyun.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: zhishuyun-frontend
|
||||
servicePort: 8083
|
||||
path: /
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: zhishuyun-frontend
|
||||
name: zhishuyun-frontend
|
||||
namespace: zhishuyun
|
||||
spec:
|
||||
ports:
|
||||
- name: '8083'
|
||||
port: 8083
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: zhishuyun-frontend
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "zhishuyun",
|
||||
"version": "0.0.0",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"start": "vite",
|
||||
"start": "vite --host",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"serve": "vite preview"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user