Switch patchfox playground to dind
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Steve McMaster 2024-10-22 21:05:59 -04:00
parent 71b989393f
commit 44396707b5

View File

@ -26,34 +26,35 @@ resource "coder_app" "adminer" {
sub_path = "dev" sub_path = "dev"
read_only = false read_only = false
} }
volume_mount {
mount_path = "/mnt/pgdata"
name = "home"
sub_path = "pgdata"
read_only = false
}
{% endblock %} {% endblock %}
{% block additional_containers %} {% block additional_containers %}
container { container {
name = "postgres" name = "dind"
image = "postgres:17" image = "docker:dind"
image_pull_policy = "{{ image_pull_policy }}" image_pull_policy = "{{ image_pull_policy }}"
env { security_context {
name = "POSTGRES_PASSWORD" privileged = true
value = "postgres" run_as_user = 0
} }
command = [
"dockerd",
"--host=tcp://0.0.0.0:2375",
"--host=unix:///var/run/docker.sock",
"--mtu=1450",
"--registry-mirror=http://docker-cache.cicd.svc.cluster.local:5000"
]
env { env {
name = "PGDATA" name = "DOCKER_HOST"
value = "/var/lib/postgresql/data/pgdata" value = "tcp://localhost:2375"
} }
resources { resources {
requests = { requests = {
"cpu" = "250m" "cpu" = "500m"
"memory" = "512Mi" "memory" = "512Mi"
} }
limits = { limits = {
@ -63,107 +64,10 @@ resource "coder_app" "adminer" {
} }
volume_mount { volume_mount {
mount_path = "/var/lib/postgresql/data" mount_path = "/var/lib/docker"
name = "home" name = "home"
sub_path = "pgdata" sub_path = "docker"
read_only = false read_only = false
} }
} }
container {
name = "adminer"
image = "adminer"
image_pull_policy = "{{ image_pull_policy }}"
resources {
requests = {
"cpu" = "250m"
"memory" = "512Mi"
}
limits = {
"cpu" = "250m"
"memory" = "512Mi"
}
}
}
container {
name = "zookeeper"
image = "confluentinc/cp-zookeeper"
image_pull_policy = "{{ image_pull_policy }}"
env {
name = "ZOOKEEPER_CLIENT_PORT"
value = "2181"
}
env {
name = "ZOOKEEPER_ADMIN_ENABLE_SERVER"
value = "false"
}
env {
name = "ZOOKEEPER_TICK_TIME"
value = "2000"
}
resources {
requests = {
"cpu" = "250m"
"memory" = "512Mi"
}
limits = {
"cpu" = "250m"
"memory" = "512Mi"
}
}
}
container {
name = "kafka"
image = "confluentinc/cp-kafka"
image_pull_policy = "{{ image_pull_policy }}"
env {
name = "KAFKA_BROKER_ID"
value = "1"
}
env {
name = "KAFKA_ZOOKEEPER_CONNECT"
value = "localhost:2181"
}
env {
name = "KAFKA_ADVERTISED_LISTENERS"
value = "PLAINTEXT://localhost:9092"
}
env {
name = "KAFKA_LISTENER_SECURITY_PROTOCOL_MAP"
value = "PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT"
}
env {
name = "KAFKA_INTER_BROKER_LISTENER_NAME"
value = "PLAINTEXT"
}
env {
name = "KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR"
value = "1"
}
resources {
requests = {
"cpu" = "250m"
"memory" = "512Mi"
}
limits = {
"cpu" = "250m"
"memory" = "512Mi"
}
}
}
{% endblock %} {% endblock %}