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" {