diff --git a/.circleci/deployment/values/speckle-server.values.yaml b/.circleci/deployment/values/speckle-server.values.yaml index 08bfd417f..d798f4b35 100644 --- a/.circleci/deployment/values/speckle-server.values.yaml +++ b/.circleci/deployment/values/speckle-server.values.yaml @@ -14,6 +14,7 @@ server: local: enabled: true logLevel: debug + logPretty: true email: enabled: false @@ -32,6 +33,7 @@ objects: local: enabled: true logLevel: debug + logPretty: true email: enabled: false @@ -44,18 +46,23 @@ objects: frontend_2: enabled: true + logPretty: true preview_service: replicas: 0 + logPretty: true webhook_service: replicas: 0 + logPretty: true fileimport_service: replicas: 0 + logPretty: true monitoring: replicas: 0 + logPretty: true s3: endpoint: 'http://minio.minio.svc.cluster.local:9000' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 65b4c6aa9..02b781c6c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,11 +12,6 @@ repos: - id: shellcheck-system name: shellcheck - - repo: https://github.com/gruntwork-io/pre-commit - rev: 'v0.1.17' - hooks: - - id: helmlint - - repo: https://github.com/syntaqx/git-hooks rev: 'v0.0.17' hooks: @@ -50,5 +45,11 @@ repos: entry: utils/helm/update-schema-json.sh description: If this fails it is because the values.yaml file was updated. Or has missing or incorrect documentation. + # helmlint should occur after the json schema is updated + - repo: https://github.com/gruntwork-io/pre-commit + rev: 'v0.1.17' + hooks: + - id: helmlint + ci: autoupdate_schedule: quarterly diff --git a/utils/helm/speckle-server/templates/_helpers.tpl b/utils/helm/speckle-server/templates/_helpers.tpl index 86f33d8cd..c3ee52b19 100644 --- a/utils/helm/speckle-server/templates/_helpers.tpl +++ b/utils/helm/speckle-server/templates/_helpers.tpl @@ -544,6 +544,8 @@ Generate the environment variables for Speckle server and Speckle objects deploy value: {{ include "server.port" $ | quote }} - name: LOG_LEVEL value: {{ .Values.server.logLevel }} +- name: LOG_PRETTY + value: {{ .Values.server.logPretty | quote }} - name: USE_FRONTEND_2 value: {{ .Values.frontend_2.enabled | quote }} diff --git a/utils/helm/speckle-server/templates/fileimport_service/deployment.yml b/utils/helm/speckle-server/templates/fileimport_service/deployment.yml index bf8924138..b7b834ad0 100644 --- a/utils/helm/speckle-server/templates/fileimport_service/deployment.yml +++ b/utils/helm/speckle-server/templates/fileimport_service/deployment.yml @@ -77,6 +77,9 @@ spec: - name: LOG_LEVEL value: {{ .Values.fileimport_service.logLevel | quote }} + - name: LOG_PRETTY + value: {{ .Values.fileimport_service.logPretty | quote }} + {{- if .Values.db.useCertificate }} - name: NODE_EXTRA_CA_CERTS value: "/postgres-certificate/ca-certificate.crt" diff --git a/utils/helm/speckle-server/templates/frontend_2/deployment.yml b/utils/helm/speckle-server/templates/frontend_2/deployment.yml index a0b398121..3438fa6f4 100644 --- a/utils/helm/speckle-server/templates/frontend_2/deployment.yml +++ b/utils/helm/speckle-server/templates/frontend_2/deployment.yml @@ -76,6 +76,8 @@ spec: value: {{ .Values.analytics.mixpanel_api_host }} - name: NUXT_PUBLIC_LOG_LEVEL value: {{ .Values.frontend_2.logLevel }} + - name: NUXT_PUBLIC_LOG_PRETTY + value: {{ .Values.frontend_2.logPretty | quote }} - name: NUXT_PUBLIC_SERVER_NAME value: {{ .Release.Name }} - name: NUXT_PUBLIC_LOG_CLIENT_API_TOKEN diff --git a/utils/helm/speckle-server/templates/monitoring/deployment.yml b/utils/helm/speckle-server/templates/monitoring/deployment.yml index 97e63848a..0fe1aafa8 100644 --- a/utils/helm/speckle-server/templates/monitoring/deployment.yml +++ b/utils/helm/speckle-server/templates/monitoring/deployment.yml @@ -64,6 +64,11 @@ spec: value: "/postgres-certificate/ca-certificate.crt" {{- end }} + - name: LOG_LEVEL + value: {{ .Values.monitoring.logLevel }} + - name: LOG_PRETTY + value: {{ .Values.monitoring.logPretty | quote }} + priorityClassName: low-priority {{- if .Values.monitoring.serviceAccount.create }} serviceAccountName: {{ include "monitoring.name" $ }} diff --git a/utils/helm/speckle-server/templates/preview_service/deployment.yml b/utils/helm/speckle-server/templates/preview_service/deployment.yml index f7cf8ed58..04dbda5e0 100644 --- a/utils/helm/speckle-server/templates/preview_service/deployment.yml +++ b/utils/helm/speckle-server/templates/preview_service/deployment.yml @@ -76,6 +76,8 @@ spec: - name: LOG_LEVEL value: {{ .Values.preview_service.logLevel | quote }} + - name: LOG_PRETTY + value: {{ .Values.preview_service.logPretty | quote }} {{- if .Values.db.useCertificate }} - name: NODE_EXTRA_CA_CERTS diff --git a/utils/helm/speckle-server/templates/tests/deployment.yml b/utils/helm/speckle-server/templates/tests/deployment.yml index 77687498c..51ff1bd4a 100644 --- a/utils/helm/speckle-server/templates/tests/deployment.yml +++ b/utils/helm/speckle-server/templates/tests/deployment.yml @@ -33,6 +33,10 @@ spec: {{- end }} - name: VERIFY_CERTIFICATE value: {{ (default "1" .Values.tlsRejectUnauthorized) | quote }} + - name: LOG_LEVEL + value: {{ .Values.test.logLevel }} + - name: LOG_PRETTY + value: {{ .Values.test.logPretty | quote }} resources: requests: cpu: {{ .Values.test.requests.cpu }} diff --git a/utils/helm/speckle-server/templates/webhook_service/deployment.yml b/utils/helm/speckle-server/templates/webhook_service/deployment.yml index f4161fdf1..ef419c932 100644 --- a/utils/helm/speckle-server/templates/webhook_service/deployment.yml +++ b/utils/helm/speckle-server/templates/webhook_service/deployment.yml @@ -72,6 +72,8 @@ spec: - name: LOG_LEVEL value: {{ .Values.webhook_service.logLevel }} + - name: LOG_PRETTY + value: {{ .Values.webhook_service.logPretty | quote }} {{- if .Values.db.useCertificate }} - name: NODE_EXTRA_CA_CERTS diff --git a/utils/helm/speckle-server/values.schema.json b/utils/helm/speckle-server/values.schema.json index ac2c5940f..b1a01a316 100644 --- a/utils/helm/speckle-server/values.schema.json +++ b/utils/helm/speckle-server/values.schema.json @@ -486,6 +486,11 @@ "description": "The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent", "default": "info" }, + "logPretty": { + "type": "boolean", + "description": "If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format.", + "default": false + }, "image": { "type": "string", "description": "The Docker image to be used for the Speckle Server component. If blank, defaults to speckle/speckle-server:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored.", @@ -1255,6 +1260,11 @@ "description": "The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent", "default": "info" }, + "logPretty": { + "type": "boolean", + "description": "If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format.", + "default": false + }, "inspect": { "type": "object", "properties": { @@ -1397,6 +1407,11 @@ "description": "The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent", "default": "info" }, + "logPretty": { + "type": "boolean", + "description": "If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format.", + "default": false + }, "image": { "type": "string", "description": "The Docker image to be used for the Speckle Frontend component. If blank, defaults to speckle/speckle-frontend:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored.", @@ -1499,6 +1514,11 @@ "description": "The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent", "default": "info" }, + "logPretty": { + "type": "boolean", + "description": "If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format.", + "default": false + }, "enabled": { "type": "boolean", "description": "Feature flag to enable running the new web application frontend.", @@ -1596,6 +1616,11 @@ "description": "The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent", "default": "info" }, + "logPretty": { + "type": "boolean", + "description": "If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format.", + "default": false + }, "image": { "type": "string", "description": "The Docker image to be used for the Speckle Preview Service component. If blank, defaults to speckle/speckle-preview-service:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored.", @@ -1703,6 +1728,11 @@ "description": "The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent", "default": "info" }, + "logPretty": { + "type": "boolean", + "description": "If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format.", + "default": false + }, "image": { "type": "string", "description": "The Docker image to be used for the Speckle Webhook Service component. If blank, defaults to speckle/speckle-webhook-service:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored.", @@ -1795,6 +1825,11 @@ "description": "The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent", "default": "info" }, + "logPretty": { + "type": "boolean", + "description": "If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format.", + "default": false + }, "image": { "type": "string", "description": "The Docker image to be used for the Speckle FileImport Service component. If blank, defaults to speckle/speckle-fileimport-service:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored.", @@ -1892,6 +1927,11 @@ "description": "The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent", "default": "info" }, + "logPretty": { + "type": "boolean", + "description": "If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format.", + "default": false + }, "image": { "type": "string", "description": "The Docker image to be used for the Speckle Monitoring component. If blank, defaults to speckle/speckle-monitoring-deployment:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored.", @@ -1984,6 +2024,11 @@ "description": "The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent", "default": "info" }, + "logPretty": { + "type": "boolean", + "description": "If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format.", + "default": false + }, "image": { "type": "string", "description": "The Docker image to be used for the Speckle Test component. If blank, defaults to speckle/speckle-test-deployment:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored.", diff --git a/utils/helm/speckle-server/values.yaml b/utils/helm/speckle-server/values.yaml index 5e8342780..cf784975b 100644 --- a/utils/helm/speckle-server/values.yaml +++ b/utils/helm/speckle-server/values.yaml @@ -388,6 +388,9 @@ server: ## @param server.logLevel The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent ## logLevel: 'info' + ## @param server.logPretty If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format. + ## + logPretty: false ## @param server.image The Docker image to be used for the Speckle Server component. If blank, defaults to speckle/speckle-server:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored. ## @@ -787,6 +790,9 @@ objects: ## @param objects.logLevel The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent ## logLevel: 'info' + ## @param objects.logPretty If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format. + ## + logPretty: false inspect: ## @param objects.inspect.enabled If enabled, indicates that the Speckle server should be deployed with the nodejs inspect feature enabled enabled: false @@ -874,6 +880,9 @@ frontend: ## @param frontend.logLevel The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent ## logLevel: 'info' + ## @param frontend.logPretty If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format. + ## + logPretty: false ## @param frontend.image The Docker image to be used for the Speckle Frontend component. If blank, defaults to speckle/speckle-frontend:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored. ## @@ -948,6 +957,9 @@ frontend_2: ## @param frontend_2.logLevel The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent ## logLevel: 'info' + ## @param frontend_2.logPretty If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format. + ## + logPretty: false ## @param frontend_2.enabled Feature flag to enable running the new web application frontend. ## enabled: true @@ -1017,6 +1029,9 @@ preview_service: ## @param preview_service.logLevel The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent ## logLevel: 'info' + ## @param preview_service.logPretty If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format. + ## + logPretty: false ## @param preview_service.image The Docker image to be used for the Speckle Preview Service component. If blank, defaults to speckle/speckle-preview-service:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored. ## @@ -1092,6 +1107,9 @@ webhook_service: ## @param webhook_service.logLevel The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent ## logLevel: 'info' + ## @param webhook_service.logPretty If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format. + ## + logPretty: false ## @param webhook_service.image The Docker image to be used for the Speckle Webhook Service component. If blank, defaults to speckle/speckle-webhook-service:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored. ## image: '' @@ -1159,6 +1177,9 @@ fileimport_service: ## @param fileimport_service.logLevel The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent ## logLevel: 'info' + ## @param fileimport_service.logPretty If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format. + ## + logPretty: false ## @param fileimport_service.image The Docker image to be used for the Speckle FileImport Service component. If blank, defaults to speckle/speckle-fileimport-service:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored. ## @@ -1233,6 +1254,9 @@ monitoring: ## @param monitoring.logLevel The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent ## logLevel: 'info' + ## @param monitoring.logPretty If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format. + ## + logPretty: false ## @param monitoring.image The Docker image to be used for the Speckle Monitoring component. If blank, defaults to speckle/speckle-monitoring-deployment:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored. ## @@ -1303,6 +1327,9 @@ test: ## @param test.logLevel The minimum level of logs which will be output. Suitable values are trace, debug, info, warn, error, fatal, or silent ## logLevel: 'info' + ## @param test.logPretty If enabled, will output logs in a human-readable format. Otherwise, logs will be output in JSON format. + ## + logPretty: false ## @param test.image The Docker image to be used for the Speckle Test component. If blank, defaults to speckle/speckle-test-deployment:{{ .Values.docker_image_tag }}. If provided, this value should be the full path including tag. The docker_image_tag value will be ignored. ##