mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-14 12:48:34 +08:00
537 lines
13 KiB
YAML
537 lines
13 KiB
YAML
#######################################################
|
|
# Network
|
|
#######################################################
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
creationTimestamp: null
|
|
name: booking
|
|
spec:
|
|
ingress:
|
|
- from:
|
|
- podSelector:
|
|
matchLabels:
|
|
io.kompose.network/booking: "true"
|
|
podSelector:
|
|
matchLabels:
|
|
io.kompose.network/booking: "true"
|
|
|
|
---
|
|
#######################################################
|
|
# ElasticSearch
|
|
#######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: kompose convert -f infrastracture.yaml
|
|
kompose.version: 1.26.0 (40646f47)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: elasticsearch
|
|
name: elasticsearch
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: elasticsearch
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: kompose convert -f infrastracture.yaml
|
|
kompose.version: 1.26.0 (40646f47)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.network/booking: "true"
|
|
io.kompose.service: elasticsearch
|
|
spec:
|
|
containers:
|
|
- env:
|
|
- name: ES_JAVA_OPTS
|
|
value: -Xms512m -Xmx512m
|
|
- name: discovery.type
|
|
value: single-node
|
|
- name: xpack.monitoring.enabled
|
|
value: "true"
|
|
- name: xpack.watcher.enabled
|
|
value: "false"
|
|
image: elasticsearch:7.17.9
|
|
name: elasticsearch
|
|
ports:
|
|
- containerPort: 9200
|
|
resources: {}
|
|
volumeMounts:
|
|
- mountPath: /usr/share/elasticsearch/data
|
|
name: elasticsearch-data
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: elasticsearch-data
|
|
persistentVolumeClaim:
|
|
claimName: elasticsearch-data
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: kompose convert -f infrastracture.yaml
|
|
kompose.version: 1.26.0 (40646f47)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: elasticsearch
|
|
name: elasticsearch
|
|
spec:
|
|
ports:
|
|
- name: "9200"
|
|
port: 9200
|
|
targetPort: 9200
|
|
selector:
|
|
io.kompose.service: elasticsearch
|
|
status:
|
|
loadBalancer: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: elasticsearch-data
|
|
name: elasticsearch-data
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
status: {}
|
|
---
|
|
#######################################################
|
|
# Kibana
|
|
#######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: kompose convert -f infrastracture.yaml
|
|
kompose.version: 1.26.0 (40646f47)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: kibana
|
|
name: kibana
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: kibana
|
|
strategy: {}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: kompose convert -f infrastracture.yaml
|
|
kompose.version: 1.26.0 (40646f47)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.network/booking: "true"
|
|
io.kompose.service: kibana
|
|
spec:
|
|
containers:
|
|
- env:
|
|
- name: ELASTICSEARCH_URL
|
|
value: elasticsearch:9200
|
|
image: kibana:7.17.9
|
|
name: kibana
|
|
ports:
|
|
- containerPort: 5601
|
|
resources: {}
|
|
restartPolicy: Always
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: kompose convert -f infrastracture.yaml
|
|
kompose.version: 1.26.0 (40646f47)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: kibana
|
|
name: kibana
|
|
spec:
|
|
ports:
|
|
- name: "5601"
|
|
port: 5601
|
|
targetPort: 5601
|
|
selector:
|
|
io.kompose.service: kibana
|
|
status:
|
|
loadBalancer: {}
|
|
---
|
|
#######################################################
|
|
# Event Store
|
|
#######################################################
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.network/booking: "true"
|
|
io.kompose.service: eventstore
|
|
name: eventstore
|
|
spec:
|
|
containers:
|
|
- env:
|
|
- name: EVENTSTORE_CLUSTER_SIZE
|
|
value: "1"
|
|
- name: EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP
|
|
value: "true"
|
|
- name: EVENTSTORE_ENABLE_EXTERNAL_TCP
|
|
value: "true"
|
|
- name: EVENTSTORE_EXT_HTTP_PORT
|
|
value: "2113"
|
|
- name: EVENTSTORE_EXT_TCP_PORT
|
|
value: "1113"
|
|
- name: EVENTSTORE_INSECURE
|
|
value: "true"
|
|
- name: EVENTSTORE_RUN_PROJECTIONS
|
|
value: All
|
|
- name: EVENTSTORE_START_STANDARD_PROJECTIONS
|
|
value: "true"
|
|
image: eventstore/eventstore:21.2.0-buster-slim
|
|
name: eventstore
|
|
ports:
|
|
- containerPort: 1113
|
|
- containerPort: 2113
|
|
resources: {}
|
|
restartPolicy: OnFailure
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: eventstore
|
|
name: eventstore
|
|
spec:
|
|
ports:
|
|
- name: "1113"
|
|
port: 1113
|
|
targetPort: 1113
|
|
- name: "2113"
|
|
port: 2113
|
|
targetPort: 2113
|
|
selector:
|
|
io.kompose.service: eventstore
|
|
status:
|
|
loadBalancer: {}
|
|
---
|
|
# #######################################################
|
|
# # Jaeger
|
|
# #######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: jaeger
|
|
name: jaeger
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: jaeger
|
|
strategy: {}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.network/booking: "true"
|
|
io.kompose.service: jaeger
|
|
spec:
|
|
containers:
|
|
- image: jaegertracing/all-in-one
|
|
name: jaeger
|
|
ports:
|
|
- containerPort: 5775
|
|
protocol: UDP
|
|
- containerPort: 5778
|
|
- containerPort: 6831
|
|
protocol: UDP
|
|
- containerPort: 6832
|
|
protocol: UDP
|
|
- containerPort: 9411
|
|
- containerPort: 14268
|
|
- containerPort: 16686
|
|
resources: {}
|
|
restartPolicy: Always
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: jaeger
|
|
name: jaeger
|
|
spec:
|
|
ports:
|
|
- name: "5775"
|
|
port: 5775
|
|
protocol: UDP
|
|
targetPort: 5775
|
|
- name: "5778"
|
|
port: 5778
|
|
targetPort: 5778
|
|
- name: "6831"
|
|
port: 6831
|
|
protocol: UDP
|
|
targetPort: 6831
|
|
- name: "6832"
|
|
port: 6832
|
|
protocol: UDP
|
|
targetPort: 6832
|
|
- name: "9411"
|
|
port: 9411
|
|
targetPort: 9411
|
|
- name: "14268"
|
|
port: 14268
|
|
targetPort: 14268
|
|
- name: "16686"
|
|
port: 16686
|
|
targetPort: 16686
|
|
selector:
|
|
io.kompose.service: jaeger
|
|
status:
|
|
loadBalancer: {}
|
|
---
|
|
# #######################################################
|
|
# # Mongo
|
|
# #######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: mongo
|
|
name: mongo
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: mongo
|
|
strategy: {}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.network/booking: "true"
|
|
io.kompose.service: mongo
|
|
spec:
|
|
containers:
|
|
- image: mongo:5
|
|
name: mongo
|
|
ports:
|
|
- containerPort: 27017
|
|
resources: {}
|
|
restartPolicy: Always
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: mongo
|
|
name: mongo
|
|
spec:
|
|
ports:
|
|
- name: "27017"
|
|
port: 27017
|
|
targetPort: 27017
|
|
selector:
|
|
io.kompose.service: mongo
|
|
status:
|
|
loadBalancer: {}
|
|
---
|
|
# #######################################################
|
|
# # Postgres
|
|
# #######################################################
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
labels:
|
|
app: postgres
|
|
name: postgres
|
|
spec:
|
|
containers:
|
|
- env:
|
|
- name: POSTGRES_PASSWORD
|
|
value: postgres
|
|
- name: POSTGRES_USER
|
|
value: postgres
|
|
image: postgres:latest
|
|
name: postgres
|
|
ports:
|
|
- containerPort: 5432
|
|
restartPolicy: OnFailure
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
labels:
|
|
app: postgres
|
|
name: postgres
|
|
spec:
|
|
ports:
|
|
- name: "5432"
|
|
port: 5432
|
|
targetPort: 5432
|
|
selector:
|
|
app: postgres
|
|
---
|
|
# #######################################################
|
|
# # Rabbitmq
|
|
# #######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: rabbitmq
|
|
name: rabbitmq
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: rabbitmq
|
|
strategy: {}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.network/booking: "true"
|
|
io.kompose.service: rabbitmq
|
|
spec:
|
|
containers:
|
|
- image: rabbitmq:3-management
|
|
name: rabbitmq
|
|
ports:
|
|
- containerPort: 5672
|
|
- containerPort: 15672
|
|
resources: {}
|
|
restartPolicy: Always
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: rabbitmq
|
|
name: rabbitmq
|
|
spec:
|
|
ports:
|
|
- name: "5672"
|
|
port: 5672
|
|
targetPort: 5672
|
|
- name: "15672"
|
|
port: 15672
|
|
targetPort: 15672
|
|
selector:
|
|
io.kompose.service: rabbitmq
|
|
status:
|
|
loadBalancer: {}
|
|
---
|
|
# #######################################################
|
|
# # Redis
|
|
# #######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: redis
|
|
name: redis
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: redis
|
|
strategy: {}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.network/booking: "true"
|
|
io.kompose.service: redis
|
|
spec:
|
|
containers:
|
|
- image: redis
|
|
name: redis
|
|
ports:
|
|
- containerPort: 6379
|
|
resources: {}
|
|
restartPolicy: Always
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe -f infrastracture.yaml convert
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: redis
|
|
name: redis
|
|
spec:
|
|
ports:
|
|
- name: "6379"
|
|
port: 6379
|
|
targetPort: 6379
|
|
selector:
|
|
io.kompose.service: redis
|
|
status:
|
|
loadBalancer: {}
|