From 1aa6b2dfd6d6bb5556c3234343a70c14f0e3040e Mon Sep 17 00:00:00 2001 From: Matthew Abbott Date: Mon, 10 Mar 2025 16:28:52 -0500 Subject: [PATCH] Switch from static resources to dynamic via values --- templates/job-deploy-search.yaml | 6 +++--- values.yaml | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/templates/job-deploy-search.yaml b/templates/job-deploy-search.yaml index 9aff1ab..3cf7795 100644 --- a/templates/job-deploy-search.yaml +++ b/templates/job-deploy-search.yaml @@ -47,10 +47,10 @@ spec: - name: {{ include "mastodon.fullname" . }}-deploy-search image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- with .Values.mastodon.hooks.deploySearch.resources }} resources: - requests: - cpu: 700m - memory: 768Mi + {{- toYaml . | nindent 12 }} + {{- end }} command: - bin/tootctl - search diff --git a/values.yaml b/values.yaml index de4cac2..fcd9c66 100644 --- a/values.yaml +++ b/values.yaml @@ -40,6 +40,11 @@ mastodon: concurrency: 5 resetChewy: true only: "" # one index name. Possible values: instances, accounts, tags, statuses, public_statuses + resources: + requests: + cpu: 700m + memory: 768Mi + # Upload website assets to S3 before deploying using rclone. # Whenever there is an update to Mastodon, sometimes there are assets files # that are renamed. As the pods are getting redeployed, and old/new pods are