Add UF
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Steve McMaster 2024-10-08 15:07:58 -04:00
parent 3075a88459
commit bc383cd5b4
2 changed files with 46 additions and 0 deletions

View File

@ -61,6 +61,7 @@ TEMPLATES = {
"splunk": { "splunk": {
"splunk": { "splunk": {
"image": "cr.smcm.xyz/coder-images/splunk", "image": "cr.smcm.xyz/coder-images/splunk",
"uf_image": "cr.smcm.xyz/coder-images/splunkuniversalforwarder",
"splunk_versions": ["9.1", "9.2"], "splunk_versions": ["9.1", "9.2"],
"coder_user": "splunk", "coder_user": "splunk",
"coder_user_home": "/opt/splunk/etc", "coder_user_home": "/opt/splunk/etc",

View File

@ -134,4 +134,49 @@ resource "coder_app" "splunk-lm" {
read_only = false read_only = false
} }
} }
container {
name = "uf"
image = "{{uf_image}}:${data.coder_parameter.splunk_version.value}"
command = ["sudo", "-E", "-u", "ansible", "/sbin/entrypoint.sh", "start"]
image_pull_policy = "{{ image_pull_policy }}"
security_context {
run_as_user = "{{ coder_user_uid }}"
}
env {
name = "SPLUNK_DEPLOYMENT_SERVER"
value = "lm"
}
env {
name = "SPLUNK_SVC_PORT"
value = "8091"
}
env {
name = "SPLUNK_PASSWORD"
value = "Temp1234!"
}
env {
name = "SPLUNK_START_ARGS"
value = "--accept-license"
}
resources {
requests = {
"cpu" = "250m"
"memory" = "512Mi"
}
limits = {
"cpu" = data.coder_parameter.cpu.value
"memory" = "${data.coder_parameter.memory.value}Gi"
}
}
volume_mount {
mount_path = "/opt/splunkforwarder/etc"
name = "home"
sub_path = "uf"
read_only = false
}
}
{% endblock %} {% endblock %}