Skip to content

Commit

Permalink
Uwsgi-fifo-config (#47)
Browse files Browse the repository at this point in the history
* feat: adding shared config for uwsgi's config

* chore: configuration

* chore: testing

* feat: adding shared storage for uwsgi

* docs: comments for configuration

* chore: fix comments

* fix: comments

* fix: comments

* fix: comments

* fix: external config value for mapproxinator - fifo path

* chore: adjust config values

* fix: change reload configuration
  • Loading branch information
ronenkapelian authored Dec 12, 2023
1 parent c06d44b commit d677072
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
fileConfig(r'/mapproxy/log.ini', {'here': os.path.dirname(__file__)})

# create map proxy application
map_proxy = make_wsgi_app(r'/mapproxy/mapproxy.yaml', reloader=True)
map_proxy = make_wsgi_app(r'/mapproxy/mapproxy.yaml', reloader=False)

# add cors support
if(os.environ.get('CORS_ENABLED', 'false').lower() == 'true'):
Expand Down
2 changes: 2 additions & 0 deletions helm/config/mapProxyUwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
; based on https://github.com/kartoza/docker-mapproxy/blob/master/build_data/uwsgi.ini
chdir = /mapproxy
pyargv = /mapproxy.yaml
; attention do not change - its releated to volumesMount configuration and mapproxinator
master-fifo = /uwsgi_config/fifo0
wsgi-file = app.py
pidfile=/tmp/mapproxy.pid
socket = :{{ .Values.mapproxy.uwsgi.socket }}
Expand Down
4 changes: 4 additions & 0 deletions helm/templates/mapproxinator-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
value: /mapproxy/updated_time.json
- name: YAML_DESTINATION_FILE_PATH
value: /mapproxy/mapproxy.yaml
- name: UWSGI_FIFO_FILE_PATH
value: /uwsgi_config/fifo0
{{- if eq (upper .Values.rasterCommon.storage.mapproxyConfigProvider) "FS" }}
- name: FS_YAML_SOURCE_FILE_PATH
value: /configSource/mapproxy.yaml
Expand Down Expand Up @@ -51,6 +53,8 @@
- configMapRef:
name: {{ .releaseName }}-mapproxinator-configmap
volumeMounts:
- name: shared-config
mountPath: /uwsgi_config
- mountPath: /mapproxy/mapproxy.yaml
name: mapproxy-config
subPath: mapproxy.yaml
Expand Down
2 changes: 2 additions & 0 deletions helm/templates/mapproxy-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
volumes:
- name: mapproxy-config
emptyDir: {}
- name: shared-config
emptyDir: {}
{{- if .Values.rasterCommon.db.sslEnabled }}
- name: ca-file
secret:
Expand Down
2 changes: 2 additions & 0 deletions helm/templates/mapproxy-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
{{- toYaml .resources.value | nindent 12 }}
{{- end }}
volumeMounts:
- name: shared-config
mountPath: /uwsgi_config
- mountPath: /mapproxy/mapproxy.yaml
name: mapproxy-config
subPath: mapproxy.yaml
Expand Down
3 changes: 0 additions & 3 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,6 @@ mapproxinator:
poll:
timeout:
frequencyMS: 5000
readinessKillMaxSeconds: 300
requestsKillSeconds: 5
afterUpdateDelaySeconds: 0.5
ssl: # external paths
CA_DIR: /opt/certs/ca/
KEY_DIR: /opt/certs/key/
Expand Down

0 comments on commit d677072

Please sign in to comment.