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
7 changes: 0 additions & 7 deletions .eslintrc.json

This file was deleted.

14 changes: 7 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Make sure you've read the contributing guidelines (CONTRIBUTING.md)

| Question | Answer |
| --------------- | ------ |
| Bug fix | ✔/✖ |
| New feature | ✔/✖ |
| Breaking change | ✔/✖ |
| Deprecations | ✔/✖ |
| Documentation | ✔/✖ |
| Tests added | ✔/✖ |
| Chore | ✔/✖ |
| Bug fix | ✔/✖ |
| New feature | ✔/✖ |
| Breaking change | ✔/✖ |
| Deprecations | ✔/✖ |
| Documentation | ✔/✖ |
| Tests added | ✔/✖ |
| Chore | ✔/✖ |

Related issues: #XXX , #XXX ...
Closes #XXX ...
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
html

# Development tools
.idea
Expand Down Expand Up @@ -111,7 +112,7 @@ dist
jest_html_reporters.html
reports

local*.json
config/local*.json

# Helm
Chart.lock
8 changes: 0 additions & 8 deletions .swcrc

This file was deleted.

2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
extends: ['@map-colonies/commitlint-config'],
rules: {
'scope-enum': [2, 'always', ['deps', 'configurations']],
},
Expand Down
21 changes: 15 additions & 6 deletions config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,25 @@
"prettyPrint": {
"__name": "LOG_PRETTY_PRINT_ENABLED",
"__format": "boolean"
},
"opentelemetryOptions": {
"enabled": {
"__name": "OPENTELEMETRY_LOGGING_ENABLED",
"__format": "boolean"
},
"url": "OPENTELEMETRY_LOGGING_URL",
"resourceAttributes": {
"__name": "OPENTELEMETRY_RESOURCE_ATTRIBUTES",
"__format": "json"
}
}
},
"tracing": {
"isEnabled": "TELEMETRY_TRACING_ENABLED",
"isEnabled": {
"__name": "TELEMETRY_TRACING_ENABLED",
"__format": "boolean"
},
"url": "TELEMETRY_TRACING_URL"
},
"metrics": {
"enabled": "TELEMETRY_METRICS_ENABLED",
"url": "TELEMETRY_METRICS_URL",
"interval": "TELEMETRY_METRICS_INTERVAL"
}
},
"server": {
Expand Down
10 changes: 4 additions & 6 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
"shared": {},
"logger": {
"level": "info",
"prettyPrint": false
},
"metrics": {
"enabled": false,
"url": "http://localhost:4318/v1/metrics",
"interval": 15000
"prettyPrint": false,
"opentelemetryOptions": {
"enabled": false
}
}
},
"server": {
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 vitestConfig from '@map-colonies/eslint-config/vitest';
import { defineConfig } from 'eslint/config';

export default defineConfig(vitestConfig, tsBaseConfig, { ignores: ['vitest.config.mts'] });
6 changes: 3 additions & 3 deletions helm/templates/_tplValues.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ Custom definitions
{{- end -}}

{{- define "common.tracing.merged" -}}
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.tracing .Values.global.tracing ) "context" . ) }}
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.tracing .Values.env.tracing ) "context" . ) }}
{{- end -}}

