Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
91 changes: 91 additions & 0 deletions helmcharts/edbb/charts/kong-apis/configs/kong-apis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9090,3 +9090,94 @@ kong_apis:
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ .Values.medium_request_size_limit }}"

# v3 APIs for discussions
- name: createTopicOfDiscussionsV3
uris: "{{ .Values.discussions_prefix }}/v3/topics"
upstream_url: "{{ .Values.discussions_mw_service_url }}/v3/topics"
strip_uri: true
plugins:
- name: jwt
- name: cors
- {{ .Values.statsd_plugin | toYaml | nindent 4 | trim }}
- name: acl
config.whitelist:
- discussionCreate
- name: rate-limiting
config.policy: local
config.hour: "{{ .Values.medium_rate_limit_per_hour }}"
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ .Values.medium_request_size_limit }}"

- name: createCategoryOfDiscussionV3
uris: "{{ .Values.discussions_prefix }}/v3/categories"
upstream_url: "{{ .Values.discussions_mw_service_url }}/v3/categories"
strip_uri: true
plugins:
- name: jwt
- name: cors
- {{ .Values.statsd_plugin | toYaml | nindent 4 | trim }}
- name: acl
config.whitelist:
- discussionCreate
- name: rate-limiting
config.policy: local
config.hour: "{{ .Values.medium_rate_limit_per_hour }}"
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ .Values.medium_request_size_limit }}"

- name: createGroupsOfDiscussionV3
uris: "{{ .Values.discussions_prefix }}/v3/groups"
upstream_url: "{{ .Values.discussions_mw_service_url }}/v3/groups"
strip_uri: true
plugins:
- name: jwt
- name: cors
- {{ .Values.statsd_plugin | toYaml | nindent 4 | trim }}
- name: acl
config.whitelist:
- discussionCreate
- name: rate-limiting
config.policy: local
config.hour: "{{ .Values.medium_rate_limit_per_hour }}"
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ .Values.medium_request_size_limit }}"

- name: createNewPostOfDiscussionV3
uris: "{{ .Values.discussions_prefix }}/v3/posts"
upstream_url: "{{ .Values.discussions_mw_service_url }}/v3/posts"
strip_uri: true
plugins:
- name: jwt
- name: cors
- {{ .Values.statsd_plugin | toYaml | nindent 4 | trim }}
- name: acl
config.whitelist:
- discussionCreate
- name: rate-limiting
config.policy: local
config.hour: "{{ .Values.medium_rate_limit_per_hour }}"
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ .Values.medium_request_size_limit }}"

- name: createNewUserOfDiscussionV3
uris: "{{ .Values.discussions_prefix }}/v3/users"
upstream_url: "{{ .Values.discussions_mw_service_url }}/v3/users"
strip_uri: true
plugins:
- name: jwt
- name: cors
- {{ .Values.statsd_plugin | toYaml | nindent 4 | trim }}
- name: acl
config.whitelist:
- discussionCreate
- name: rate-limiting
config.policy: local
config.hour: "{{ .Values.medium_rate_limit_per_hour }}"
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ .Values.medium_request_size_limit }}"
2 changes: 2 additions & 0 deletions helmcharts/edbb/charts/nodebb/configs/env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
NODE_OPTIONS: "1024"
admin__password: nodebb{{ .Values.global.random_string }}
admin__username: admin
admin__password_confirm: nodebb{{ .Values.global.random_string }}
admin__email: admin@example.com
database: redis
isCluster: "false"
redis__database: '10'
Expand Down
4 changes: 4 additions & 0 deletions helmcharts/edbb/charts/nodebb/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.args }}
args:
{{- toYaml .Values.args | nindent 12 }}
{{- end }}
{{- if .Values.livenessProbe }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
Expand Down
11 changes: 9 additions & 2 deletions helmcharts/edbb/charts/nodebb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ image:
tag: release-5.0.0_RC1_1_v1.18.6
pullSecrets: []

args:
- /bin/sh
- -c
- |
./nodebb build
node loader.js --no-daemon --no-silent

podAnnotations: {}

podSecurityContext:
Expand Down Expand Up @@ -68,7 +75,7 @@ autoscaling:
livenessProbe:
failureThreshold: 20
httpGet:
path: /discussions/api/category/2
path: /discussions/api/forum/health
port: 4567
initialDelaySeconds: 45
periodSeconds: 15
Expand All @@ -79,7 +86,7 @@ livenessProbe:
readinessProbe:
failureThreshold: 20
httpGet:
path: /discussions/api/category/2
path: /discussions/api/forum/health
port: 4567
initialDelaySeconds: 45
periodSeconds: 15
Expand Down
2 changes: 1 addition & 1 deletion terraform/azure/template/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function post_install_nodebb_plugins() {
echo ">> Activating NodeBB plugins..."
kubectl exec -n sunbird deploy/nodebb -- ./nodebb activate nodebb-plugin-create-forum
kubectl exec -n sunbird deploy/nodebb -- ./nodebb activate nodebb-plugin-sunbird-oidc
kubectl exec -n sunbird deploy/nodebb -- ./nodebb activate nodebb-plugin-write-api
kubectl exec -n sunbird deploy/nodebb -- ./nodebb reset nodebb-plugin-write-api

echo ">> Rebuilding NodeBB to apply plugin changes..."
kubectl exec -n sunbird deploy/nodebb -- ./nodebb build
Expand Down
2 changes: 1 addition & 1 deletion terraform/gcp/template/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function post_install_nodebb_plugins() {
echo ">> Activating NodeBB plugins..."
kubectl exec -n sunbird deploy/nodebb -- ./nodebb activate nodebb-plugin-create-forum
kubectl exec -n sunbird deploy/nodebb -- ./nodebb activate nodebb-plugin-sunbird-oidc
kubectl exec -n sunbird deploy/nodebb -- ./nodebb activate nodebb-plugin-write-api
kubectl exec -n sunbird deploy/nodebb -- ./nodebb reset nodebb-plugin-write-api

echo ">> Rebuilding NodeBB to apply plugin changes..."
kubectl exec -n sunbird deploy/nodebb -- ./nodebb build
Expand Down