Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to run the gateway without mongodb #1671

Open
wants to merge 5 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added api/helm/commonground-gateway-1.6.0.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion api/helm/commonground-gateway/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.5.5
version: 1.6.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
12 changes: 12 additions & 0 deletions api/helm/commonground-gateway/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ spec:
name: {{ include "commonground-gateway.fullname" . }}-doctrineconfig
defaultMode: 420
{{- end }}
{{- if eq .Values.cacheType "postgresql" }}
- name: monolog
configMap:
name: {{ include "commonground-gateway.fullname" . }}-monolog
defaultMode: 420
{{- end }}
- name: vendor
persistentVolumeClaim:
claimName: {{ include "commonground-gateway.fullname" . }}-vendor
Expand Down Expand Up @@ -140,6 +146,12 @@ spec:
name: doctrine
readOnly: true
{{- end }}
{{- if eq .Values.cacheType "postgresql" }}
- mountPath: /srv/api/config/packages/monolog.yaml
subPath: monolog.yaml
name: monolog
readOnly: true
{{- end }}
- mountPath: /srv/api/vendor
subPath: vendor
name: vendor
Expand Down
69 changes: 69 additions & 0 deletions api/helm/commonground-gateway/templates/framework-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,72 @@ data:
regexp_replace: DoctrineExtensions\Query\Postgresql\RegexpReplace

{{- end }}
---
{{- if eq .Values.cacheType "postgresql" }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "commonground-gateway.fullname" . }}-monolog
labels:
{{- include "commonground-gateway.labels" . | nindent 4 }}
data:
monolog.yaml: |
monolog:
channels:
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
- endpoint
- request
- schema
- cronjob
- action
- object
- synchronization
- plugin
- cache
- object
- call
- installation
- mapping
when@dev:
monolog:
handlers:
main:
type: stream
path: php://stderr
level: critical
channels: [ "!event" ]
nested:
type: service
id: monolog.postgresql_handler
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: "%log_level%"
channels: [ "!doctrine", "!event", '!deprecation' ]
when@test:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [ 404, 405 ]
channels: [ "!event" ]
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: "%log_level%"

when@prod:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [ 404, 405 ]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: info
formatter: monolog.formatter.json
{{- end }}
1 change: 1 addition & 0 deletions api/helm/commonground-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The gateway offers three forms of authentication:
Bearer Token - Bearer Tokens are the predominant type of access token used with OAuth 2.0. A Bearer Token is an opaque string, not intended to have any meaning to clients using it."

databaseType: postgresql
cacheType: mongodb

security:
rootCA: |
Expand Down
Loading
Loading