Skip to content

Commit

Permalink
Added container level security context for task and web deployments
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Dasson <gaurav.dasson@gmail.com>
  • Loading branch information
Gaurav Dasson committed Mar 1, 2024
1 parent 6a7aace commit 917e2c2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions roles/installer/templates/deployments/task.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,13 @@ spec:
{% if redis_security_context|length or redis_capabilities is defined %}
securityContext:
{% if redis_security_context|length %}
{{ redis_security_context | to_yaml | indent(12,true) }}
{{ redis_security_context | to_nice_yaml | indent(12,true) }}
{%- endif %}
{% if redis_capabilities is defined and redis_capabilities %}
capabilities:
add: {{ redis_capabilities }}
{% endif %}
add:
{{ redis_capabilities | to_yaml | indent(16,true) }}
{%- endif %}
{% endif %}
args: ["redis-server", "/etc/redis.conf"]
volumeMounts:
Expand Down Expand Up @@ -198,7 +199,7 @@ spec:
{{ task_security_context | to_yaml | indent(12,true) }}
{%- endif %}
{% if task_privileged == true %}
privileged: true
privileged: true
{% endif %}
{% endif %}
{% if task_command %}
Expand Down

0 comments on commit 917e2c2

Please sign in to comment.