forked from hiroksarker/statuz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devspace.yaml
171 lines (162 loc) · 4.24 KB
/
devspace.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
version: v2beta1
name: statuz
pipelines:
dev:
run: |-
run_dependencies --all
ensure_pull_secrets --all
create_deployments --all
start_dev --all
deploy:
run: |-
run_dependencies --all
ensure_pull_secrets --all
build_images --all -t $(git describe --always)
create_deployments --all
images:
watcher:
image: watcher
custom:
command: |-
docker build -t ${runtime.images.watcher.image}:${runtime.images.watcher.tag} . -f svc/watcher/Dockerfile
genie:
image: genie
custom:
command: |-
docker build -t ${runtime.images.genie.image}:${runtime.images.genie.tag} . -f svc/genie/Dockerfile
deployments:
watcher:
helm:
chart:
name: component-chart
repo: https://charts.devspace.sh
values:
containers:
- image: quay.io/statuz/watcher:main
env:
# TODO: remove dependency on env variables
- name: TYPE
value: webpage
- name: ENDPOINT
value: https://www.google.com
- name: INTERVAL
value: 15s
service:
ports:
- port: 8080
genie:
helm:
chart:
name: component-chart
repo: https://charts.devspace.sh
values:
containers:
- image: quay.io/statuz/genie:main
service:
ports:
- port: 8081
prometheus:
helm:
chart:
name: prometheus
repo: https://prometheus-community.github.io/helm-charts
values:
serverFiles:
rule_files:
- /etc/config/recording_rules.yml
- /etc/config/alerting_rules.yml
prometheus.yml:
scrape_configs:
- job_name: prometheus
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- localhost:9090
- job_name: watcher
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- watcher:8080
grafana:
helm:
chart:
name: grafana
repo: https://grafana.github.io/helm-charts
values:
grafana.ini:
auth.anonymous:
enabled: true
org_role: Admin
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus-server:80
dev:
watcher:
imageSelector: quay.io/statuz/watcher
devImage: ghcr.io/loft-sh/devspace-containers/go:1.18-alpine
sync:
- path: ./
terminal:
command: ./devspace_start.sh
ssh:
enabled: true
proxyCommands:
- command: devspace
- command: kubectl
- command: helm
- gitCredentials: true
ports:
- port: "2345"
- port: "8080"
open:
- url: http://localhost:8080
env:
- name: TYPE
value: webpage
- name: ENDPOINT
value: https://www.google.com
- name: INTERVAL
value: 15s
genie:
imageSelector: quay.io/statuz/genie
devImage: ghcr.io/loft-sh/devspace-containers/go:1.18-alpine
sync:
- path: ./
terminal:
command: ./devspace_start.sh
ssh:
enabled: true
proxyCommands:
- command: devspace
- command: kubectl
- command: helm
- gitCredentials: true
ports:
- port: "2346"
- port: "8081"
open:
- url: http://localhost:8081
commands:
migrate-db:
command: |-
echo 'This is a cross-platform, shared command that can be used to codify any kind of dev task.'
echo 'Anyone using this project can invoke it via "devspace run migrate-db"'
# Define dependencies to other projects with a devspace.yaml
# dependencies:
# api:
# git: https://... # Git-based dependencies
# tag: v1.0.0
# ui:
# path: ./ui # Path-based dependencies (for monorepos)