Skip to content

Commit

Permalink
refactor: change jobManagemnt to new jobDefentions
Browse files Browse the repository at this point in the history
  • Loading branch information
razbroc committed Oct 30, 2024
1 parent 57c41ed commit f979653
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 24 deletions.
20 changes: 15 additions & 5 deletions config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@
"limit": "REQUEST_PAYLOAD_LIMIT"
}
},
"jobDefinitions": {
"tasks": {
"export": {
"type": "EXPORT_JOB_TYPE"
}
},
"jobs": {
"export": {
"type": "TILES_TASK_TYPE"
},
"finalize": {
"type": "FINALIZE_TASK_TYPE"
}
}
},
"response": {
"compression": {
"enabled": {
Expand Down Expand Up @@ -96,11 +111,6 @@
}
}
},
"exportJobAndTaskTypes": {
"jobType": "EXPORT_JOB_TYPE",
"taskTilesType": "TILES_TASK_TYPE",
"taskFinalizeType": "FINALIZE_TASK_TYPE"
},
"httpRetry": {
"attempts": {
"__name": "HTTP_RETRY_ATTEMPTS",
Expand Down
4 changes: 2 additions & 2 deletions helm/templates/_tplValues.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ Custom definitions
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.serviceUrls .Values.global.serviceUrls ) "context" . ) }}
{{- end -}}

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

{{- define "common.ingestion.merged" -}}
Expand Down
12 changes: 7 additions & 5 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
{{- $tracing := (include "common.tracing.merged" .) | fromYaml }}
{{- $metrics := (include "common.metrics.merged" .) | fromYaml }}
{{- $serviceUrls := (include "common.serviceUrls.merged" .) | fromYaml }}
{{- $jobManagement := (include "common.jobManagement.merged" .) | fromYaml }}
{{- $storage := (include "common.storage.merged" .) | fromYaml }}
{{- $configmapName := include "configmap.fullname" . }}
{{- $jobDefinitions := (include "common.jobDefinitions.merged" .) | fromYaml }}


{{- if .Values.enabled -}}
apiVersion: v1
kind: ConfigMap
Expand All @@ -26,9 +28,9 @@ data:
JOB_MANAGER_URL: {{ $serviceUrls.jobManager | quote }}
CLEANUP_EXPIRATION_DAYS: {{ .Values.env.cleanupExpirationDays | quote }}
RASTER_CATALOG_MANAGER_URL: {{ $serviceUrls.catalogManager | quote }}
JOB_DOMAIN: {{ $jobManagement.jobDomain | quote }}
EXPORT_JOB_TYPE: {{ $jobManagement.exporter.jobType | quote }}
TILES_TASK_TYPE: {{ $jobManagement.exporter.taskTilesType | quote }}
JOB_DOMAIN: {{ .Values.global.domain | quote }}
EXPORT_JOB_TYPE: {{ $jobDefinitions.jobs.export.type | quote }}
TILES_TASK_TYPE: {{ $jobDefinitions.tasks.export.type | quote }}
HTTP_RETRY_ATTEMPTS: {{ .Values.env.httpRetry.attempts | quote }}
HTTP_RETRY_DELAY: {{ .Values.env.httpRetry.delay | quote }}
HTTP_RETRY_SHOULD_RESET_TIMEOUT: {{ .Values.env.httpRetry.shouldResetTimeout | quote }}
Expand All @@ -44,6 +46,6 @@ data:
QUEUE_HEART_BEAT_MANAGER_BASE_URL: {{ $serviceUrls.heartbeatManager | quote }}
QUEUE_DEQUEUE_FINALIZE_INTERVAL_MS: {{ .Values.env.queue.dequeueFinalizeIntervalMs | quote }}
QUEUE_HEART_BEAT_INTERVAL_MS: {{ .Values.env.queue.heartbeatIntervalMs | quote }}
FINALIZE_TASK_TYPE: {{ $jobManagement.exporter.taskFinalizeType | quote }}
FINALIZE_TASK_TYPE: {{ $jobDefinitions.tasks.finalize.type | quote }}
FINALIZE_TASKS_ATTEMPTS: {{ .Values.env.queue.finalizeTasksAttempts | quote }}
{{- end }}
22 changes: 10 additions & 12 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ global:
heartbeatManager: ""
jobManager: ""
downloadServerPublicDNS: ""
jobManagement:
jobDomain: ""
exporter:
jobType: ""
taskTilesType: ""
taskFinalizeType: ""
storage:
tilesStorageProvider: ""
fs:
Expand All @@ -24,17 +18,21 @@ global:
ingress:
domain: 'apps.aroapp.io'

jobDefinitions:
jobs:
export:
type: ""
tasks:
export:
type: ""
finalize:
type: ""

serviceUrls:
catalogManager: ""
heartbeatManager: ""
jobManager: ""
downloadServerPublicDNS: ""
jobManagement:
jobDomain: RASTER
exporter:
jobType: ""
taskTilesType: ""
taskFinalizeType: ""
storage:
tilesStorageProvider: ''
fs:
Expand Down

0 comments on commit f979653

Please sign in to comment.