OKR/dev-upgrade/yapi/yapi.yaml

55 lines
1.1 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: yapi
spec:
replicas: 1
selector:
matchLabels:
app: yapi
template:
metadata:
labels:
app: yapi
spec:
imagePullSecrets:
- name: docker-hub
containers:
- name: yapi
image: beaconfireiic/yapi:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 3000
protocol: TCP
volumeMounts:
- name: yapi-log
mountPath: /yapi/log
volumes:
- name: yapi-log
hostPath:
path: /data/yapi/log
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "kubernetes.io/hostname"
operator: In
values:
- bfs-k8snode-10-2-0-15.hetzner.base.beaconfireinc.com
---
apiVersion: v1
kind: Service
metadata:
name: yapi
spec:
type: ClusterIP
ports:
- name: http
protocol: TCP
port: 3000
targetPort: http
selector:
app: yapi