add prometheus

This commit is contained in:
mr
2025-06-24 09:40:45 +02:00
parent 3ca23c0645
commit 7ad4bf0b5d
7 changed files with 120 additions and 55 deletions

View File

@@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "my-prometheus.fullname" . }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ include "my-prometheus.name" . }}
template:
metadata:
labels:
app: {{ include "my-prometheus.name" . }}
spec:
containers:
- name: prometheus
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 9090
resources:
{{- toYaml .Values.resources | nindent 12 }}

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "my-prometheus.fullname" . }}
spec:
type: {{ .Values.service.type }}
selector:
app: {{ include "my-prometheus.name" . }}
ports:
- port: {{ .Values.service.port }}
targetPort: 9090