Skip to content

Commit 5307113

Browse files
committed
update script to fix pre-commit failure
1 parent 160d913 commit 5307113

1 file changed

Lines changed: 136 additions & 138 deletions

File tree

Lines changed: 136 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -1,151 +1,149 @@
1+
# Used by CI workflow tests for remote monitoring.
12
apiVersion: v1
2-
kind: ConfigMap
3-
metadata:
4-
name: monitoring-gateway-nginx
5-
namespace: remote-monitoring
6-
data:
7-
default.conf: |
8-
server {
9-
listen 8080;
10-
auth_basic "Monitoring gateway";
11-
auth_basic_user_file /etc/nginx/.htpasswd;
3+
kind: List
4+
items:
5+
- apiVersion: v1
6+
kind: ConfigMap
7+
metadata:
8+
name: monitoring-gateway-nginx
9+
namespace: remote-monitoring
10+
data:
11+
default.conf: |
12+
server {
13+
listen 8080;
14+
auth_basic "Monitoring gateway";
15+
auth_basic_user_file /etc/nginx/.htpasswd;
1216
13-
location /api/v1/ {
14-
proxy_pass http://vmsingle.remote-monitoring.svc.cluster.local:8428;
15-
}
17+
location /api/v1/ {
18+
proxy_pass http://vmsingle.remote-monitoring.svc.cluster.local:8428;
19+
}
1620
17-
location /loki/api/v1/push {
18-
proxy_pass http://victoria-logs.remote-monitoring.svc.cluster.local:9428/insert/loki/api/v1/push;
19-
}
21+
location /loki/api/v1/push {
22+
proxy_pass http://victoria-logs.remote-monitoring.svc.cluster.local:9428/insert/loki/api/v1/push;
23+
}
2024
21-
location /select/ {
22-
proxy_pass http://victoria-logs.remote-monitoring.svc.cluster.local:9428/select/;
23-
}
24-
}
25-
---
26-
apiVersion: apps/v1
27-
kind: Deployment
28-
metadata:
29-
name: vmsingle
30-
namespace: remote-monitoring
31-
spec:
32-
replicas: 1
33-
selector:
34-
matchLabels:
35-
app: vmsingle
36-
template:
25+
location /select/ {
26+
proxy_pass http://victoria-logs.remote-monitoring.svc.cluster.local:9428/select/;
27+
}
28+
}
29+
- apiVersion: apps/v1
30+
kind: Deployment
31+
metadata:
32+
name: vmsingle
33+
namespace: remote-monitoring
34+
spec:
35+
replicas: 1
36+
selector:
37+
matchLabels:
38+
app: vmsingle
39+
template:
40+
metadata:
41+
labels:
42+
app: vmsingle
43+
spec:
44+
containers:
45+
- name: vmsingle
46+
image: victoriametrics/victoria-metrics:latest
47+
args:
48+
- -retentionPeriod=1
49+
ports:
50+
- containerPort: 8428
51+
- apiVersion: v1
52+
kind: Service
3753
metadata:
38-
labels:
54+
name: vmsingle
55+
namespace: remote-monitoring
56+
spec:
57+
selector:
3958
app: vmsingle
59+
ports:
60+
- name: http
61+
port: 8428
62+
targetPort: 8428
63+
- apiVersion: apps/v1
64+
kind: Deployment
65+
metadata:
66+
name: victoria-logs
67+
namespace: remote-monitoring
4068
spec:
41-
containers:
42-
- name: vmsingle
43-
image: victoriametrics/victoria-metrics:latest
44-
args:
45-
- -retentionPeriod=1
46-
ports:
47-
- containerPort: 8428
48-
---
49-
apiVersion: v1
50-
kind: Service
51-
metadata:
52-
name: vmsingle
53-
namespace: remote-monitoring
54-
spec:
55-
selector:
56-
app: vmsingle
57-
ports:
58-
- name: http
59-
port: 8428
60-
targetPort: 8428
61-
---
62-
apiVersion: apps/v1
63-
kind: Deployment
64-
metadata:
65-
name: victoria-logs
66-
namespace: remote-monitoring
67-
spec:
68-
replicas: 1
69-
selector:
70-
matchLabels:
71-
app: victoria-logs
72-
template:
69+
replicas: 1
70+
selector:
71+
matchLabels:
72+
app: victoria-logs
73+
template:
74+
metadata:
75+
labels:
76+
app: victoria-logs
77+
spec:
78+
containers:
79+
- name: victoria-logs
80+
image: victoriametrics/victoria-logs:latest
81+
ports:
82+
- containerPort: 9428
83+
- apiVersion: v1
84+
kind: Service
7385
metadata:
74-
labels:
75-
app: victoria-logs
86+
name: victoria-logs
87+
namespace: remote-monitoring
7688
spec:
77-
containers:
78-
- name: victoria-logs
79-
image: victoriametrics/victoria-logs:latest
80-
ports:
81-
- containerPort: 9428
82-
---
83-
apiVersion: v1
84-
kind: Service
85-
metadata:
86-
name: victoria-logs
87-
namespace: remote-monitoring
88-
spec:
89-
selector:
90-
app: victoria-logs
91-
ports:
92-
- name: http
93-
port: 9428
94-
targetPort: 9428
95-
---
96-
apiVersion: apps/v1
97-
kind: Deployment
98-
metadata:
99-
name: monitoring-gateway
100-
namespace: remote-monitoring
101-
spec:
102-
replicas: 1
103-
selector:
104-
matchLabels:
105-
app: monitoring-gateway
106-
template:
89+
selector:
90+
app: victoria-logs
91+
ports:
92+
- name: http
93+
port: 9428
94+
targetPort: 9428
95+
- apiVersion: apps/v1
96+
kind: Deployment
10797
metadata:
108-
labels:
109-
app: monitoring-gateway
98+
name: monitoring-gateway
99+
namespace: remote-monitoring
110100
spec:
111-
containers:
112-
- name: nginx
113-
image: nginx:1.27-alpine
114-
command: ["/bin/sh", "-ec"]
115-
args:
116-
- |
117-
until getent hosts vmsingle.remote-monitoring.svc.cluster.local >/dev/null 2>&1 && \
118-
getent hosts victoria-logs.remote-monitoring.svc.cluster.local >/dev/null 2>&1; do
119-
echo "Waiting for remote-monitoring service DNS records..."
120-
sleep 2
121-
done
122-
exec nginx -g 'daemon off;'
123-
ports:
124-
- containerPort: 8080
125-
volumeMounts:
101+
replicas: 1
102+
selector:
103+
matchLabels:
104+
app: monitoring-gateway
105+
template:
106+
metadata:
107+
labels:
108+
app: monitoring-gateway
109+
spec:
110+
containers:
111+
- name: nginx
112+
image: nginx:1.27-alpine
113+
command: ["/bin/sh", "-ec"]
114+
args:
115+
- |
116+
until getent hosts vmsingle.remote-monitoring.svc.cluster.local >/dev/null 2>&1 && \
117+
getent hosts victoria-logs.remote-monitoring.svc.cluster.local >/dev/null 2>&1; do
118+
echo "Waiting for remote-monitoring service DNS records..."
119+
sleep 2
120+
done
121+
exec nginx -g 'daemon off;'
122+
ports:
123+
- containerPort: 8080
124+
volumeMounts:
125+
- name: nginx-conf
126+
mountPath: /etc/nginx/conf.d
127+
- name: auth
128+
mountPath: /etc/nginx/.htpasswd
129+
subPath: .htpasswd
130+
readOnly: true
131+
volumes:
126132
- name: nginx-conf
127-
mountPath: /etc/nginx/conf.d
133+
configMap:
134+
name: monitoring-gateway-nginx
128135
- name: auth
129-
mountPath: /etc/nginx/.htpasswd
130-
subPath: .htpasswd
131-
readOnly: true
132-
volumes:
133-
- name: nginx-conf
134-
configMap:
135-
name: monitoring-gateway-nginx
136-
- name: auth
137-
secret:
138-
secretName: monitoring-basic-auth-htpasswd
139-
---
140-
apiVersion: v1
141-
kind: Service
142-
metadata:
143-
name: monitoring-gateway
144-
namespace: remote-monitoring
145-
spec:
146-
selector:
147-
app: monitoring-gateway
148-
ports:
149-
- name: http
150-
port: 80
151-
targetPort: 8080
136+
secret:
137+
secretName: monitoring-basic-auth-htpasswd
138+
- apiVersion: v1
139+
kind: Service
140+
metadata:
141+
name: monitoring-gateway
142+
namespace: remote-monitoring
143+
spec:
144+
selector:
145+
app: monitoring-gateway
146+
ports:
147+
- name: http
148+
port: 80
149+
targetPort: 8080

0 commit comments

Comments
 (0)