Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions roles/smartgateway/templates/deployment.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,20 @@ spec:
sg-config-resource-name: {{ smartgateway_resource_configmap.env | k8s_config_resource_name }}
{% endif %}
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
containers:
{% if (applications | selectattr('name','equalto','prometheus') | list | count > 0) %}
- name: oauth-proxy
image: {{ oauth_proxy_image }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
args:
- -https-address=:8083
- -tls-cert=/etc/tls/private/tls.crt
Expand All @@ -52,6 +62,12 @@ spec:
{% if sg_vars.bridge.enabled is defined and sg_vars.bridge.enabled %}
- name: bridge
image: {{ bridge_container_image_path }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
args:
{% if sg_vars.bridge.amqp_url is defined and sg_vars.bridge.amqp_url != "" %}
- --amqp_url
Expand Down Expand Up @@ -103,6 +119,12 @@ spec:
{% if transports is defined and transports != "" %}
- name: sg-core
image: {{ core_container_image_path }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
args:
- -config
- /etc/sg-core/sg-core.conf.yaml
Expand Down
Loading