apiVersion: apps/v1 kind: Deployment metadata: name: prometheus namespace: observability labels: app: prometheus spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app: prometheus template: metadata: labels: app: prometheus annotations: llm.local/compose-service: "prometheus" spec: nodeName: prod102 enableServiceLinks: false hostAliases: - ip: 10.0.1.47 hostnames: ["host.docker.internal"] containers: - name: prometheus image: prom/prometheus:v3.2.1 imagePullPolicy: IfNotPresent command: - "/bin/prometheus" args: - "--config.file=/etc/prometheus/prometheus.yml" - "--storage.tsdb.path=/prometheus" - "--storage.tsdb.retention.time=15d" envFrom: - secretRef: name: prometheus-env ports: - containerPort: 9090 hostPort: 9090 protocol: TCP volumeMounts: - name: vol0 mountPath: "/etc/prometheus/prometheus.yml" readOnly: true - name: vol1 mountPath: "/prometheus" volumes: - name: vol0 hostPath: path: "/usr/cluster/observability/metrics/prometheus.yml" type: File - name: vol1 hostPath: path: "/usr/cluster/docker/volumes/observability_prometheus_data/_data" type: Directory --- apiVersion: v1 kind: Service metadata: name: prometheus namespace: observability spec: selector: app: prometheus ports: - name: p9090 port: 9090 targetPort: 9090 protocol: TCP