From 7ebdbc9a3604e9e985a758257c2c546f57655e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Fr=C3=B6hlich?= Date: Fri, 24 Mar 2023 23:25:02 +0100 Subject: [PATCH] chore: not latest images, no image gc --- example/example1/example1.nomad | 11 +++++++++-- example/example2/example2.nomad | 2 +- example/example3/example3.nomad | 2 +- example/example3/example3.ref.nomad | 2 +- example/example3/mutators/pg_test.rego | 2 +- example/infra/nomad/conf/nomad.hcl | 9 ++++++++- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/example/example1/example1.nomad b/example/example1/example1.nomad index 3818e8a..993f6dd 100644 --- a/example/example1/example1.nomad +++ b/example/example1/example1.nomad @@ -1,14 +1,21 @@ job "app" { + meta { + costcenter = "cccode-my-cost-center" + } + group "app" { task "app" { driver = "docker" config { # a very simple docker container - image = "busybox:latest" + image = "busybox:1.34.1" command = "sh" - args = ["-c", "while true; do echo \"hello @ $(date)\"; sleep 5; done"] + args = [ + "-c", + "while true; do echo \"hello @ $(date)\"; sleep 5; done" + ] } } } diff --git a/example/example2/example2.nomad b/example/example2/example2.nomad index 3818e8a..2558d2d 100644 --- a/example/example2/example2.nomad +++ b/example/example2/example2.nomad @@ -6,7 +6,7 @@ job "app" { driver = "docker" config { # a very simple docker container - image = "busybox:latest" + image = "busybox:1.34.1" command = "sh" args = ["-c", "while true; do echo \"hello @ $(date)\"; sleep 5; done"] } diff --git a/example/example3/example3.nomad b/example/example3/example3.nomad index bb3cb0c..15401e0 100644 --- a/example/example3/example3.nomad +++ b/example/example3/example3.nomad @@ -10,7 +10,7 @@ job "app" { driver = "docker" config { # a very simple docker container - image = "busybox:latest" + image = "busybox:1.34.1" command = "sh" args = ["-c", "echo \"Environment:\"; env | sort; while true; do echo .; sleep 100; done"] } diff --git a/example/example3/example3.ref.nomad b/example/example3/example3.ref.nomad index 9f87187..3d38b7d 100644 --- a/example/example3/example3.ref.nomad +++ b/example/example3/example3.ref.nomad @@ -8,7 +8,7 @@ job "app" { config { - image = "busybox:latest" + image = "busybox:1.34.1" command = "sh" args = ["-c", "while true; do echo \"hello @ $(date)\"; sleep 5; done"] } diff --git a/example/example3/mutators/pg_test.rego b/example/example3/mutators/pg_test.rego index 9233bf3..f6b2931 100644 --- a/example/example3/mutators/pg_test.rego +++ b/example/example3/mutators/pg_test.rego @@ -85,7 +85,7 @@ test_pginject if { "while true; do echo 'hello $(date)'; sleep 5; done", ], "command": "sh", - "image": "busybox:latest", + "image": "busybox:1.34.1", }, "Constraints": null, "DispatchPayload": null, diff --git a/example/infra/nomad/conf/nomad.hcl b/example/infra/nomad/conf/nomad.hcl index 1fdaa1e..c0fa561 100644 --- a/example/infra/nomad/conf/nomad.hcl +++ b/example/infra/nomad/conf/nomad.hcl @@ -7,8 +7,15 @@ server { client { enabled = true -} +} +plugin "docker" { + config { + gc { + image = false + } + } +} vault { enabled = true address = "http://localhost:8200"