Hexo-Async-Offends/kubernetes/twikoo.yaml
offends f81564f8a0
All checks were successful
continuous-integration/drone Build is passing
synchronization
2024-07-19 12:43:24 +08:00

63 lines
1.3 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
namespace: blog
name: twikoo
spec:
podManagementPolicy: OrderedReady
replicas: 1
revisionHistoryLimit: 0
selector:
matchLabels:
app: twikoo
serviceName: blog-twikoo
minReadySeconds: 5
template:
metadata:
labels:
app: twikoo
spec:
terminationGracePeriodSeconds: 5
containers:
- name: twikoo
image: registry.cn-hangzhou.aliyuncs.com/offends/hexo:twikoo
env:
- name: TWIKOO_THROTTLE
value: "1000"
# - name: TWIKOO_PORT
# value: "4444"
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
memory: 128Mi
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 3
successThreshold: 1
tcpSocket:
port: 8080
timeoutSeconds: 20
volumeMounts:
- name: host-path-volume
mountPath: /app/data
volumes:
- name: host-path-volume
hostPath:
path: /data/blog/twikoo
---
apiVersion: v1
kind: Service
metadata:
namespace: blog
name: blog-twikoo
spec:
selector:
app: twikoo
ports:
- port: 8080
targetPort: 8080
protocol: TCP
type: ClusterIP