Skip to content

Commit

Permalink
feat(helm): configure inspect flag for server via helm chart (#1593)
Browse files Browse the repository at this point in the history
  • Loading branch information
iainsproat committed Jun 1, 2023
1 parent ebdb30d commit e71f382
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ repos:
- repo: local
hooks:
- id: helm-documentation
name: Helm documentation
name: Helm Json Schema
language: system
files: utils/helm/speckle-server/values.yaml
entry: utils/helm/update-schema-json.sh
Expand Down
3 changes: 2 additions & 1 deletion packages/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@ COPY --from=build-stage /speckle-server/packages/server/dist ./dist
COPY --from=build-stage /speckle-server/packages/server/assets ./assets
COPY --from=build-stage /speckle-server/packages/server/bin ./bin

CMD ["node", "--inspect=7000", "bin/www"]
ENTRYPOINT ["node"]
CMD ["bin/www"]
6 changes: 5 additions & 1 deletion utils/helm/speckle-server/templates/server/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ spec:
- name: main
image: speckle/speckle-server:{{ .Values.docker_image_tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}

args: #overwrites the Dockerfile CMD statement
{{- if .Values.server.inspect.enabled }}
- {{ printf "--inspect=%s" .Values.server.inspect.port }}
{{- end }}
- "bin/www"
ports:
- name: http
containerPort: {{ include "server.port" $ }}
Expand Down
15 changes: 15 additions & 0 deletions utils/helm/speckle-server/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,21 @@
"description": "The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent",
"default": "info"
},
"inspect": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "If enabled, indicates that the Speckle server should be deployed with the nodejs inspect feature enabled",
"default": false
},
"port": {
"type": "string",
"description": "The port on which the nodejs inspect feature should be exposed",
"default": "7000"
}
}
},
"adminOverrideEnabled": {
"type": "boolean",
"description": "Enables the server side admin authz override",
Expand Down
6 changes: 6 additions & 0 deletions utils/helm/speckle-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,12 @@ server:
##
logLevel: 'info'

inspect:
## @param server.inspect.enabled If enabled, indicates that the Speckle server should be deployed with the nodejs inspect feature enabled
enabled: false
## @param server.inspect.port The port on which the nodejs inspect feature should be exposed
port: '7000'

## @param server.adminOverrideEnabled Enables the server side admin authz override
adminOverrideEnabled: false
## @param server.onboardingStreamId The id of the stream to be used for onboarding new users
Expand Down

0 comments on commit e71f382

Please sign in to comment.