mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-26 06:19:33 +01:00
f4b2396718
* Expose etcd metrics to workers so Prometheus can run on a worker, rather than a controller * Drop temporary firewall rules allowing Prometheus to run on a controller and scrape targes * Related to https://github.com/poseidon/typhoon/pull/175
46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: prometheus
|
|
namespace: monitoring
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
name: prometheus
|
|
phase: prod
|
|
template:
|
|
metadata:
|
|
labels:
|
|
name: prometheus
|
|
phase: prod
|
|
spec:
|
|
serviceAccountName: prometheus
|
|
containers:
|
|
- name: prometheus
|
|
image: quay.io/prometheus/prometheus:v2.2.1
|
|
args:
|
|
- '--config.file=/etc/prometheus/prometheus.yaml'
|
|
ports:
|
|
- name: web
|
|
containerPort: 9090
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/prometheus
|
|
- name: rules
|
|
mountPath: /etc/prometheus/rules
|
|
- name: data
|
|
mountPath: /var/lib/prometheus
|
|
dnsPolicy: ClusterFirst
|
|
restartPolicy: Always
|
|
terminationGracePeriodSeconds: 30
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: prometheus-config
|
|
- name: rules
|
|
configMap:
|
|
name: prometheus-rules
|
|
- name: data
|
|
emptyDir: {}
|