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

This commit is contained in:
Steve McMaster 2022-12-11 18:01:07 -05:00
parent 9e23e8bccd
commit e9542affff
2 changed files with 12 additions and 3 deletions

View File

@ -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 {

View File

@ -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"