From 975290d517eedbcf473a6f42d82370418d52e1bd Mon Sep 17 00:00:00 2001 From: Rub21 Date: Thu, 1 Aug 2024 12:56:30 -0500 Subject: [PATCH] Add resource allocation for cronjob taginfo --- .../templates/taginfo/taginfo-cronJob.yaml | 15 ++++++++--- osm-seed/values.yaml | 27 +++++++++++++++---- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/osm-seed/templates/taginfo/taginfo-cronJob.yaml b/osm-seed/templates/taginfo/taginfo-cronJob.yaml index 6fb5bc38..ea06ed5b 100644 --- a/osm-seed/templates/taginfo/taginfo-cronJob.yaml +++ b/osm-seed/templates/taginfo/taginfo-cronJob.yaml @@ -10,7 +10,7 @@ metadata: environment: {{ .Values.environment }} release: {{ .Release.Name }} spec: - schedule: {{ .Values.taginfo.cronjob.schedule | quote}} + schedule: {{ .Values.taginfo.cronjob.schedule | quote }} concurrencyPolicy: Forbid startingDeadlineSeconds: 10 successfulJobsHistoryLimit: 2 @@ -31,10 +31,19 @@ spec: envFrom: - configMapRef: name: {{ .Release.Name }}-taginfo-common-env + {{- if .Values.taginfo.cronjob.resources.enabled }} + resources: + requests: + memory: {{ .Values.taginfo.cronjob.resources.requests.memory }} + cpu: {{ .Values.taginfo.cronjob.resources.requests.cpu }} + limits: + memory: {{ .Values.taginfo.cronjob.resources.limits.memory }} + cpu: {{ .Values.taginfo.cronjob.resources.limits.cpu }} + {{- end }} restartPolicy: Never {{- if .Values.taginfo.cronjob.nodeSelector.enabled }} nodeSelector: - {{ .Values.taginfo.cronjob.nodeSelector.label_key }} : {{ .Values.taginfo.cronjob.nodeSelector.label_value }} + {{ .Values.taginfo.cronjob.nodeSelector.label_key }}: {{ .Values.taginfo.cronjob.nodeSelector.label_value }} {{- end }} {{- end }} -{{- end }} +{{- end }} \ No newline at end of file diff --git a/osm-seed/values.yaml b/osm-seed/values.yaml index 13f55c0c..f3516517 100644 --- a/osm-seed/values.yaml +++ b/osm-seed/values.yaml @@ -40,8 +40,8 @@ AWS_SSL_ARN: false # as the SSL certificate for your services. Else, you will need to configure # SSL separately. # serviceType: NodePort -serviceType: clusterIP -createClusterIssuer: true +serviceType: ClusterIP +createClusterIssuer: false # Domain that is pointed to the clusterIP # You will need to create an A record like *.osmseed.example.com pointed to the ClusterIP # Then, the cluster configuration will setup services at their respective subdomains: @@ -349,7 +349,7 @@ osmProcessor: # Variables for tiler-db # ==================================================================================================== tilerDb: - enabled: true + enabled: false image: name: "" tag: "" @@ -728,7 +728,7 @@ taginfo: name: "" tag: "" serviceAnnotations: {} - ingressDomain: taginfo.dev.osmseed.org + ingressDomain: taginfo-dev.staging.openhistoricalmap.org env: URL_PLANET_FILE_STATE: https://planet.osm.org/pbf/state.txt URL_HISTORY_PLANET_FILE_STATE: https://planet.osm.org/pbf/full-history/state.txt @@ -754,7 +754,24 @@ taginfo: memory: "2Gi" cpu: "2" nodeSelector: - enabled: false + enabled: true + label_key: nodegroup_type + label_value: web + cronjob: + enabled: true + schedule: "0 2 */3 * *" + nodeSelector: + enabled: true + label_key: nodegroup_type + label_value: job_xlarge + resources: + enabled: false + requests: + memory: "13Gi" + cpu: "3600m" + limits: + memory: "14Gi" + cpu: "3800m" # ==================================================================================================== # Variables for osm-simple-metrics # ====================================================================================================