Hexo-Async-Offends/kubernetes/gateway.yaml
offends 6ea99f26e2
Some checks reported errors
continuous-integration/drone Build was killed
synchronization
2024-07-19 15:19:56 +08:00

60 lines
1.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
namespace: blog
name: blog-gateway
labels:
app: blog-gateway
spec:
progressDeadlineSeconds: 200
replicas: 1
revisionHistoryLimit: 1
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
selector:
matchLabels:
app: blog-gateway
template:
metadata:
labels:
app: blog-gateway
spec:
containers:
- name: blog-gateway
image: registry.cn-hangzhou.aliyuncs.com/offends/hexo:gateway-kubernetes
imagePullPolicy: IfNotPresent
env:
- name: localhost
value: "blog.offends.cn"
ports:
- containerPort: 80
protocol: TCP
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 3
successThreshold: 1
tcpSocket:
port: 80
timeoutSeconds: 10
resources:
limits:
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
namespace: blog
name: blog-gateway
spec:
selector:
app: blog-gateway
ports:
- name: blog-gateway
protocol: TCP
port: 80
targetPort: 80