From a3950321a3a3e47c6dc50dfb2cc11bda3ff5ac6b Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" Date: Fri, 3 May 2024 14:58:03 -0500 Subject: [PATCH] deployer: ensure the proxy/dns/pause containers do not continually get replaced due to a change in a docker default --- .../sprawl/internal/tfgen/templates/container-coredns.tf.tmpl | 1 + .../sprawl/internal/tfgen/templates/container-pause.tf.tmpl | 1 + .../sprawl/internal/tfgen/templates/container-proxy.tf.tmpl | 1 + 3 files changed, 3 insertions(+) diff --git a/testing/deployer/sprawl/internal/tfgen/templates/container-coredns.tf.tmpl b/testing/deployer/sprawl/internal/tfgen/templates/container-coredns.tf.tmpl index 97c0d7011d..3dabd7d50e 100644 --- a/testing/deployer/sprawl/internal/tfgen/templates/container-coredns.tf.tmpl +++ b/testing/deployer/sprawl/internal/tfgen/templates/container-coredns.tf.tmpl @@ -4,6 +4,7 @@ resource "docker_container" "{{.DockerNetworkName}}-coredns" { restart = "always" dns = ["8.8.8.8"] + network_mode = "bridge" networks_advanced { name = docker_network.{{.DockerNetworkName}}.name ipv4_address = "{{.IPAddress}}" diff --git a/testing/deployer/sprawl/internal/tfgen/templates/container-pause.tf.tmpl b/testing/deployer/sprawl/internal/tfgen/templates/container-pause.tf.tmpl index ef537f0352..37a1370c63 100644 --- a/testing/deployer/sprawl/internal/tfgen/templates/container-pause.tf.tmpl +++ b/testing/deployer/sprawl/internal/tfgen/templates/container-pause.tf.tmpl @@ -23,6 +23,7 @@ ports { } {{- end }} +network_mode = "bridge" {{- range .Node.Addresses }} networks_advanced { name = docker_network.{{.DockerNetworkName}}.name diff --git a/testing/deployer/sprawl/internal/tfgen/templates/container-proxy.tf.tmpl b/testing/deployer/sprawl/internal/tfgen/templates/container-proxy.tf.tmpl index f4d7fe1d94..64e09743e1 100644 --- a/testing/deployer/sprawl/internal/tfgen/templates/container-proxy.tf.tmpl +++ b/testing/deployer/sprawl/internal/tfgen/templates/container-proxy.tf.tmpl @@ -8,6 +8,7 @@ resource "docker_container" "{{.DockerNetworkName}}-forwardproxy" { internal = {{.InternalPort}} } + network_mode = "bridge" networks_advanced { name = docker_network.{{.DockerNetworkName}}.name ipv4_address = "{{.IPAddress}}"