Skip to content

Commit

Permalink
chore: change helm values by new jobDefenitions section
Browse files Browse the repository at this point in the history
  • Loading branch information
almog8k committed Oct 14, 2024
1 parent 1296b9b commit 1af213d
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 34 deletions.
4 changes: 4 additions & 0 deletions helm/templates/_tplValues.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ Custom definitions
{{- define "common.storage.merged" -}}
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.storage .Values.global.storage ) "context" . ) }}
{{- end -}}

{{- define "common.jobDefinitions.merged" -}}
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.env.jobDefinitions .Values.global.jobDefinitions ) "context" . ) }}
{{- end -}}
23 changes: 12 additions & 11 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{- $metrics := (include "common.metrics.merged" .) | fromYaml }}
{{- $serviceUrls := (include "common.serviceUrls.merged" .) | fromYaml }}
{{- $storage := (include "common.storage.merged" .) | fromYaml }}
{{- $jobDefinitions := (include "common.jobDefinitions.merged" .) | fromYaml }}

{{- if .Values.enabled -}}
apiVersion: v1
Expand Down Expand Up @@ -33,18 +34,18 @@ data:
DISABLE_HTTP_CLIENT_LOGS: {{ .Values.env.disableHttpClientLogs | quote }}
JOB_MANAGER_BASE_URL: {{ $serviceUrls.jobManager | quote}}
HEARTBEAT_BASE_URL: {{ $serviceUrls.heartbeatManager | quote}}
HEARTBEAT_INTERVAL_MS: {{ .Values.env.jobManagement.config.heartBeat.intervalMs | quote }}
DEQUEUE_INTERVAL_MS: {{ .Values.env.jobManagement.config.dequeueIntervalMs | quote }}
HEARTBEAT_INTERVAL_MS: {{ $jobDefinitions.config.heartBeat.intervalMs | quote }}
DEQUEUE_INTERVAL_MS: {{ $jobDefinitions.config.dequeueIntervalMs | quote }}
TILES_STORAGE_PROVIDER: {{ $storage.tilesStorageProvider | quote }}
INGESTION_POLLING_INIT_TASK: {{ .Values.env.jobManagement.ingestion.pollingTasks.init | quote }}
INGESTION_POLLING_FINALIZE_TASK: {{ .Values.env.jobManagement.ingestion.pollingTasks.finalize | quote }}
INGESTION_NEW_JOB_TYPE: {{ .Values.env.jobManagement.ingestion.jobs.new.type | quote }}
INGESTION_UPDATE_JOB_TYPE: {{ .Values.env.jobManagement.ingestion.jobs.update.type | quote }}
INGESTION_SWAP_UPDATE_JOB_TYPE: {{ .Values.env.jobManagement.ingestion.jobs.swapUpdate.type | quote }}
TILES_MERGING_TASK_TYPE: {{ .Values.env.jobManagement.ingestion.tasks.tilesMerging.type | quote }}
TILES_MERGING_TILE_BATCH_SIZE: {{ .Values.env.jobManagement.ingestion.tasks.tilesMerging.tileBatchSize | quote }}
TILES_MERGING_TASK_BATCH_SIZE: {{ .Values.env.jobManagement.ingestion.tasks.tilesMerging.taskBatchSize | quote }}
TILES_MERGING_USE_NEW_TARGET_FLAG: {{ .Values.env.jobManagement.ingestion.tasks.tilesMerging.useNewTargetFlagInUpdate | quote }}
INGESTION_POLLING_INIT_TASK: {{ $jobDefinitions.tasks.init.type | quote }}
INGESTION_POLLING_FINALIZE_TASK: {{ $jobDefinitions.tasks.finalize.type | quote }}
INGESTION_NEW_JOB_TYPE: {{ $jobDefinitions.jobs.new.type | quote }}
INGESTION_UPDATE_JOB_TYPE: {{ $jobDefinitions.jobs.update.type | quote }}
INGESTION_SWAP_UPDATE_JOB_TYPE: {{ $jobDefinitions.jobs.swapUpdate.type | quote }}
TILES_MERGING_TASK_TYPE: {{ $jobDefinitions.tasks.merge.type | quote }}
TILES_MERGING_TILE_BATCH_SIZE: {{ $jobDefinitions.tasks.merge.tileBatchSize | quote }}
TILES_MERGING_TASK_BATCH_SIZE: {{ $jobDefinitions.tasks.merge.taskBatchSize | quote }}
TILES_MERGING_USE_NEW_TARGET_FLAG: {{ $jobDefinitions.tasks.merge.useNewTargetFlagInUpdate | quote }}
MAPPROXY_API_URL: {{ $serviceUrls.mapproxyApi | quote }}
GEOSERVER_API_URL: {{ $serviceUrls.geoserverApi | quote }}
CATALOG_MANAGER_URL: {{ $serviceUrls.catalogManager | quote }}
Expand Down
60 changes: 37 additions & 23 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ global:
mapproxyApi: ""
geoserverApi: ""
polygonPartManager: ""
jobDefinitions:
jobs:
new:
type: ""
update:
type:
swapUpdate:
type: ""
tasks:
init:
type: ""
merge:
type: ""
finalize:
type: ""

geoserver:
workspace: ''
dataStore: ''
Expand Down Expand Up @@ -122,32 +138,30 @@ env:
attempts: 5
delay: exponential
resetTimeout: 30000
disableHttpClientLogs: true


jobManagement:
disableHttpClientLogs: true

jobDefinitions:
jobs:
new:
type: ""
update:
type: ""
swapUpdate:
type: ""
tasks:
init:
type: ""
merge:
type: ""
tileBatchSize: 10000
taskBatchSize: 5
useNewTargetFlagInUpdate: true
finalize:
type: ""
config:
dequeueIntervalMs: 3000
heartBeat:
intervalMs: 3000
ingestion:
pollingTasks:
init: init
finalize: finalize
jobs:
new:
type: 'Ingestion_New'
update:
type: 'Ingestion_Update'
swapUpdate:
type: 'Ingestion_Swap_Update'
tasks:
tilesMerging:
type: 'Tiles_Merging'
tileBatchSize: 10000
taskBatchSize: 5
useNewTargetFlagInUpdate: true

intervalMs: 3000

resources:
enabled: true
Expand Down

0 comments on commit 1af213d

Please sign in to comment.