From 3efec3eb59a2cfed6be5a8886ac1b883f7662f0a Mon Sep 17 00:00:00 2001 From: ivampiresp Date: Sun, 1 Dec 2024 15:35:21 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20manifest.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.yaml | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 manifest.yaml diff --git a/manifest.yaml b/manifest.yaml new file mode 100644 index 0000000..af972ef --- /dev/null +++ b/manifest.yaml @@ -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