iloom/k8s/20-muyu/gateway.yaml

67 lines
1.5 KiB
YAML
Raw Permalink Normal View History

apiVersion: v1
kind: Service
metadata:
name: muyu-gateway
namespace: iloom
spec:
type: ClusterIP
ports:
- port: 8888
targetPort: 8888
selector:
app: muyu-gateway
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: muyu-gateway
namespace: iloom
spec:
replicas: 1
selector:
matchLabels:
app: muyu-gateway
template:
metadata:
labels:
app: muyu-gateway
spec:
imagePullSecrets:
- name: harbor-pull-secret
initContainers:
- name: wait-etcd
image: harbor-in-k3s.cheverjohn.me/iloom/busybox:1.36
command: ['sh', '-c', 'until nc -z etcd 2379; do sleep 2; done']
containers:
- name: gateway
image: harbor-in-k3s.cheverjohn.me/iloom/muyu-gateway:v1
ports:
- containerPort: 8888
env:
- name: TZ
value: Asia/Shanghai
volumeMounts:
- name: config
mountPath: /app/etc
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 250m
memory: 128Mi
readinessProbe:
tcpSocket:
port: 8888
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 8888
initialDelaySeconds: 20
periodSeconds: 30
volumes:
- name: config
configMap:
name: muyu-gateway-config