From cf26a6194ff5962f5d45ce69abdc0e9953778093 Mon Sep 17 00:00:00 2001 From: Zachary Winnerman <98712682+zwinnerman-fleetdm@users.noreply.github.com> Date: Wed, 12 Apr 2023 18:34:20 -0400 Subject: [PATCH] A temp fix for jobs hogging resources (#11175) # Checklist for submitter If some of the following don't apply, delete the relevant line. - [ ] Changes file added for user-visible changes in `changes/` or `orbit/changes/`. See [Changes files](https://fleetdm.com/docs/contributing/committing-changes#changes-files) for more information. - [ ] Documented any API changes (docs/Using-Fleet/REST-API.md or docs/Contributing/API-for-contributors.md) - [ ] Documented any permissions changes - [ ] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements) - [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for new osquery data ingestion features. - [ ] Added/updated tests - [ ] Manual QA for all new/changed functionality - For Orbit and Fleet Desktop changes: - [ ] Manual QA must be performed in the three main OSs, macOS, Windows and Linux. - [ ] Auto-update manual QA, from released version of component to new version (see [tools/tuf/test](../tools/tuf/test/README.md)). --- .../lambda/deploy_terraform/fleet/templates/cronjobs.yaml | 1 + .../lambda/deploy_terraform/fleet/templates/job-migration.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/fleet/templates/cronjobs.yaml b/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/fleet/templates/cronjobs.yaml index 4563b9c0a3..125350bf4c 100644 --- a/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/fleet/templates/cronjobs.yaml +++ b/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/fleet/templates/cronjobs.yaml @@ -11,6 +11,7 @@ metadata: namespace: {{ .Release.Namespace }} spec: schedule: "{{ .Values.crons.vulnerabilities }}" + successfulJobsHistoryLimit: 0 jobTemplate: spec: template: diff --git a/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/fleet/templates/job-migration.yaml b/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/fleet/templates/job-migration.yaml index 8986e1513f..bfeef59398 100644 --- a/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/fleet/templates/job-migration.yaml +++ b/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/fleet/templates/job-migration.yaml @@ -10,6 +10,7 @@ metadata: name: {{ .Values.fleetName }}-migration namespace: {{ .Release.Namespace }} spec: + ttlSecondsAfterFinished: 100 template: metadata: {{- with .Values.podAnnotations }}