This repository has been archived on 2026-01-10. You can view files and clone it, but cannot push or open issues or pull requests.
coder-templates/patchfox_playground.tf.j2
Steve McMaster da58dfd0e3
Some checks failed
continuous-integration/drone/push Build is failing
fix
2024-10-15 14:15:48 -04:00

154 lines
3.7 KiB
Django/Jinja

{% extends "_lang.tf.j2" %}
{% block coder_apps %}
resource "coder_app" "adminer" {
agent_id = coder_agent.main.id
display_name = "Adminer"
slug = "adminer"
icon = "/icon/database.svg"
url = "http://localhost:8080/"
subdomain = true
share = "public"
healthcheck {
url = "http://localhost:8080/"
interval = 3
threshold = 10
}
}
{{ super() }}
{% endblock %}
{% block kubernetes_pod_main_volume_mount %}
volume_mount {
mount_path = "{{ coder_user_home }}"
name = "home"
sub_path = "dev"
read_only = false
}
volume_mount {
mount_path = "/mnt/pgdata"
name = "home"
sub_path = "pgdata"
read_only = false
}
{% endblock %}
{% block additional_containers %}
container {
name = "postgres"
image = "postgres:17"
image_pull_policy = "{{ image_pull_policy }}"
security_context {
fs_group = "999"
fs_group_change_policy = "OnRootMismatch"
}
env {
name = "POSTGRES_PASSWORD"
value = "postgres"
}
resources {
requests = {
"cpu" = "250m"
"memory" = "512Mi"
}
limits = {
"cpu" = "1000m"
"memory" = "1024Mi"
}
}
volume_mount {
mount_path = "/var/lib/postgresql/data"
name = "home"
sub_path = "pgdata"
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 }}"
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 %}