mirror of
https://github.com/status-im/consul.git
synced 2025-02-10 04:45:05 +00:00
This updates the testing/deployer (aka "topology test") framework to conditionally configure and launch catalog constructs using v2 resources. This is controlled via a Version field on the Node construct in a topology.Config. This only functions for a dataplane type and has other restrictions that match the rest of v2 (no peering, no wanfed, no mesh gateways). Like config entries, you can statically provide a set of initial resources to be synced when bringing up the cluster (beyond those that are generated for you such as workloads, services, etc). If you want to author a test that can be freely converted between v1 and v2 then that is possible. If you switch to the multi-port definition on a topology.Service (aka "workload/instance") then that makes v1 ineligible. This also adds a starter set of "on every PR" integration tests for single and multiport under test-integ/catalogv2
34 lines
765 B
Cheetah
34 lines
765 B
Cheetah
resource "docker_container" "{{.DockerNetworkName}}-forwardproxy" {
|
|
name = "{{.DockerNetworkName}}-forwardproxy"
|
|
image = docker_image.nginx.image_id
|
|
restart = "always"
|
|
dns = ["8.8.8.8"]
|
|
|
|
ports {
|
|
internal = {{.InternalPort}}
|
|
}
|
|
|
|
networks_advanced {
|
|
name = docker_network.{{.DockerNetworkName}}.name
|
|
ipv4_address = "{{.IPAddress}}"
|
|
}
|
|
|
|
env = [
|
|
{{- range .Env }}
|
|
"{{.}}",
|
|
{{- end}}
|
|
]
|
|
|
|
volumes {
|
|
host_path = abspath("nginx-config-{{.Name}}/nginx.conf")
|
|
container_path = "/etc/nginx/conf.d/default.conf"
|
|
read_only = true
|
|
}
|
|
}
|
|
|
|
output "forwardproxyport_{{.Name}}" {
|
|
value = {
|
|
for port in docker_container.{{.DockerNetworkName}}-forwardproxy.ports : port.internal => port.external
|
|
}
|
|
}
|