Merge pull request #274 from meysamhadeli/feat/add-prometheus-grafana-to-kubernetes

feat: Add prometheus and grafana to kubernetes deployment
This commit is contained in:
Meysam Hadeli 2023-08-01 22:50:27 +03:30 committed by GitHub
commit 7234ef169a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
## ref: https://kompose.io
#######################################################
# Network
#######################################################
@ -321,6 +322,405 @@ spec:
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 infrastracture.yaml
kompose.version: 1.28.0 (c4137012e)
creationTimestamp: null
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 infrastracture.yaml
kompose.version: 1.28.0 (c4137012e)
creationTimestamp: null
labels:
io.kompose.network/newfolder-booking: "true"
io.kompose.service: node-exporter
spec:
containers:
- args:
- --path.rootfs=/host
image: quay.io/prometheus/node-exporter:latest
name: node-exporter
resources: {}
volumeMounts:
- mountPath: /host
name: node-exporter-claim0
readOnly: true
restartPolicy: Always
volumes:
- name: node-exporter-claim0
persistentVolumeClaim:
claimName: node-exporter-claim0
readOnly: true
status: {}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: node-exporter-claim0
name: node-exporter-claim0
spec:
accessModes:
- ReadOnlyMany
resources:
requests:
storage: 100Mi
status: {}
---
# #######################################################
# # 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
# #######################################################