添加 manifest.yaml
This commit is contained in:
commit
3efec3eb59
81
manifest.yaml
Normal file
81
manifest.yaml
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: sunmc-forum
|
||||||
|
namespace: websites
|
||||||
|
labels:
|
||||||
|
app: sunmc-forum
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: sunmc-forum-server
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: sunmc-forum-server
|
||||||
|
spec:
|
||||||
|
volumes:
|
||||||
|
- name: www
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: sunmc-forum-pvc
|
||||||
|
- name: php-conf
|
||||||
|
configMap:
|
||||||
|
name: sunmc-forum-httpd
|
||||||
|
containers:
|
||||||
|
- name: http
|
||||||
|
image: leafdev.top/packaged/nginx-php-fpm-docker:8.2
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: 80
|
||||||
|
path: /healthz.php
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: http-80
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/www
|
||||||
|
name: www
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: sunmc-forum-svc
|
||||||
|
namespace: websites
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: sunmc-forum-server
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
name: http-80
|
||||||
|
type: ClusterIP
|
||||||
|
---
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: HTTPRoute
|
||||||
|
metadata:
|
||||||
|
name: sunmc-forum
|
||||||
|
namespace: websites
|
||||||
|
spec:
|
||||||
|
parentRefs:
|
||||||
|
- name: main-gw
|
||||||
|
namespace: networking
|
||||||
|
hostnames:
|
||||||
|
- sunmc.leaflow.cn
|
||||||
|
rules:
|
||||||
|
- backendRefs:
|
||||||
|
- name: sunmc-forum-server
|
||||||
|
port: 80
|
||||||
|
weight: 10
|
||||||
|
---
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: sunmc-forum-pvc
|
||||||
|
namespace: websites
|
||||||
|
spec:
|
||||||
|
storageClassName: longhorn
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 8Gi
|
Loading…
Reference in New Issue
Block a user