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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ commitlint.config.json
dist
build
reports
local.json
9 changes: 9 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://swc.rs/schema.json",
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": 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 apk add dumb-init

ENV NODE_ENV=production
ENV SERVER_PORT=8080
ENV CONFIG_OFFLINE_MODE=true


WORKDIR /usr/src/app
Expand All @@ -29,4 +30,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 @@ -12,13 +12,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
6 changes: 5 additions & 1 deletion config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
"logger": {
"level": "info",
"prettyPrint": false
},
"shared": {},
"tracing": {
"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 { defineConfig } from 'eslint/config';

export default defineConfig(jestConfig, tsBaseConfig);
11 changes: 6 additions & 5 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{{- $serviceUrls := (include "common.serviceUrls.merged" .) | fromYaml }}
{{- $queue := .Values.env.queue }}
{{- $tracing := (include "common.tracing.merged" .) | fromYaml }}
{{- $metrics := (include "common.metrics.merged" .) | fromYaml }}
{{- if .Values.enabled -}}
apiVersion: v1
kind: ConfigMap
Expand All @@ -19,10 +18,6 @@ data:
TELEMETRY_TRACING_ENABLED: 'true'
TELEMETRY_TRACING_URL: {{ $tracing.url }}
{{ end }}
{{ if $metrics.enabled }}
TELEMETRY_METRICS_ENABLED: 'true'
TELEMETRY_METRICS_URL: {{ $metrics.url }}
{{ end }}
npm_config_cache: /tmp/
JOB_MANAGER_BASE_URL: {{ $serviceUrls.jobManager | quote }}
JOB_DEFINITIONS_JOB_NEW: {{ $jobDefinitions.jobs.new.type | quote }}
Expand All @@ -42,4 +37,10 @@ data:
INGESTION_TASKS_FLOW: {{ .Values.taskFlowManager.ingestionTasksFlow | toJson | quote }}
EXPORT_TASKS_FLOW: {{ .Values.taskFlowManager.exportTasksFlow | toJson | quote }}
SEED_TASKS_FLOW: {{ .Values.taskFlowManager.seedTasksFlow | toJson | quote }}
{{- with .Values.configManagement }}
CONFIG_NAME: {{ .name | quote }}
CONFIG_VERSION: {{ .version | quote }}
CONFIG_OFFLINE_MODE: {{ .offlineMode | quote }}
CONFIG_SERVER_URL: {{ .serverUrl | quote }}
{{- end -}}
{{- end }}
5 changes: 0 additions & 5 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
{{- $cloudProviderDockerRegistryUrl := include "job-tracker.cloudProviderDockerRegistryUrl" . -}}
{{- $cloudProviderImagePullSecretName := include "job-tracker.cloudProviderImagePullSecretName" . -}}
{{- $imageTag := include "job-tracker.tag" . -}}
{{- $metrics := (include "common.metrics.merged" .) | fromYaml }}
{{- if .Values.enabled -}}
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -38,10 +37,6 @@ spec:
{{- if .Values.resetOnConfigChange }}
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- end }}
{{ if $metrics.enabled }}
prometheus.io/port: {{ $metrics.prometheus.port | quote }}
prometheus.io/scrape: {{ $metrics.prometheus.scrape | quote }}
{{- end }}
{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
Expand Down
12 changes: 5 additions & 7 deletions helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
global:
cloudProvider: {}
tracing: {}
metrics: {}
environment: ''
jobDefinitions: {}
serviceUrls: {}
Expand Down Expand Up @@ -68,12 +67,11 @@ tracing:
enabled: false
url: ''

metrics:
enabled: false
url: ''
prometheus:
scrape: false
port: 8080
configManagement:
offlineMode: false
name: 'job-tracker'
version: 'latest'
serverUrl: 'http://localhost:8080/api'

image:
repository: job-tracker
Expand Down
Loading
Loading