79 lines
1.8 KiB
Django/Jinja
79 lines
1.8 KiB
Django/Jinja
{% extends "base.tf.j2" %}
|
|
|
|
{% block coder_apps %}
|
|
resource "coder_app" "splunk" {
|
|
agent_id = coder_agent.main.id
|
|
display_name = "Splunk Web"
|
|
slug = "splunkweb"
|
|
icon = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/splunk.svg"
|
|
url = "http://localhost:8000/"
|
|
subdomain = true
|
|
share = "public"
|
|
|
|
healthcheck {
|
|
url = "http://localhost:8000/en-US/config?autoload=1"
|
|
interval = 3
|
|
threshold = 10
|
|
}
|
|
}
|
|
{% endblock %}
|
|
|
|
{% block kubernetes_pod_main_env %}
|
|
env {
|
|
name = "SPLUNK_PASSWORD"
|
|
value = "Temp1234!"
|
|
}
|
|
env {
|
|
name = "SPLUNK_START_ARGS"
|
|
value = "--accept-license"
|
|
}
|
|
{{ super() }}
|
|
{% endblock %}
|
|
|
|
{% block kubernetes_pod_main_volume_mount %}
|
|
volume_mount {
|
|
mount_path = "/opt/splunk/etc"
|
|
name = "home"
|
|
read_only = false
|
|
}
|
|
{% endblock %}
|
|
|
|
{% block parameters %}
|
|
{{ super() }}
|
|
|
|
data "coder_parameter" "splunk_version" {
|
|
name = "Splunk Version"
|
|
description = "Splunk Version"
|
|
type = "string"
|
|
default = "{{ splunk_versions[-1] }}"
|
|
icon = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/splunk.svg"
|
|
|
|
mutable = true
|
|
{% for version in splunk_versions %}
|
|
option {
|
|
name = "{{ version }}"
|
|
value = "{{ version }}"
|
|
}
|
|
{% endfor %}
|
|
}
|
|
{% endblock %}
|
|
|
|
{% block coder_scripts %}
|
|
{{ super() }}
|
|
|
|
resource "coder_script" "splunk_ansible" {
|
|
agent_id = coder_agent.main.id
|
|
display_name = "splunk_ansible"
|
|
run_on_start = true
|
|
run_on_stop = false
|
|
script = <<EOT
|
|
#!/bin/bash
|
|
|
|
sudo -E -u ansible /sbin/entrypoint.sh start-and-exit
|
|
EOT
|
|
}
|
|
{% endblock %}
|
|
|
|
{% block kubernetes_pod_main_image %}
|
|
image = "{{image}}:${data.coder_parameter.splunk_version.value}"
|
|
{% endblock %} |