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