forked from kubernetes/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pushgateway_deployment.yaml
113 lines (113 loc) · 1.99 KB
/
pushgateway_deployment.yaml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: default
name: pushgateway
labels:
app: pushgateway
spec:
replicas: 1
selector:
matchLabels:
app: pushgateway
template:
metadata:
labels:
app: pushgateway
spec:
containers:
- name: pushgateway
image: prom/pushgateway:v0.4.0
ports:
- name: http
containerPort: 9091
---
apiVersion: v1
kind: Service
metadata:
namespace: default
name: pushgateway
labels:
app: pushgateway
spec:
ports:
- name: pushgateway
port: 80
targetPort: http
type: NodePort
selector:
app: pushgateway
---
kind: ConfigMap
apiVersion: v1
metadata:
namespace: default
name: pushgateway-proxy-config
data:
nginx.conf: |-
user www-data;
worker_processes 4;
pid /run/nginx.pid;
error_log /dev/stdout;
events {
worker_connections 1024;
}
http {
access_log /dev/stdout;
server {
listen 0.0.0.0:8081;
location / {
limit_except GET {
deny all;
}
proxy_pass http://pushgateway;
}
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: default
name: pushgateway-proxy
labels:
app: pushgateway-proxy
spec:
replicas: 1
selector:
matchLabels:
app: pushgateway-proxy
template:
metadata:
labels:
app: pushgateway-proxy
spec:
containers:
- name: nginx
ports:
- name: http
containerPort: 8081
image: nginx:1
volumeMounts:
- name: config-volume
mountPath: /etc/nginx/
volumes:
- name: config-volume
configMap:
name: pushgateway-proxy-config
---
apiVersion: v1
kind: Service
metadata:
namespace: default
name: pushgateway-external
labels:
app: pushgateway-external
spec:
ports:
- name: pushgateway-external
port: 80
targetPort: http
type: NodePort
selector:
app: pushgateway-proxy