1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: prom-sql-exporter
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
annotations:
prometheus.io/port: "9237"
prometheus.io/scrape: "true"
labels:
app: prom-sql-exporter
spec:
containers:
- env:
- name: CONFIG
value: /config/config.yml
- name: PGPASSFILE
value: /pgpass/pgpass
image: justwatch/prom-sql-exporter:latest
livenessProbe:
httpGet:
path: /healthz
port: 9237
initialDelaySeconds: 30
timeoutSeconds: 10
name: prom-sql-exporter
ports:
- containerPort: 9237
name: http
readinessProbe:
httpGet:
path: /healthz
port: 9237
initialDelaySeconds: 10
timeoutSeconds: 10
resources:
limits:
cpu: 250m
memory: 32Mi
requests:
cpu: 5m
memory: 16Mi
volumeMounts:
- mountPath: /config
name: config-volume
- mountPath: /pgpass
name: pgpass
restartPolicy: Always
volumes:
- configMap:
name: sql-exporter-config
name: config-volume
- name: pgpass
secret:
secretName: sql-exporter-pgpass
|