Skip to content

Commit

Permalink
Added capability to set the rsyslog container resources (#1410)
Browse files Browse the repository at this point in the history
* Update awx.ansible.com_awxs.yaml with rsyslog resource containers
* Update awx-operator.clusterserviceversion.yaml with x-descriptors
* Add default values in main.yml
* Template resource_requirements in web.yaml.j2 and task.yaml.j2
  • Loading branch information
rakesh561 authored May 17, 2023
1 parent 866acb3 commit 721d681
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
22 changes: 22 additions & 0 deletions config/crd/bases/awx.ansible.com_awxs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1467,6 +1467,28 @@ spec:
type: string
type: object
type: object
rsyslog_resource_requirements:
description: Resource requirements for the rsyslog container
properties:
requests:
properties:
cpu:
type: string
memory:
type: string
storage:
type: string
type: object
limits:
properties:
cpu:
type: string
memory:
type: string
storage:
type: string
type: object
type: object
service_account_annotations:
description: ServiceAccount annotations
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
- displayName: Rsyslog Container Resource Requirements
path: rsyslog_resource_requirements
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
- description: The PostgreSQL container is not used when an external DB is configured
displayName: PostgreSQL Container Resource Requirements
path: postgres_resource_requirements
Expand Down
10 changes: 6 additions & 4 deletions roles/installer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,6 @@ ee_resource_requirements:
memory: 64Mi

# TODO: validate default resource requirements
rsyslog_resource_requirements:
requests:
cpu: 100m
memory: 128Mi

# Customize CSRF options
csrf_cookie_secure: False
Expand All @@ -319,6 +315,12 @@ redis_resource_requirements:
requests:
cpu: 50m
memory: 64Mi

rsyslog_resource_requirements:
requests:
cpu: 100m
memory: 128Mi

# Add extra environment variables to the AWX task/web containers. Specify as
# literal block. E.g.:
# task_extra_env: |
Expand Down
1 change: 1 addition & 0 deletions roles/installer/templates/deployments/task.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ spec:
{% if ee_extra_env -%}
{{ ee_extra_env | indent(width=12, first=True) }}
{% endif %}
resources: {{ rsyslog_resource_requirements }}
- image: '{{ _image }}'
name: '{{ ansible_operator_meta.name }}-rsyslog'
{% if rsyslog_command %}
Expand Down
1 change: 1 addition & 0 deletions roles/installer/templates/deployments/web.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ spec:
mountPath: "/var/run/redis"
- name: rsyslog-socket
mountPath: "/var/run/awx-rsyslog"
resources: {{ rsyslog_resource_requirements }}
{% if bundle_ca_crt %}
- name: "ca-trust-extracted"
mountPath: "/etc/pki/ca-trust/extracted"
Expand Down

0 comments on commit 721d681

Please sign in to comment.