74 lines
1.8 KiB
YAML
74 lines
1.8 KiB
YAML
|
|
apiVersion: v1
|
||
|
|
kind: Service
|
||
|
|
metadata:
|
||
|
|
name: iloom-textile-service
|
||
|
|
namespace: iloom
|
||
|
|
spec:
|
||
|
|
type: ClusterIP
|
||
|
|
ports:
|
||
|
|
- port: 8083
|
||
|
|
targetPort: 8083
|
||
|
|
selector:
|
||
|
|
app: iloom-textile-service
|
||
|
|
---
|
||
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: iloom-textile-service
|
||
|
|
namespace: iloom
|
||
|
|
spec:
|
||
|
|
replicas: 1
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
app: iloom-textile-service
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app: iloom-textile-service
|
||
|
|
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']
|
||
|
|
containers:
|
||
|
|
- name: textile-service
|
||
|
|
image: harbor-in-k3s.cheverjohn.me/iloom/iloom-textile-service:v1
|
||
|
|
ports:
|
||
|
|
- containerPort: 8083
|
||
|
|
env:
|
||
|
|
- name: PORT
|
||
|
|
value: "8083"
|
||
|
|
- name: DB_DSN
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: db-secret
|
||
|
|
key: DB_DSN
|
||
|
|
- name: INTERNAL_SERVICE_KEY
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: app-secret
|
||
|
|
key: INTERNAL_SERVICE_KEY
|
||
|
|
- name: PURCHASER_SERVICE_URL
|
||
|
|
value: "http://iloom-purchaser-service:8082"
|
||
|
|
resources:
|
||
|
|
requests:
|
||
|
|
cpu: 50m
|
||
|
|
memory: 64Mi
|
||
|
|
limits:
|
||
|
|
cpu: 250m
|
||
|
|
memory: 128Mi
|
||
|
|
readinessProbe:
|
||
|
|
httpGet:
|
||
|
|
path: /health
|
||
|
|
port: 8083
|
||
|
|
initialDelaySeconds: 10
|
||
|
|
periodSeconds: 10
|
||
|
|
livenessProbe:
|
||
|
|
httpGet:
|
||
|
|
path: /health
|
||
|
|
port: 8083
|
||
|
|
initialDelaySeconds: 20
|
||
|
|
periodSeconds: 30
|