Go workspace (go.work) with 5 microservices + shared library: - gateway (8080), auth-service (8081), purchaser-service (8082) - textile-service (8083), washing-service (8084) - shared: proto definitions, common packages Infrastructure: docker-compose for local dev, K8s manifests for K3s cluster deployment (mysql/redis/etcd + traefik ingress). Frontend (iloom-flatten) added as git submodule. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
73 lines
1.9 KiB
YAML
73 lines
1.9 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: muyu-inventory-rpc
|
|
namespace: iloom
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 9002
|
|
targetPort: 9002
|
|
selector:
|
|
app: muyu-inventory-rpc
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: muyu-inventory-rpc
|
|
namespace: iloom
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: muyu-inventory-rpc
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: muyu-inventory-rpc
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: harbor-pull-secret
|
|
initContainers:
|
|
- name: wait-mysql
|
|
image: harbor-in-k3s.cheverjohn.me/iloom/busybox:1.36
|
|
command: ['sh', '-c', 'until nc -z mysql 3306; do sleep 2; done']
|
|
- 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']
|
|
- name: wait-redis
|
|
image: harbor-in-k3s.cheverjohn.me/iloom/busybox:1.36
|
|
command: ['sh', '-c', 'until nc -z redis 6379; do sleep 2; done']
|
|
containers:
|
|
- name: inventory-rpc
|
|
image: harbor-in-k3s.cheverjohn.me/iloom/muyu-inventory-rpc:v1
|
|
ports:
|
|
- containerPort: 9002
|
|
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: 9002
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 9002
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 30
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: muyu-inventory-config
|