-
Notifications
You must be signed in to change notification settings - Fork 0
/
values.yaml
672 lines (503 loc) · 18.1 KB
/
values.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
# Default values for geostreams.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: geostreams/geostreams
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"
geodashboard:
project: cinet
repository: hub.ncsa.illinois.edu/geostreams
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"
port: 80
www:
project: cinet
repository: hub.ncsa.illinois.edu/geostreams/cinet_www
pullPolicy: IfNotPresent
tag: "latest"
port: 80
imagePullSecrets:
- name: regcred
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 9000
ingress:
enabled: true
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: cinet.127.0.0.1.nip.io
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity: {}
postgresql:
postgresqlUsername: postgres
postgresqlPassword: geostreams
postgresqlDatabase: geostreams
# postgresqlPostgresPassword: geostreams
initdbScripts:
geostreams.sql: |
CONNECT geostreams;
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
--
-- Name: postgis; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;
--
-- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: datapoints; Type: TABLE; Schema: public; Owner: geostreams
--
CREATE TABLE datapoints (
gid integer NOT NULL,
geog geography,
start_time timestamp with time zone,
end_time timestamp with time zone,
data json,
stream_id integer,
created timestamp with time zone
);
ALTER TABLE datapoints OWNER TO geostreams;
--
-- Name: geoindex_gid_seq; Type: SEQUENCE; Schema: public; Owner: geostreams
--
CREATE SEQUENCE geoindex_gid_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE geoindex_gid_seq OWNER TO geostreams;
--
-- Name: geoindex_gid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: geostreams
--
ALTER SEQUENCE geoindex_gid_seq OWNED BY datapoints.gid;
--
-- Name: sensors; Type: TABLE; Schema: public; Owner: geostreams
--
CREATE TABLE sensors (
gid integer NOT NULL,
name character varying(255),
geog geography,
created timestamp with time zone,
metadata json
);
ALTER TABLE sensors OWNER TO geostreams;
--
-- Name: sensors_gid_seq; Type: SEQUENCE; Schema: public; Owner: geostreams
--
CREATE SEQUENCE sensors_gid_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sensors_gid_seq OWNER TO geostreams;
--
-- Name: sensors_gid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: geostreams
--
ALTER SEQUENCE sensors_gid_seq OWNED BY sensors.gid;
--
-- Name: streams; Type: TABLE; Schema: public; Owner: geostreams
--
CREATE TABLE streams (
gid integer NOT NULL,
name character varying(255),
geog geography,
created timestamp with time zone,
metadata json,
sensor_id integer,
start_time timestamp with time zone,
end_time timestamp with time zone,
params text[]
);
ALTER TABLE streams OWNER TO geostreams;
--
-- Name: streams_gid_seq; Type: SEQUENCE; Schema: public; Owner: geostreams
--
CREATE SEQUENCE streams_gid_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE streams_gid_seq OWNER TO geostreams;
--
-- Name: streams_gid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: geostreams
--
ALTER SEQUENCE streams_gid_seq OWNED BY streams.gid;
-- Name: bins_year; Type: TABLE; Schema: public; Owner: geostreams
--
CREATE TABLE bins_year (
sensor_id integer NOT NULL,
yyyy integer,
parameter character varying(255),
datapoint_count integer,
sum float8,
average float8,
start_time timestamp with time zone,
end_time timestamp with time zone,
updated timestamp with time zone,
PRIMARY KEY (sensor_id, yyyy, parameter)
);
ALTER TABLE bins_year OWNER TO geostreams;
-- Name: bins_month; Type: TABLE; Schema: public; Owner: geostreams
--
CREATE TABLE bins_month (
sensor_id integer NOT NULL,
yyyy integer,
mm integer,
parameter character varying(255),
datapoint_count integer,
sum float8,
average float8,
start_time timestamp with time zone,
end_time timestamp with time zone,
updated timestamp with time zone,
PRIMARY KEY (sensor_id, yyyy, mm, parameter)
);
ALTER TABLE bins_month OWNER TO geostreams;
-- Name: bins_hour; Type: TABLE; Schema: public; Owner: geostreams
--
CREATE TABLE bins_day (
sensor_id integer NOT NULL,
yyyy integer,
mm integer,
dd integer,
parameter character varying(255),
datapoint_count integer,
sum float8,
average float8,
start_time timestamp with time zone,
end_time timestamp with time zone,
updated timestamp with time zone,
PRIMARY KEY (sensor_id, yyyy, mm, dd, parameter)
);
ALTER TABLE bins_day OWNER TO geostreams;
-- Name: bins_hour; Type: TABLE; Schema: public; Owner: geostreams
--
CREATE TABLE bins_hour (
sensor_id integer NOT NULL,
yyyy integer,
mm integer,
dd integer,
hh integer,
parameter character varying(255),
datapoint_count integer,
sum float8,
average float8,
start_time timestamp with time zone,
end_time timestamp with time zone,
updated timestamp with time zone,
PRIMARY KEY (sensor_id, yyyy, mm, dd, hh, parameter)
);
ALTER TABLE bins_hour OWNER TO geostreams;
-- Name: bins_season; Type: TABLE; Schema: public; Owner: geostreams
--
CREATE TABLE bins_season (
sensor_id integer NOT NULL,
yyyy integer,
season character varying(10),
parameter character varying(255),
datapoint_count integer,
sum float8,
average float8,
start_time timestamp with time zone,
end_time timestamp with time zone,
updated timestamp with time zone,
PRIMARY KEY (sensor_id, yyyy, season, parameter)
);
ALTER TABLE bins_season OWNER TO geostreams;
--
-- Name: gid; Type: DEFAULT; Schema: public; Owner: geostreams
--
ALTER TABLE ONLY datapoints ALTER COLUMN gid SET DEFAULT nextval('geoindex_gid_seq'::regclass);
--
-- Name: gid; Type: DEFAULT; Schema: public; Owner: geostreams
--
ALTER TABLE ONLY sensors ALTER COLUMN gid SET DEFAULT nextval('sensors_gid_seq'::regclass);
--
-- Name: gid; Type: DEFAULT; Schema: public; Owner: geostreams
--
ALTER TABLE ONLY streams ALTER COLUMN gid SET DEFAULT nextval('streams_gid_seq'::regclass);
--
-- Name: geoindex_pkey; Type: CONSTRAINT; Schema: public; Owner: geostreams
--
ALTER TABLE ONLY datapoints
ADD CONSTRAINT geoindex_pkey PRIMARY KEY (gid);
--
-- Name: sensors_pkey; Type: CONSTRAINT; Schema: public; Owner: geostreams
--
ALTER TABLE ONLY sensors
ADD CONSTRAINT sensors_pkey PRIMARY KEY (gid);
--
-- Name: streams_pkey; Type: CONSTRAINT; Schema: public; Owner: geostreams
--
ALTER TABLE ONLY streams
ADD CONSTRAINT streams_pkey PRIMARY KEY (gid);
--
-- Name: geoindex_gix; Type: INDEX; Schema: public; Owner: geostreams
--
CREATE INDEX geoindex_gix ON datapoints USING gist (geog);
--
-- Name: geoindex_stream_id; Type: INDEX; Schema: public; Owner: geostreams
--
CREATE INDEX geoindex_stream_id ON datapoints USING btree (stream_id);
--
-- Name: geoindex_times; Type: INDEX; Schema: public; Owner: geostreams
--
CREATE INDEX geoindex_times ON datapoints USING btree (start_time, end_time);
--
-- Name: sensors_gix; Type: INDEX; Schema: public; Owner: geostreams
--
CREATE INDEX sensors_gix ON sensors USING gist (geog);
--
-- Name: streams_gix; Type: INDEX; Schema: public; Owner: geostreams
--
CREATE INDEX streams_gix ON streams USING gist (geog);
--
-- Name: streams_sensor_id; Type: INDEX; Schema: public; Owner: geostreams
--
CREATE INDEX streams_sensor_id ON streams USING btree (sensor_id);
--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO geostreams;
GRANT ALL ON SCHEMA public TO PUBLIC;
--
-- Name: datapoints; Type: ACL; Schema: public; Owner: geostreams
--
REVOKE ALL ON TABLE datapoints FROM PUBLIC;
REVOKE ALL ON TABLE datapoints FROM geostreams;
GRANT ALL ON TABLE datapoints TO geostreams;
--
-- Name: geoindex_gid_seq; Type: ACL; Schema: public; Owner: geostreams
--
REVOKE ALL ON SEQUENCE geoindex_gid_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE geoindex_gid_seq FROM geostreams;
GRANT ALL ON SEQUENCE geoindex_gid_seq TO geostreams;
--
-- Name: sensors; Type: ACL; Schema: public; Owner: geostreams
--
REVOKE ALL ON TABLE sensors FROM PUBLIC;
REVOKE ALL ON TABLE sensors FROM geostreams;
GRANT ALL ON TABLE sensors TO geostreams;
--
-- Name: sensors_gid_seq; Type: ACL; Schema: public; Owner: geostreams
--
REVOKE ALL ON SEQUENCE sensors_gid_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE sensors_gid_seq FROM geostreams;
GRANT ALL ON SEQUENCE sensors_gid_seq TO geostreams;
--
-- Name: streams; Type: ACL; Schema: public; Owner: geostreams
--
REVOKE ALL ON TABLE streams FROM PUBLIC;
REVOKE ALL ON TABLE streams FROM geostreams;
GRANT ALL ON TABLE streams TO geostreams;
--
-- Name: streams_gid_seq; Type: ACL; Schema: public; Owner: geostreams
--
REVOKE ALL ON SEQUENCE streams_gid_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE streams_gid_seq FROM geostreams;
GRANT ALL ON SEQUENCE streams_gid_seq TO geostreams;
--
-- Name: users; Type: TABLE; Schema: public; Owner: geostreams
--
CREATE TABLE users (
gid integer default nextval('geoindex_gid_seq'::regclass) PRIMARY KEY,
email varchar(40) NOT NULL,
emailConfirmed boolean,
password varchar(80) NOT NULL,
first_name varchar(20) NOT NULL,
last_name varchar(20) NOT NULL,
organization varchar(80) NOT NULL,
services varchar(60) NOT NULL
);
ALTER TABLE users OWNER TO geostreams;
--
-- Name: events; Type: TABLE; Schema: public; Owner: geostreams
--
CREATE TABLE events (
gid integer default nextval('geoindex_gid_seq'::regclass) PRIMARY KEY,
userid integer REFERENCES users (gid),
sources varchar(50),
attributes text,
geocode varchar(2000),
since varchar(50),
until varchar(50),
purpose varchar(1000),
downloaddate timestamp with time zone
);
ALTER TABLE events OWNER TO geostreams;
-- need to be postgres user to do this
-- can list casts with \dC
create or replace function cast_to_double(text) returns DOUBLE PRECISION as $$
begin
-- Note the double casting to avoid infinite recursion.
return cast($1::varchar as DOUBLE PRECISION);
exception
when invalid_text_representation then
return 0.0;
end;
$$ language plpgsql immutable;
create cast (text as DOUBLE PRECISION) with function cast_to_double(text);
--
-- Name: regions; Type: TABLE; Schema: public; Owner: geostreams
-- id is not integer, it's short name like 'su'.
-- boundary & center_coordinate is not used currently
--
CREATE TABLE regions(
id varchar(10) PRIMARY KEY,
title varchar(200),
boundary geography,
center_coordinate geography
);
ALTER TABLE regions OWNER TO geostreams;
--
-- Name: region_trends; Type: TABLE; Schema: public; Owner: geostreams
--
CREATE TABLE region_trends(
region_id varchar(10) REFERENCES regions(id),
season varchar(8),
parameter varchar(200),
lastaverage float8,
tenyearsaverage float8,
totalaverage float8,
PRIMARY KEY (region_id, season, parameter)
);
ALTER TABLE region_trends OWNER TO geostreams;
CREATE TABLE parameters
(
gid integer default nextval('geoindex_gid_seq' :: regclass) not null
constraint parameters_pkey
primary key,
name varchar(200) not null,
title varchar(200),
unit varchar(20),
search_view boolean default true,
explore_view boolean default true,
scale_names varchar(250),
scale_colors varchar(100)
);
CREATE UNIQUE index parameters_gid_uindex
on parameters (gid);
CREATE UNIQUE index parameters_name_uindex
on parameters (name);
ALTER TABLE parameters OWNER TO geostreams;
CREATE TABLE categories
(
gid integer default nextval('geoindex_gid_seq' :: regclass) not null
constraint categories_pkey
primary key,
name varchar(50),
detail_type varchar(50)
);
CREATE UNIQUE index categories_id_uindex
on categories (gid);
ALTER TABLE categories OWNER TO geostreams;
CREATE TABLE parameter_categories
(
gid integer default nextval('geoindex_gid_seq' :: regclass) not null
constraint parameter_categories_pkey
primary key,
parameter_gid integer not null
constraint parameter_fk
references parameters,
category_gid integer not null
constraint categories_fk
references categories
);
ALTER TABLE parameter_categories OWNER TO geostreams;
CREATE VIEW annotated_datapoints AS
SELECT datapoints.gid AS id,
datapoints.geog AS geog,
to_char(datapoints.created AT TIME ZONE 'UTC', 'YYYY-MM-DD\"T\"HH24:MI:SSZ') AS created,
to_char(datapoints.start_time AT TIME ZONE 'UTC', 'YYYY-MM-DD\"T\"HH24:MI:SSZ') AS start_time,
to_char(datapoints.end_time AT TIME ZONE 'UTC', 'YYYY-MM-DD\"T\"HH24:MI:SSZ') AS end_time,
datapoints.data AS properties,
'Feature'::varchar(10) AS type,
ST_AsGeoJson(1, datapoints.geog, 15, 0)::json AS geometry,
stream_id::int,
sensor_id::int,
sensors.name AS sensor_name,
sensors.metadata AS metadata
FROM datapoints,
sensors,
streams
WHERE datapoints.stream_id = streams.gid
AND streams.sensor_id = sensors.gid;
ALTER TABLE annotated_datapoints OWNER TO geostreams;
--
-- PostgreSQL database dump complete
--