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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ commitlint.config.json
dist
build
reports
local.json

7 changes: 0 additions & 7 deletions .eslintrc.json

This file was deleted.

12 changes: 12 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://swc.rs/schema.json",
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
},
"transform": {
"decoratorMetadata": true
}
}
}
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV NODE_ENV=production
ENV SERVER_PORT=8080
ENV CONFIG_OFFLINE_MODE=true

WORKDIR /usr/src/app

Expand All @@ -30,4 +31,4 @@ COPY --chown=node:node ./config ./config
USER node
EXPOSE 8080

CMD ["dumb-init", "node", "--require", "./common/tracing.js", "./index.js"]
CMD ["dumb-init", "node", "--import", "./instrumentation.mjs", "./index.js"]
7 changes: 1 addition & 6 deletions config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@
}
},
"tracing": {
"enabled": "TELEMETRY_TRACING_ENABLED",
"isEnabled": "TELEMETRY_TRACING_ENABLED",
"url": "TELEMETRY_TRACING_URL"
},
"metrics": {
"enabled": "TELEMETRY_METRICS_ENABLED",
"url": "TELEMETRY_METRICS_URL",
"interval": "TELEMETRY_METRICS_INTERVAL"
}
},
"server": {
Expand Down
11 changes: 3 additions & 8 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@
"level": "info",
"prettyPrint": false
},
"shared": {},
"tracing": {
"enabled": "true",
"url": "http://localhost:4318/v1/traces"
},
"metrics": {
"enabled": false,
"url": "http://localhost:4318/v1/metrics",
"interval": 5
"isEnabled": false
}
},
"server": {
"port": "8080",
"port": 8080,
"request": {
"payload": {
"limit": "1mb"
Expand Down
5 changes: 5 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import tsBaseConfig from '@map-colonies/eslint-config/ts-base';
import jestConfig from '@map-colonies/eslint-config/jest';
import { config } from '@map-colonies/eslint-config/helpers';

export default config(jestConfig, tsBaseConfig);
1 change: 1 addition & 0 deletions helm/templates/_helpers.tpl
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would prefer to remain work with the common.tracing.merged within the _tplValues.tpl file

Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ Returns the cloud provider image pull secret name from global if exists or from
{{- .Values.cloudProvider.imagePullSecretName -}}
{{- end -}}
{{- end -}}

9 changes: 5 additions & 4 deletions helm/templates/configmap.yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing configManagement envs

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- $chartName := include "ingestion-trigger.name" . -}}
{{- $configmapName := include "configmap.fullname" . }}
{{- $tracing := (include "common.tracing.merged" .) | fromYaml }}
{{- $metrics := (include "common.metrics.merged" .) | fromYaml }}
{{- $configmapName := include "configmap.fullname" . }}
{{- $serviceUrls := (include "common.serviceUrls.merged" .) | fromYaml }}
{{- $jobDefinitions := (include "common.jobDefinitions.merged" .) | fromYaml }}
{{- $storage := (include "common.storage.merged" .) | fromYaml }}
Expand Down Expand Up @@ -47,10 +47,11 @@ data:
{{ if $tracing.enabled }}
TELEMETRY_TRACING_URL: {{ $tracing.url }}
{{ end }}
{{ if $metrics.enabled }}
TELEMETRY_METRICS_ENABLED: {{ $metrics.enabled | quote }}
TELEMETRY_METRICS_URL: {{ $metrics.url }}
{{ end }}
CONFIG_SERVER_URL: {{ .Values.configManagement.serverUrl | quote }}
CONFIG_NAME: {{ .Values.configManagement.name | quote }}
CONFIG_VERSION: {{ .Values.configManagement.version | quote }}
OFFLINE_MODE: {{ .Values.configManagement.offlineMode | quote }}
npm_config_cache: /tmp/
{{- end }}
# TODO: check if values should be clean up
10 changes: 6 additions & 4 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ tracing:

metrics:
enabled: false
url: ''
prometheus:
scrape: true
port: 8080

configManagement:
offlineMode: false
name: 'ingestion-trigger'
version: 'latest'
serverUrl: 'http://localhost:8080/api'

image:
repository: ingestion-trigger
Expand Down
Loading
Loading