Skip to content
Merged
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 @@ -19,3 +19,4 @@ reports
helm
node_modules
.vscode
local.json
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "7.0.2"
".": "7.1.0"
}
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 @@ -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
6 changes: 3 additions & 3 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"level": "info",
"prettyPrint": false
},
"shared": {},
"tracing": {
"enabled": "false",
"url": "http://localhost:4318/v1/traces"
"isEnabled": false
}
},
"server": {
"port": "8080",
"port": 8080,
"request": {
"payload": {
"limit": "10mb"
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, { ignores: ['src/DAL/entity/generated.ts'] });
33 changes: 0 additions & 33 deletions helm/templates/_helpers.tpl
Comment thread
razbroc marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,6 @@ Returns if tracing is enabled from global if exists or from the chart's values
{{- end -}}
{{- end -}}

{{/*
Returns if metrics is enabled from global if exists or from the chart's values
*/}}
{{- define "raster-catalog-manager.metricsEnabled" -}}
{{- if .Values.global.metrics.enabled }}
{{- .Values.global.metrics.enabled -}}
{{- else -}}
{{- .Values.env.metrics.enabled -}}
{{- end -}}
{{- end -}}

{{/*
Returns the tracing url from global if exists or from the chart's values
*/}}
Expand All @@ -135,25 +124,3 @@ Returns the tracing url from global if exists or from the chart's values
{{- .Values.env.tracing.url -}}
{{- end -}}
{{- end -}}

{{/*
Returns the metrics url from global if exists or from the chart's values
*/}}
{{- define "raster-catalog-manager.metricsUrl" -}}
{{- if .Values.global.metrics.url }}
{{- .Values.global.metrics.url -}}
{{- else -}}
{{- .Values.env.metrics.url -}}
{{- end -}}
{{- end -}}

{{/*
Returns the metrics buckets from global if exists or from the chart's values
*/}}
{{- define "raster-catalog-manager.metricsBuckets" -}}
{{- if .Values.global.metrics.buckets }}
{{- .Values.global.metrics.buckets -}}
{{- else -}}
{{- .Values.env.metrics.buckets -}}
{{- end -}}
{{- end -}}
14 changes: 6 additions & 8 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{{- $chartName := include "raster-catalog-manager.name" . -}}
{{- $configmapName := include "configmap.fullname" . }}
{{- $tracingUrl := include "raster-catalog-manager.tracingUrl" . -}}
{{- $metricsUrl := include "raster-catalog-manager.metricsUrl" . -}}
{{- $tracingEnabled := include "raster-catalog-manager.tracingEnabled" . -}}
{{- $metricsEnabled := include "raster-catalog-manager.metricsEnabled" . -}}
{{- $metricsBuckets := include "raster-catalog-manager.metricsBuckets" . -}}
{{- $db := (include "common.db.merged" .) | fromYaml }}
{{- if .Values.enabled -}}
apiVersion: v1
Expand All @@ -20,11 +17,6 @@ data:
{{ if $tracingEnabled }}
TELEMETRY_TRACING_URL: {{ $tracingUrl }}
{{ end }}
TELEMETRY_METRICS_ENABLED: {{ $metricsEnabled | quote }}
{{ if $metricsEnabled }}
TELEMETRY_METRICS_URL: {{ $metricsUrl }}
TELEMETRY_METRICS_BUCKETS: {{ $metricsBuckets | toJson | quote }}
{{ end }}
DB_HOST: {{ $db.host }}
DB_PORT: {{ $db.port | quote }}
DB_NAME: {{ $db.name }}
Expand All @@ -35,4 +27,10 @@ data:
DB_SCHEMA: {{ $db.schema }}
DB_LOGGING: {{ $db.logging | quote }}
PGAPPNAME: {{ $chartName }}
{{- with .Values.configManagement }}
CONFIG_NAME: {{ .name| quote }}
CONFIG_VERSION: {{ .version | quote }}
CONFIG_OFFLINE_MODE: {{ .offlineMode | quote }}
CONFIG_SERVER_URL: {{ .serverUrl | quote }}
{{- end -}}
{{- end }}
12 changes: 7 additions & 5 deletions helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
global:
cloudProvider: {}
tracing: {}
metrics: {}
environment: ""
db:
host: ""
Expand All @@ -26,7 +25,7 @@ mclabels:
gisDomain: raster
prometheus:
enabled: true
port: 5432
port: 8080

db:
host: ""
Expand Down Expand Up @@ -66,6 +65,12 @@ image:
# annotation2: annotation-value-2
podAnnotations: {}

configManagement:
offlineMode: false
name: 'raster-catalog-manager'
version: 'latest'
serverUrl: 'http://localhost:8080/api'

env:
port: 80
targetPort: 8080
Expand All @@ -77,9 +82,6 @@ env:
tracing:
enabled: false
Comment thread
razbroc marked this conversation as resolved.
url: http://localhost:55681/v1/traces
metrics:
enabled: false
url: http://localhost:55681/v1/metrics

resources:
enabled: false
Expand Down
6 changes: 6 additions & 0 deletions openapi3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/recordExistsResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/records/find:
post:
operationId: findRecords
Expand Down
Loading
Loading