49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: gateway
|
|
namespace: epcare
|
|
spec:
|
|
selector:
|
|
app: gateway
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gateway
|
|
namespace: epcare
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: gateway
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: gateway
|
|
spec:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: NODE_HOSTNAME
|
|
imagePullSecrets:
|
|
- name: gitlab-registry
|
|
initContainers:
|
|
- name: wait-for-frontend
|
|
image: busybox:1.36
|
|
command: ['sh', '-c', 'until nc -z frontend 80; do echo "waiting for frontend..."; sleep 3; done']
|
|
- name: wait-for-backend
|
|
image: busybox:1.36
|
|
command: ['sh', '-c', 'until nc -z backend 8080; do echo "waiting for backend..."; sleep 3; done']
|
|
containers:
|
|
- name: gateway
|
|
image: harbour.control-1.test.signalytic.dev/epcare/gateway/arm64:1.0
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 80
|