mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-10 17:59:38 +08:00
1262 lines
30 KiB
YAML
1262 lines
30 KiB
YAML
## ref: https://kompose.io
|
|
#######################################################
|
|
# 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: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastructure.yaml
|
|
kompose.version: 1.34.0 (cbf2835db)
|
|
labels:
|
|
io.kompose.service: eventstore
|
|
name: eventstore
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: eventstore
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastructure.yaml
|
|
kompose.version: 1.34.0 (cbf2835db)
|
|
labels:
|
|
io.kompose.service: eventstore
|
|
spec:
|
|
containers:
|
|
- env:
|
|
- name: EVENTSTORE_CLUSTER_SIZE
|
|
value: "1"
|
|
- name: EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP
|
|
value: "True"
|
|
- name: EVENTSTORE_HTTP_PORT
|
|
value: "2113"
|
|
- name: EVENTSTORE_INSECURE
|
|
value: "True"
|
|
- name: EVENTSTORE_RUN_PROJECTIONS
|
|
value: All
|
|
- name: EVENTSTORE_START_STANDARD_PROJECTIONS
|
|
value: "True"
|
|
image: eventstore/eventstore:latest
|
|
name: eventstore
|
|
ports:
|
|
- containerPort: 2113
|
|
protocol: TCP
|
|
restartPolicy: Always
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastructure.yaml
|
|
kompose.version: 1.34.0 (cbf2835db)
|
|
labels:
|
|
io.kompose.service: eventstore
|
|
name: eventstore
|
|
spec:
|
|
ports:
|
|
- name: "2113"
|
|
port: 2113
|
|
targetPort: 2113
|
|
selector:
|
|
io.kompose.service: eventstore
|
|
---
|
|
# #######################################################
|
|
# # 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: {}
|
|
---
|
|
#######################################################
|
|
# Prometheus
|
|
#######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastracture.yaml
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: prometheus
|
|
name: prometheus
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: prometheus
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastracture.yaml
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.network/newfolder-booking: "true"
|
|
io.kompose.service: prometheus
|
|
spec:
|
|
containers:
|
|
- env:
|
|
- name: TZ
|
|
value: UTC
|
|
image: prom/prometheus:latest
|
|
name: prometheus
|
|
ports:
|
|
- containerPort: 9090
|
|
resources: {}
|
|
volumeMounts:
|
|
- mountPath: /etc/prometheus/prometheus.yml
|
|
name: prometheus-claim0
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: prometheus-claim0
|
|
persistentVolumeClaim:
|
|
claimName: prometheus-claim0
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastracture.yaml
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: prometheus
|
|
name: prometheus
|
|
spec:
|
|
ports:
|
|
- name: "9090"
|
|
port: 9090
|
|
targetPort: 9090
|
|
selector:
|
|
io.kompose.service: prometheus
|
|
status:
|
|
loadBalancer: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: prometheus-claim0
|
|
name: prometheus-claim0
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
status: {}
|
|
---
|
|
#######################################################
|
|
# Grafana
|
|
#######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastracture.yaml
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: grafana
|
|
name: grafana
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: grafana
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastracture.yaml
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.network/newfolder-booking: "true"
|
|
io.kompose.service: grafana
|
|
spec:
|
|
containers:
|
|
- image: grafana/grafana
|
|
name: grafana
|
|
ports:
|
|
- containerPort: 3000
|
|
resources: {}
|
|
volumeMounts:
|
|
- mountPath: /var/lib/grafana
|
|
name: grafana-claim0
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: grafana-claim0
|
|
persistentVolumeClaim:
|
|
claimName: grafana-claim0
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastracture.yaml
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: grafana
|
|
name: grafana
|
|
spec:
|
|
ports:
|
|
- name: "3000"
|
|
port: 3000
|
|
targetPort: 3000
|
|
selector:
|
|
io.kompose.service: grafana
|
|
status:
|
|
loadBalancer: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: grafana-claim0
|
|
name: grafana-claim0
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
status: {}
|
|
---
|
|
# #######################################################
|
|
# # Node Exporter
|
|
# #######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastructure.yaml
|
|
kompose.version: 1.34.0 (cbf2835db)
|
|
labels:
|
|
io.kompose.service: node-exporter
|
|
name: node-exporter
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: node-exporter
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastructure.yaml
|
|
kompose.version: 1.34.0 (cbf2835db)
|
|
labels:
|
|
io.kompose.service: node-exporter
|
|
spec:
|
|
containers:
|
|
- args:
|
|
- --path.rootfs=/host
|
|
image: quay.io/prometheus/node-exporter:latest
|
|
name: node-exporter
|
|
volumeMounts:
|
|
- mountPath: /host/proc
|
|
name: node-exporter-claim0
|
|
readOnly: true
|
|
- mountPath: /host/sys
|
|
name: node-exporter-claim1
|
|
readOnly: true
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: node-exporter-claim0
|
|
persistentVolumeClaim:
|
|
claimName: node-exporter-claim0
|
|
readOnly: true
|
|
- name: node-exporter-claim1
|
|
persistentVolumeClaim:
|
|
claimName: node-exporter-claim1
|
|
readOnly: true
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
labels:
|
|
io.kompose.service: node-exporter-claim0
|
|
name: node-exporter-claim0
|
|
spec:
|
|
accessModes:
|
|
- ReadOnlyMany
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
labels:
|
|
io.kompose.service: node-exporter-claim1
|
|
name: node-exporter-claim1
|
|
spec:
|
|
accessModes:
|
|
- ReadOnlyMany
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
---
|
|
# #######################################################
|
|
# # Cadvisor
|
|
# #######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastracture.yaml
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: cadvisor
|
|
name: cadvisor
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: cadvisor
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastracture.yaml
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.network/newfolder-booking: "true"
|
|
io.kompose.service: cadvisor
|
|
spec:
|
|
containers:
|
|
- image: gcr.io/cadvisor/cadvisor:latest
|
|
name: cadvisor
|
|
ports:
|
|
- containerPort: 8080
|
|
resources: {}
|
|
volumeMounts:
|
|
- mountPath: /rootfs
|
|
name: cadvisor-claim0
|
|
readOnly: true
|
|
- mountPath: /var/run
|
|
name: cadvisor-claim1
|
|
readOnly: true
|
|
- mountPath: /sys
|
|
name: cadvisor-claim2
|
|
readOnly: true
|
|
- mountPath: /var/lib/docker
|
|
name: cadvisor-claim3
|
|
readOnly: true
|
|
- mountPath: /dev/disk
|
|
name: cadvisor-claim4
|
|
readOnly: true
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: cadvisor-claim0
|
|
persistentVolumeClaim:
|
|
claimName: cadvisor-claim0
|
|
readOnly: true
|
|
- name: cadvisor-claim1
|
|
persistentVolumeClaim:
|
|
claimName: cadvisor-claim1
|
|
readOnly: true
|
|
- name: cadvisor-claim2
|
|
persistentVolumeClaim:
|
|
claimName: cadvisor-claim2
|
|
readOnly: true
|
|
- name: cadvisor-claim3
|
|
persistentVolumeClaim:
|
|
claimName: cadvisor-claim3
|
|
readOnly: true
|
|
- name: cadvisor-claim4
|
|
persistentVolumeClaim:
|
|
claimName: cadvisor-claim4
|
|
readOnly: true
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -f infrastracture.yaml
|
|
kompose.version: 1.28.0 (c4137012e)
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: cadvisor
|
|
name: cadvisor
|
|
spec:
|
|
ports:
|
|
- name: "8080"
|
|
port: 8080
|
|
targetPort: 8080
|
|
selector:
|
|
io.kompose.service: cadvisor
|
|
status:
|
|
loadBalancer: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: cadvisor-claim0
|
|
name: cadvisor-claim0
|
|
spec:
|
|
accessModes:
|
|
- ReadOnlyMany
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: cadvisor-claim1
|
|
name: cadvisor-claim1
|
|
spec:
|
|
accessModes:
|
|
- ReadOnlyMany
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: cadvisor-claim2
|
|
name: cadvisor-claim2
|
|
spec:
|
|
accessModes:
|
|
- ReadOnlyMany
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: cadvisor-claim3
|
|
name: cadvisor-claim3
|
|
spec:
|
|
accessModes:
|
|
- ReadOnlyMany
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
io.kompose.service: cadvisor-claim4
|
|
name: cadvisor-claim4
|
|
spec:
|
|
accessModes:
|
|
- ReadOnlyMany
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
status: {}
|
|
---
|
|
# #######################################################
|
|
# # 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:latest
|
|
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:
|
|
- args:
|
|
- postgres
|
|
- -c
|
|
- wal_level=logical
|
|
- -c
|
|
- max_prepared_transactions=10
|
|
env:
|
|
- name: POSTGRES_PASSWORD
|
|
value: postgres
|
|
- name: POSTGRES_USER
|
|
value: postgres
|
|
image: postgres:latest
|
|
name: postgres
|
|
ports:
|
|
- containerPort: 5432
|
|
restartPolicy: Always
|
|
---
|
|
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: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: {}
|
|
---
|
|
# #######################################################
|
|
# ConfigMap AppSettings
|
|
# #######################################################
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: appsettings
|
|
data:
|
|
appsettings.json: |-
|
|
{
|
|
.Files.Get "settings/appsettings.docker.json"
|
|
}
|
|
#ref: https://www.mrjamiebowman.com/software-development/dotnet/kubernetes-configmaps-with-net-core/
|
|
---
|
|
# #######################################################
|
|
# Flight
|
|
# #######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: flight-deployment
|
|
labels:
|
|
app: flight
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: flight
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: flight
|
|
spec:
|
|
containers:
|
|
- image: meysamh66/booking-microservices-flight:v1.6.7
|
|
name: flight
|
|
ports:
|
|
- containerPort: 80
|
|
env:
|
|
- name: ASPNETCORE_ENVIRONMENT
|
|
value: docker
|
|
- name: ASPNETCORE_URLS
|
|
value: http://+
|
|
volumeMounts:
|
|
- name: appsettings-volume
|
|
mountPath: /app/Settings
|
|
volumes:
|
|
- name: appsettings-volume
|
|
configMap:
|
|
name: appsettings
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: flight
|
|
spec:
|
|
selector:
|
|
app: flight
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|
|
type: ClusterIP
|
|
---
|
|
# #######################################################
|
|
# Identity
|
|
# #######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: identity-deployment
|
|
labels:
|
|
app: identity
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: identity
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: identity
|
|
spec:
|
|
containers:
|
|
- image: meysamh66/booking-microservices-identity:v1.6.7
|
|
name: identity
|
|
ports:
|
|
- containerPort: 80
|
|
env:
|
|
- name: ASPNETCORE_ENVIRONMENT
|
|
value: docker
|
|
- name: ASPNETCORE_URLS
|
|
value: http://+
|
|
volumeMounts:
|
|
- name: appsettings-volume
|
|
mountPath: /app/Settings
|
|
volumes:
|
|
- name: appsettings-volume
|
|
configMap:
|
|
name: appsettings
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: identity
|
|
spec:
|
|
selector:
|
|
app: identity
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|
|
type: ClusterIP
|
|
---
|
|
# #######################################################
|
|
# Booking
|
|
# #######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: booking-deployment
|
|
labels:
|
|
app: booking
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: booking
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: booking
|
|
spec:
|
|
containers:
|
|
- image: meysamh66/booking-microservices-booking:v1.6.7
|
|
name: booking
|
|
ports:
|
|
- containerPort: 80
|
|
env:
|
|
- name: ASPNETCORE_ENVIRONMENT
|
|
value: docker
|
|
- name: ASPNETCORE_URLS
|
|
value: http://+
|
|
volumeMounts:
|
|
- name: appsettings-volume
|
|
mountPath: /app/Settings
|
|
volumes:
|
|
- name: appsettings-volume
|
|
configMap:
|
|
name: appsettings
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: booking
|
|
spec:
|
|
selector:
|
|
app: booking
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|
|
type: ClusterIP
|
|
---
|
|
# #######################################################
|
|
# Passenger
|
|
# #######################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: passenger-deployment
|
|
labels:
|
|
app: passenger
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: passenger
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: passenger
|
|
spec:
|
|
containers:
|
|
- image: meysamh66/booking-microservices-passenger:v1.6.7
|
|
name: passenger
|
|
ports:
|
|
- containerPort: 80
|
|
env:
|
|
- name: ASPNETCORE_ENVIRONMENT
|
|
value: docker
|
|
- name: ASPNETCORE_URLS
|
|
value: http://+
|
|
volumeMounts:
|
|
- name: appsettings-volume
|
|
mountPath: /app/Settings
|
|
volumes:
|
|
- name: appsettings-volume
|
|
configMap:
|
|
name: appsettings
|
|
---
|
|
# #######################################################
|
|
# Ingress Controller
|
|
# #######################################################
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: passenger
|
|
spec:
|
|
selector:
|
|
app: passenger
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 80
|
|
targetPort: 80
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: booking-microservies
|
|
annotations:
|
|
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
|
cert-manager.io/cluster-issuer: "letsencrypt-staging"
|
|
nginx.ingress.kubernetes.io/use-regex: "true"
|
|
nginx.ingress.kubernetes.io/proxy-buffer-size: "128k"
|
|
nginx.ingress.kubernetes.io/proxy-buffers: "4 256k"
|
|
nginx.ingress.kubernetes.io/proxy-busy-buffers-size: "256k"
|
|
nginx.ingress.kubernetes.io/client-header-buffer-size: "64k"
|
|
nginx.ingress.kubernetes.io/http2-max-field-size: "16k"
|
|
nginx.ingress.kubernetes.io/http2-max-header-size: "128k"
|
|
nginx.ingress.kubernetes.io/large-client-header-buffers: "8 64k"
|
|
spec:
|
|
ingressClassName: nginx
|
|
tls:
|
|
- hosts:
|
|
- booking-microservices.com
|
|
secretName: letsencrypt-staging
|
|
rules:
|
|
- host: booking-microservices.com
|
|
http:
|
|
paths:
|
|
- path: /identity
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: flight
|
|
port:
|
|
number: 80
|
|
- path: /identity/(.*)
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: identity
|
|
port:
|
|
number: 80
|
|
|
|
|
|
- path: /flight
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: flight
|
|
port:
|
|
number: 80
|
|
- path: /flight/(.*)
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: flight
|
|
port:
|
|
number: 80
|
|
|
|
|
|
- path: /passenger
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: passenger
|
|
port:
|
|
number: 80
|
|
- path: /passenger/(.*)
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: passenger
|
|
port:
|
|
number: 80
|
|
|
|
|
|
- path: /booking
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: booking
|
|
port:
|
|
number: 80
|
|
- path: /booking/(.*)
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: booking
|
|
port:
|
|
number: 80 |