Removed docker swarm config
Added K8S config With big refactor
This commit is contained in:
91
deploy/k8s/catalog-svc.yml
Normal file
91
deploy/k8s/catalog-svc.yml
Normal file
@@ -0,0 +1,91 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: catalog-svc
|
||||
namespace: egommerce
|
||||
labels:
|
||||
app: catalog-svc
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: catalog-svc
|
||||
ports:
|
||||
- name: catalog-svc
|
||||
protocol: TCP
|
||||
port: 443
|
||||
nodePort: 31830
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: catalog-svc
|
||||
namespace: egommerce
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: catalog-svc
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: catalog-svc
|
||||
spec:
|
||||
containers:
|
||||
- name: catalog-svc
|
||||
image: git.ego.freeddns.org/egommerce/catalog-svc:dev
|
||||
imagePullPolicy: Always
|
||||
command: [
|
||||
"sh"
|
||||
]
|
||||
args: [
|
||||
"-c",
|
||||
"/app"
|
||||
]
|
||||
env:
|
||||
- name: APP_NAME
|
||||
value: catalog-svc
|
||||
- name: APP_DOMAIN
|
||||
value: catalog-svc.egommerce.local
|
||||
- name: APP_PATH_PREFIX
|
||||
value: /catalog
|
||||
- name: API_EVENTBUS_URL
|
||||
value: amqp://guest:guest@api-eventbus:5672
|
||||
# - name: API_MONGODB_URL
|
||||
# value: mongodb://mongodb:12345678@mongo-db:27017
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
scheme: HTTPS
|
||||
port: 443
|
||||
path: /health
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
failureThreshold: 5
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
scheme: HTTPS
|
||||
port: 443
|
||||
path: /health
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
failureThreshold: 1
|
||||
volumeMounts:
|
||||
- name: catalog-cert
|
||||
mountPath: /certs/catalog-svc.crt
|
||||
readOnly: true
|
||||
- name: catalog-key
|
||||
mountPath: /certs/catalog-svc.key
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512M
|
||||
ports:
|
||||
- containerPort: 443
|
||||
volumes:
|
||||
- name: catalog-cert
|
||||
hostPath:
|
||||
path: /egommerce/stack/deploy/certs/catalog-svc/catalog-svc.crt
|
||||
type: File
|
||||
- name: catalog-key
|
||||
hostPath:
|
||||
path: /egommerce/stack/deploy/certs/catalog-svc/catalog-svc.key
|
||||
type: File
|
||||
Reference in New Issue
Block a user