add deploy files

This commit is contained in:
AceDataCloud committed 2023-01-28 16:49:43 +08:00
1 parent 98a7532235
commit 616b22a7db
4 files changed
+80

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: data-frontend
name: data-frontend
namespace: zhishuyun
spec:
replicas: 2
revisionHistoryLimit: 5
selector:
matchLabels:
app: data-frontend
template:
metadata:
labels:
app: data-frontend
spec:
containers:
- image: ghcr.io/zhishuyun/data-frontend:${TAG}
name: data-frontend
ports:
- containerPort: 80
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 30
periodSeconds: 5
failureThreshold: 3
timeoutSeconds: 10
resources:
requests:
memory: '50Mi'
cpu: '10m'
limits:
memory: '100Mi'
cpu: '30m'
imagePullSecrets:
- name: docker-registry
restartPolicy: Always
+22
View File
@@ -0,0 +1,22 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: data-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:
- data.zhishuyun.com
secretName: tls-wildcard-zhishuyun-com
rules:
- host: data.zhishuyun.com
http:
paths:
- backend:
serviceName: data-frontend
servicePort: 8083
path: /
+3
View File
@@ -0,0 +1,3 @@
cat deploy/production/deployment.yaml | sed 's/\${TAG}/'"$BUILD_NUMBER"'/g' | kubectl apply -f - || true
kubectl apply -f deploy/production/service.yaml
kubectl apply -f deploy/production/ingress.yaml
+14
View File
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: data-frontend
name: data-frontend
namespace: zhishuyun
spec:
ports:
- name: '8083'
port: 8083
targetPort: 80
selector:
app: data-frontend