mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-08 06:12:54 +00:00
Add support for arbitrary pod-level securityContext settings
This allows for doing stuff like this on the custom resource: ``` security_context_settings: runAsUser: 1000 runAsGroup: 0 ``` I added `snakeCaseParameters: False` because without it, variables like `runAsUser` become `run_as_user`... and that doesnt work.
This commit is contained in:
@@ -235,3 +235,5 @@ bundle_cacert_secret: ''
|
||||
garbage_collect_secrets: false
|
||||
|
||||
development_mode: false
|
||||
|
||||
security_context_settings: {}
|
||||
|
||||
@@ -310,9 +310,14 @@ spec:
|
||||
tolerations:
|
||||
{{ tolerations | indent(width=8) }}
|
||||
{% endif %}
|
||||
{% if projects_persistence|bool %}
|
||||
{% if projects_persistence|bool or (security_context_settings|length) %}
|
||||
securityContext:
|
||||
{% if projects_persistence|bool %}
|
||||
fsGroup: 1000
|
||||
{% endif %}
|
||||
{% if security_context_settings|length %}
|
||||
{{ security_context_settings | to_nice_yaml | indent(8) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
volumes:
|
||||
{% if bundle_ca_crt %}
|
||||
|
||||
Reference in New Issue
Block a user