79 lines
1.5 KiB
YAML
79 lines
1.5 KiB
YAML
|
apiVersion: v1
|
||
|
kind: PersistentVolumeClaim
|
||
|
metadata:
|
||
|
name: blog-pvc
|
||
|
namespace: blog
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteOnce
|
||
|
storageClassName: ""
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 10Gi
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
namespace: blog
|
||
|
name: blog-deployment
|
||
|
labels:
|
||
|
app: blog
|
||
|
spec:
|
||
|
progressDeadlineSeconds: 200
|
||
|
replicas: 1
|
||
|
revisionHistoryLimit: 1
|
||
|
strategy:
|
||
|
rollingUpdate:
|
||
|
maxSurge: 25%
|
||
|
maxUnavailable: 25%
|
||
|
type: RollingUpdate
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: blog
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: blog
|
||
|
spec:
|
||
|
volumes:
|
||
|
- name: data
|
||
|
persistentVolumeClaim:
|
||
|
claimName: blog-pvc
|
||
|
containers:
|
||
|
- name: blog
|
||
|
image: registry.cn-hangzhou.aliyuncs.com/offends/hexo:hexo-async-offends
|
||
|
imagePullPolicy: IfNotPresent
|
||
|
ports:
|
||
|
- containerPort: 4000
|
||
|
protocol: TCP
|
||
|
volumeMounts:
|
||
|
- name: data
|
||
|
mountPath: /hexo/source/_posts
|
||
|
readinessProbe:
|
||
|
failureThreshold: 3
|
||
|
initialDelaySeconds: 5
|
||
|
periodSeconds: 3
|
||
|
successThreshold: 1
|
||
|
tcpSocket:
|
||
|
port: 4000
|
||
|
timeoutSeconds: 10
|
||
|
resources:
|
||
|
limits:
|
||
|
memory: 512Mi
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
namespace: blog
|
||
|
name: blog
|
||
|
spec:
|
||
|
selector:
|
||
|
app: blog
|
||
|
ports:
|
||
|
- name: blog
|
||
|
protocol: TCP
|
||
|
port: 4000
|
||
|
targetPort: 4000
|
||
|
type: LoadBalancer
|
||
|
allocateLoadBalancerNodePorts: false
|