Mercurial > code > home > repos > collector
comparison deploy.yaml @ 7:fd73907cef40
project upgrades: pdm, pnpm, vite, nginx router
author | drewp@bigasterisk.com |
---|---|
date | Fri, 25 Nov 2022 20:31:00 -0800 |
parents | f10a7ff3673d |
children | bfd95926be6e |
comparison
equal
deleted
inserted
replaced
6:a3b6b06fc699 | 7:fd73907cef40 |
---|---|
1 apiVersion: v1 | |
2 kind: ConfigMap | |
3 metadata: | |
4 name: collector-nginx-conf | |
5 data: | |
6 nginx.conf: | | |
7 error_log /dev/stderr; | |
8 pid /dev/null; | |
9 events { | |
10 worker_connections 16; | |
11 } | |
12 http { | |
13 log_format main '[$time_local] code=$status bytes_sent=$bytes_sent req="$request"'; | |
14 proxy_headers_hash_bucket_size 128; | |
15 proxy_buffering off; | |
16 server { | |
17 access_log /dev/stderr main; | |
18 location = /collector/state { proxy_pass http://127.0.0.1:9072/state; } | |
19 location /collector/graph/ { proxy_pass http://127.0.0.1:9072/graph/; } | |
20 location = /collector/metrics { proxy_pass http://127.0.0.1:9072/metrics; } | |
21 location = /metrics { proxy_pass http://127.0.0.1:9072/metrics; } | |
22 | |
23 location = /collector/vite-ws { | |
24 proxy_pass http://127.0.0.1:8002/collector/vite-ws; | |
25 proxy_http_version 1.1; | |
26 proxy_set_header Upgrade $http_upgrade; | |
27 proxy_set_header Connection "Upgrade"; | |
28 proxy_set_header Host $host; | |
29 } | |
30 | |
31 location /collector/ { proxy_pass http://127.0.0.1:8002/collector/; } | |
32 } | |
33 } | |
34 --- | |
1 apiVersion: apps/v1 | 35 apiVersion: apps/v1 |
2 kind: Deployment | 36 kind: Deployment |
3 metadata: | 37 metadata: |
4 name: collector | 38 name: collector |
5 spec: | 39 spec: |
10 template: | 44 template: |
11 metadata: | 45 metadata: |
12 labels: | 46 labels: |
13 app: collector | 47 app: collector |
14 spec: | 48 spec: |
49 volumes: | |
50 - { name: nginx-conf, configMap: { name: collector-nginx-conf } } | |
15 containers: | 51 containers: |
52 - name: proxy | |
53 image: nginx:1.21.6 | |
54 ports: | |
55 - containerPort: 80 | |
56 volumeMounts: | |
57 - { name: nginx-conf, mountPath: "/etc/nginx/" } | |
58 | |
16 - name: collector | 59 - name: collector |
17 image: bang5:5000/collector_image | 60 image: bang5:5000/collector_image |
18 command: | 61 command: |
19 - pipenv | 62 - pdm |
20 - run | 63 - run |
21 - python | 64 - python |
22 - collector.py | 65 - collector.py |
66 - "-v" | |
23 ports: | 67 ports: |
24 - containerPort: 9072 | 68 - containerPort: 9072 |
69 | |
70 - name: view | |
71 image: bang5:5000/collector_image | |
72 command: | |
73 - pnpx | |
74 - vite | |
75 - --mode=dev | |
76 - --logLevel=info | |
77 - --debug | |
78 ports: | |
79 - containerPort: 8002 | |
25 --- | 80 --- |
26 apiVersion: v1 | 81 apiVersion: v1 |
27 kind: Service | 82 kind: Service |
28 metadata: | 83 metadata: |
29 name: collector | 84 name: collector |
30 spec: | 85 spec: |
31 ports: | 86 ports: |
32 - {port: 9072, targetPort: 9072} | 87 - { port: 80, targetPort: 80 } |
33 selector: | 88 selector: |
34 app: collector | 89 app: collector |