This commit is contained in:
parent
9e23e8bccd
commit
e9542affff
@ -121,15 +121,17 @@ resource "kubernetes_pod" "main" {
|
|||||||
}
|
}
|
||||||
spec {
|
spec {
|
||||||
security_context {
|
security_context {
|
||||||
run_as_user = "1000"
|
run_as_user = "{{ coder_user_uid|default("1000", true) }}"
|
||||||
fs_group = "1000"
|
fs_group = "{{ coder_user_gid|default("1000", true) }}"
|
||||||
}
|
}
|
||||||
container {
|
container {
|
||||||
name = "dev"
|
name = "dev"
|
||||||
image = "{{image}}"
|
image = "{{image}}"
|
||||||
|
{% block kubernetes_pod_main_command %}
|
||||||
command = ["bash", "-c", coder_agent.main.init_script]
|
command = ["bash", "-c", coder_agent.main.init_script]
|
||||||
|
{% endblock %}
|
||||||
security_context {
|
security_context {
|
||||||
run_as_user = "1000"
|
run_as_user = "{{ coder_user_uid|default("1000", true) }}"
|
||||||
}
|
}
|
||||||
{% block kubernetes_pod_main_env %}
|
{% block kubernetes_pod_main_env %}
|
||||||
env {
|
env {
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
{% extends "base.tf.jinja" %}
|
{% extends "base.tf.jinja" %}
|
||||||
|
|
||||||
|
{% set coder_user_uid = 41812 %}
|
||||||
|
{% set coder_user_gid = 41812 %}
|
||||||
|
|
||||||
{% block coder_apps %}
|
{% block coder_apps %}
|
||||||
resource "coder_app" "splunk" {
|
resource "coder_app" "splunk" {
|
||||||
agent_id = coder_agent.main.id
|
agent_id = coder_agent.main.id
|
||||||
@ -17,6 +20,10 @@ resource "coder_app" "splunk" {
|
|||||||
}
|
}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block kubernetes_pod_main_command %}
|
||||||
|
command = ["/sbin/entrypoint.sh", "/usr/bin/bash", "-c", coder_agent.main.init_script]
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block kubernetes_pod_main_env %}
|
{% block kubernetes_pod_main_env %}
|
||||||
env {
|
env {
|
||||||
name = "SPLUNK_START_ARGS"
|
name = "SPLUNK_START_ARGS"
|
||||||
|
|||||||
Reference in New Issue
Block a user