From fc7c7544a9768ef1a7589faa978164a8c6233024 Mon Sep 17 00:00:00 2001 From: Zachary Winnerman <98712682+zwinnerman-fleetdm@users.noreply.github.com> Date: Thu, 27 Jul 2023 14:57:11 -0400 Subject: [PATCH] Revert these PRs: (#13001) https://github.com/fleetdm/fleet/pull/12763/files https://github.com/fleetdm/fleet/pull/12854/files https://github.com/fleetdm/fleet/pull/12764/files # 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)). --- .../sandbox/JITProvisioner/ingress_destroyer/main.go | 4 +++- .../deploy_terraform/fleet/templates/cronjobs.yaml | 5 +++-- .../PreProvisioner/lambda/deploy_terraform/main.tf | 10 ---------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/infrastructure/sandbox/JITProvisioner/ingress_destroyer/main.go b/infrastructure/sandbox/JITProvisioner/ingress_destroyer/main.go index 328a68ae9a..f8daea966a 100644 --- a/infrastructure/sandbox/JITProvisioner/ingress_destroyer/main.go +++ b/infrastructure/sandbox/JITProvisioner/ingress_destroyer/main.go @@ -6,7 +6,7 @@ import ( "log" "os" "os/exec" - "time" + //"time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" @@ -66,6 +66,7 @@ func deleteIngress(id, name, ddbTable string) { log.Fatal(err) } + /* // Delete the cronjob so we don't spam the database for stuff that's not running err = clientset.BatchV1().CronJobs("default").Delete(context.Background(), id, v1.DeleteOptions{}) if err != nil { @@ -85,6 +86,7 @@ func deleteIngress(id, name, ddbTable string) { if err != nil { log.Fatal(err) } + */ svc := dynamodb.New(sess) err = updateFleetInstanceState(id, ddbTable, svc) 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 f7992ac309..8bc67515df 100644 --- a/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/fleet/templates/cronjobs.yaml +++ b/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/fleet/templates/cronjobs.yaml @@ -14,6 +14,7 @@ spec: # see https://docs.google.com/document/d/1-4KmOlgfGEksNZnQo79a9nRLgM_i7ar2qovoZO3s_6g/edit. concurrencyPolicy: Forbid schedule: "{{ .Values.crons.vulnerabilities }}" + suspend: true # EKS Fargate keeps resources running to show the job history. # This saves significantly on compute in AWS. # https://docs.google.com/document/d/1-4KmOlgfGEksNZnQo79a9nRLgM_i7ar2qovoZO3s_6g/edit @@ -35,10 +36,10 @@ spec: resources: limits: cpu: {{ .Values.resources.limits.cpu }} - memory: "2Gi" + memory: {{ .Values.resources.limits.memory }} requests: cpu: {{ .Values.resources.requests.cpu }} - memory: "2Gi" + memory: {{ .Values.resources.requests.memory }} env: ## BEGIN FLEET SECTION - name: FLEET_SERVER_SANDBOX_ENABLED diff --git a/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/main.tf b/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/main.tf index 2b52b975e6..0fdff7a0ee 100644 --- a/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/main.tf +++ b/infrastructure/sandbox/PreProvisioner/lambda/deploy_terraform/main.tf @@ -212,16 +212,6 @@ resource "helm_release" "main" { name = "apm.token" value = var.apm_token } - - set { - name = "resources.limits.memory" - value = "512Mi" - } - - set { - name = "resources.requests.memory" - value = "512Mi" - } } data "aws_iam_policy_document" "main" {