{{- define "common.metrics.merged" -}}
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics .Values.global.metrics ) "context" . ) }}
{{- define "common.openTelemetryOptions.merged" -}}
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.env.openTelemetryOptions .Values.global.openTelemetryOptions ) "context" . ) }}
{{- end -}}
20 changes: 14 additions & 6 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $chartName := include "exporter-trigger.name" . -}}
{{- $tracing := (include "common.tracing.merged" .) | fromYaml }}
{{- $metrics := (include "common.metrics.merged" .) | fromYaml }}
{{- $openTelemetryOptions := (include "common.openTelemetryOptions.merged" .) | fromYaml }}
{{- $serviceUrls := (include "common.serviceUrls.merged" .) | fromYaml }}
{{- $storage := (include "common.storage.merged" .) | fromYaml }}
{{- $configmapName := include "configmap.fullname" . }}
Expand All @@ -17,14 +17,17 @@ data:
RESPONSE_COMPRESSION_ENABLED: {{ .Values.env.responseCompressionEnabled | quote }}
LOG_LEVEL: {{ .Values.env.logLevel | quote }}
LOG_PRETTY_PRINT_ENABLED: {{ .Values.env.logPrettyPrintEnabled | quote }}
{{- with $openTelemetryOptions }}
OPENTELEMETRY_LOGGING_ENABLED: {{ .enabled | quote }}
{{ if .enabled }}
OPENTELEMETRY_LOGGING_URL: {{ .url | quote }}
OPENTELEMETRY_RESOURCE_ATTRIBUTES: {{ .resourceAttributes | toJson | quote }}
{{- end }}
{{- end }}
TELEMETRY_TRACING_ENABLED: {{ $tracing.enabled | quote }}
{{ if $tracing.enabled }}
TELEMETRY_TRACING_URL: {{ $tracing.url | quote }}
{{ end }}
TELEMETRY_METRICS_ENABLED: {{ $metrics.enabled | quote }}
{{ if $metrics.enabled}}
TELEMETRY_METRICS_URL: {{ $metrics.url | quote }}
{{ end }}
JOB_MANAGER_URL: {{ $serviceUrls.jobManager | quote }}
JOB_TRACKER_URL: {{ $serviceUrls.jobTracker | quote }}
CLEANUP_EXPIRATION_DAYS: {{ .Values.env.cleanupExpirationDays | quote }}
Expand All @@ -42,5 +45,10 @@ data:
INIT_TASK_TYPE: {{ $jobDefinitions.tasks.init.type | quote }}
ROI_BUFFER_METER: {{ .Values.env.roiBufferMeter | quote }}
MIN_CONTAINED_PERCENTAGE: {{ .Values.env.minContainedPercentage | quote }}
CONFIG_OFFLINE_MODE: {{ .Values.global.configOfflineMode | quote }}
{{- with .Values.configManagement }}
CONFIG_NAME: {{ .name | quote }}
CONFIG_VERSION: {{ .version | quote }}
CONFIG_OFFLINE_MODE: {{ .offlineMode | quote }}
CONFIG_SERVER_URL: {{ .serverUrl | quote }}
{{- end }}
{{- end }}
9 changes: 4 additions & 5 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{- $releaseName := .Release.Name -}}
{{- $chartName := include "exporter-trigger.name" . -}}
{{- $metrics := (include "common.metrics.merged" .) | fromYaml }}
{{- $cloudProviderFlavor := include "exporter-trigger.cloudProviderFlavor" . -}}
{{- $cloudProviderDockerRegistryUrl := include "exporter-trigger.cloudProviderDockerRegistryUrl" . -}}
{{- $cloudProviderImagePullSecretName := include "exporter-trigger.cloudProviderImagePullSecretName" . -}}
Expand Down Expand Up @@ -44,10 +43,6 @@ spec:
{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
{{ if $metrics.enabled }}
prometheus.io/port: {{ $metrics.prometheus.port | quote }}
prometheus.io/scrape: {{ $metrics.prometheus.scrape | quote }}
{{- end }}
{{- include "mclabels.annotations" . | nindent 8 }}
spec:
{{- if $cloudProviderImagePullSecretName }}
Expand All @@ -60,6 +55,10 @@ spec:
image: {{ $cloudProviderDockerRegistryUrl }}{{ .repository }}:{{ $imageTag }}
{{- end }}
env:
- name: K8S_POD_UID
valueFrom:
fieldRef:
fieldPath: metadata.uid
- name: SERVER_PORT
value: {{ .Values.env.targetPort | quote }}
- name: GPKGS_LOCATION
Expand Down
26 changes: 14 additions & 12 deletions helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
global:
cloudProvider: {}
tracing: {}
metrics: {}
openTelemetryOptions: {}
environment: ""
serviceUrls: {}
storage: {}
ingress:
domain: 'apps.aroapp.io'
jobDefinitions: {}
domain: ''
configOfflineMode: false

mclabels:
#environment: development
Expand All @@ -21,6 +20,12 @@ mclabels:
enabled: true
port: 8080

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

jobDefinitions:
jobs:
export:
Expand Down Expand Up @@ -66,22 +71,19 @@ image:
# annotation2: annotation-value-2
podAnnotations: {}

tracing:
enabled: false
url: ""
metrics:
enabled: false
url: ""
prometheus:
scrape: true
port: 8080

env:
port: 8080
targetPort: 8080
internalPort: 80
logLevel: info
logPrettyPrintEnabled: false
openTelemetryOptions:
enabled: false
url: ''
resourceAttributes: {}
tracing:
enabled: false
url: ""
responseCompressionEnabled: true
requestPayloadLimit: 1mb
disableHttpClientLogs: false
Expand Down
Loading
Loading