Fixes in catalog-svc deployment
This commit is contained in:
@@ -3,6 +3,9 @@ kind: Service
|
|||||||
metadata:
|
metadata:
|
||||||
name: catalog-svc
|
name: catalog-svc
|
||||||
namespace: egommerce
|
namespace: egommerce
|
||||||
|
annotations:
|
||||||
|
haproxy.org/check: "true"
|
||||||
|
# haproxy.org/server-ca: "egommerce/ca-root"
|
||||||
labels:
|
labels:
|
||||||
app: catalog-svc
|
app: catalog-svc
|
||||||
spec:
|
spec:
|
||||||
@@ -11,9 +14,11 @@ spec:
|
|||||||
app: catalog-svc
|
app: catalog-svc
|
||||||
ports:
|
ports:
|
||||||
- name: catalog-svc
|
- name: catalog-svc
|
||||||
protocol: TCP
|
|
||||||
port: 443
|
port: 443
|
||||||
nodePort: 31830
|
nodePort: 31820
|
||||||
|
# - name: catalog-svc-metrics
|
||||||
|
# port: 9090
|
||||||
|
# nodePort: 31811
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@@ -22,6 +27,11 @@ metadata:
|
|||||||
namespace: egommerce
|
namespace: egommerce
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 1 # Number of extra pods that can be created during update
|
||||||
|
maxUnavailable: 1 # Max number of pods that can be unavailable during update
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: catalog-svc
|
app: catalog-svc
|
||||||
@@ -30,17 +40,18 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: catalog-svc
|
app: catalog-svc
|
||||||
spec:
|
spec:
|
||||||
|
# initContainers:
|
||||||
|
# - name: catalog-svc-init
|
||||||
|
# image: busybox:1.28
|
||||||
|
# command: [
|
||||||
|
# 'sh',
|
||||||
|
# '-c',
|
||||||
|
# '/bin/migrate'
|
||||||
|
# ]
|
||||||
containers:
|
containers:
|
||||||
- name: catalog-svc
|
- name: catalog-svc
|
||||||
image: git.ego.freeddns.org/egommerce/catalog-svc:dev
|
image: git.ego.freeddns.org/egommerce/catalog-svc:dev
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
command: [
|
|
||||||
"sh"
|
|
||||||
]
|
|
||||||
args: [
|
|
||||||
"-c",
|
|
||||||
"/app"
|
|
||||||
]
|
|
||||||
env:
|
env:
|
||||||
- name: APP_NAME
|
- name: APP_NAME
|
||||||
value: catalog-svc
|
value: catalog-svc
|
||||||
@@ -50,20 +61,20 @@ spec:
|
|||||||
value: /catalog
|
value: /catalog
|
||||||
- name: API_EVENTBUS_URL
|
- name: API_EVENTBUS_URL
|
||||||
value: amqp://guest:guest@api-eventbus:5672
|
value: amqp://guest:guest@api-eventbus:5672
|
||||||
# - name: API_MONGODB_URL
|
- name: API_MONGODB_URL
|
||||||
# value: mongodb://mongodb:12345678@mongo-db:27017
|
value: mongodb://mongodb:12345678@mongo-db:27017
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
scheme: HTTPS
|
scheme: HTTPS
|
||||||
port: 443
|
port: catalog-svc
|
||||||
path: /health
|
path: /health
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
failureThreshold: 5
|
failureThreshold: 1
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
scheme: HTTPS
|
scheme: HTTPS
|
||||||
port: 443
|
port: catalog-svc
|
||||||
path: /health
|
path: /health
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
@@ -74,12 +85,27 @@ spec:
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
- name: catalog-key
|
- name: catalog-key
|
||||||
mountPath: /certs/catalog-svc.key
|
mountPath: /certs/catalog-svc.key
|
||||||
|
readOnly: true
|
||||||
|
- name: catalog-migrations
|
||||||
|
mountPath: /migrations
|
||||||
|
readOnly: true
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: "1"
|
cpu: 100m
|
||||||
memory: 512M
|
memory: 512Mi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 256Mi
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 443
|
- name: catalog-svc
|
||||||
|
containerPort: 443
|
||||||
|
# - name: catalog-svc-metrics
|
||||||
|
# image: prom/prometheus-exporter:latest
|
||||||
|
# ports:
|
||||||
|
# - containerPort: 9090
|
||||||
|
# args:
|
||||||
|
# - --web.listen-address=:9090
|
||||||
|
# - --web.telemetry-path=/metrics
|
||||||
volumes:
|
volumes:
|
||||||
- name: catalog-cert
|
- name: catalog-cert
|
||||||
hostPath:
|
hostPath:
|
||||||
@@ -88,4 +114,8 @@ spec:
|
|||||||
- name: catalog-key
|
- name: catalog-key
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /egommerce/stack/deploy/certs/catalog-svc/catalog-svc.key
|
path: /egommerce/stack/deploy/certs/catalog-svc/catalog-svc.key
|
||||||
type: File
|
type: File
|
||||||
|
- name: catalog-migrations
|
||||||
|
hostPath:
|
||||||
|
path: /egommerce/stack/deploy/db_migrations/catalog-svc
|
||||||
|
type: Directory
|
||||||
Reference in New Issue
Block a user