-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpygeoapi-config.yaml
More file actions
206 lines (203 loc) · 5.81 KB
/
pygeoapi-config.yaml
File metadata and controls
206 lines (203 loc) · 5.81 KB
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
server:
bind:
host: 0.0.0.0
port: 80
url: http://localhost:80
mimetype: application/json; charset=UTF-8
encoding: utf-8
gzip: false
languages:
# First language is the default language
- en-US
- fr-CA
# cors: true
pretty_print: true
limits:
default_items: 50
max_items: 1000
max_distance_x: 25
max_distance_y: 25
max_distance_units: m
on_exceed: throttle
map:
url: https://tile.openstreetmap.org/{z}/{x}/{y}.png
attribution: '© <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
manager:
name: pygeoapi_k8s_manager.KubernetesManager
logging:
botocore: INFO
kubernetes: INFO
pygeoapi.l10n: ERROR
# enable k8s finalizer controller
finalizer_controller: true
admin: false # enable admin api
logging:
level: DEBUG
#logfile: /tmp/pygeoapi.log
#
# default: '[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s'
#
# https://github.com/geopython/pygeoapi/blob/master/pygeoapi/log.py#L49-L51
#
# https://docs.python.org/3/library/logging.html#logrecord-attributes
#
logformat: '[%(asctime)s | %(name)s::%(module)s.py:%(lineno)d | %(process)d] %(levelname)s - %(message)s'
#
# default: '%Y-%m-%dT%H:%M:%SZ'
#
# https://github.com/geopython/pygeoapi/blob/master/pygeoapi/log.py#L52
#
# https://docs.python.org/3/library/time.html#time.strftime
#
dateformat: '%Y-%m-%dT%H:%M:%SZ'
metadata:
identification:
title:
en: pygeoapi default instance
fr: instance par défaut de pygeoapi
description:
en: pygeoapi provides an API to geospatial data
fr: pygeoapi fournit une API aux données géospatiales
keywords:
en:
- geospatial
- data
- api
fr:
- géospatiale
- données
- api
keywords_type: theme
terms_of_service: https://creativecommons.org/licenses/by/4.0/
url: https://example.org
license:
name: CC-BY 4.0 license
url: https://creativecommons.org/licenses/by/4.0/
provider:
name: Organization Name
url: https://pygeoapi.io
contact:
name: Lastname, Firstname
position: Position Title
address: Mailing Address
city: City
stateorprovince: Administrative Area
postalcode: Zip or Postal Code
country: Country
phone: +xx-xxx-xxx-xxxx
fax: +xx-xxx-xxx-xxxx
email: you@example.org
url: Contact URL
hours: Mo-Fr 08:00-17:00
instructions: During hours of service. Off on weekends.
role: pointOfContact
resources:
hello-world-k8s:
type: process
processor:
name: pygeoapi_k8s_manager.process.HelloWorldK8sProcessor
hello-world-k8s-sleep:
type: process
processor:
name: pygeoapi_k8s_manager.process.HelloWorldK8sProcessor
command:
- date
- echo start and now sleeping 10s
- sleep 10
hello-world-k8s-sleep-failing:
type: process
processor:
name: pygeoapi_k8s_manager.process.HelloWorldK8sProcessor
command:
- date
- echo start and now sleeping 10s
- sleep 10
- echo oh no, we are failing
- exit 1
generic-image-processor-example:
type: process
processor:
name: pygeoapi_k8s_manager.process.GenericImageProcessor
metadata:
version: 0.1
id: generic-image-processor-example
title:
en: "Generic Image Processor Example"
description:
en: "Example Configuration of Generic Image Processor"
keywords:
- generic image processor example
- example
- generic image processor
- k8s
- k8s manager
- KubernetesManager
links:
- type: text/html
rel: about
title: Processor Code Repository
href: https://github.com/52North/pygeoapi_k8s-manager/tree/main/src/pygeoapi_k8s_manager/process/generic_image.py
hreflang: en-UK
inputs:
token:
title: secret token
description: identify yourself
schema:
type: string
outputs:
logs:
title: logs
description: The logs of the job
schema:
type: string
contentMediaType: application/json
example:
inputs:
token: token
default_image: bash:latest
# OPTIONAL
# image_pull_secrets: default-secret
command:
- bash
- -c
- "date; env | sort"
env:
# env from secrets (requires existing secrets in k8s cluster!)
# - name: EXAMPLE_ENV_FROM_SECRET
# secret_name: example-secret-name
# secret_key: example-secret-key
# simple env
- name: SIMPLE_ENV_BOOLEAN_AS_STRING
value: "False"
- name: SIMPLE_ENV_BOOLEAN_AS_BOOLEAN
value: False
- name: SIMPLE_ENV_STRING
value: "simple-env-string"
- name: SIMPLE_ENV_INTEGER
value: 1024
resources:
requests:
memory: 16M
cpu: 10m
limits:
memory: 256M
cpu: 100m
storage:
# See: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims
- name: test-storage
mount_path: /tmp/test-storage
persistent_volume_claim_name: test-storage-pvc-name
# See https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
- name: test-empty-dir-storage
mount_path: /tmp/test-empty-dir-storage
empty_dir: {}
- name: test-empty-dir-storage-with-config
mount_path: /tmp/test-empty-dir-storage-with-config
empty_dir:
size_limit: 500Mi
medium: Memory
tolerations:
- key: "toleration-key"
value: "toleration-value"
operator: "Equal"
effect: "NoSchedule"