All checks were successful
continuous-integration/drone/push Build is passing
149 lines
3.5 KiB
Django/Jinja
149 lines
3.5 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 }}"
|
|
|
|
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 %} |