Skip to content

Commit

Permalink
Add resource allocation for cronjob taginfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Aug 1, 2024
1 parent deb1880 commit 975290d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
15 changes: 12 additions & 3 deletions osm-seed/templates/taginfo/taginfo-cronJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
27 changes: 22 additions & 5 deletions osm-seed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -349,7 +349,7 @@ osmProcessor:
# Variables for tiler-db
# ====================================================================================================
tilerDb:
enabled: true
enabled: false
image:
name: ""
tag: ""
Expand Down Expand Up @@ -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
Expand All @@ -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
# ====================================================================================================
Expand Down

0 comments on commit 975290d

Please sign in to comment.