Update code with capability to set the init container resources instead of using web or task container resources (#1439)

This commit is contained in:
rakesh561
2023-06-23 14:09:09 -04:00
committed by GitHub
parent 213c1bebc4
commit a8d2831b1c
5 changed files with 36 additions and 4 deletions

View File

@@ -1489,6 +1489,28 @@ spec:
type: string
type: object
type: object
init_container_resource_requirements:
description: Resource requirements for the init 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

View File

@@ -371,6 +371,11 @@ spec:
path: postgres_storage_requirements
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- description: Init Container resource requirements
path: init_container_resource_requirements
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
- displayName: Replicas
path: replicas
x-descriptors:

View File

@@ -321,6 +321,11 @@ rsyslog_resource_requirements:
cpu: 100m
memory: 128Mi
init_container_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: |

View File

@@ -76,7 +76,7 @@ spec:
- name: init
image: '{{ _init_container_image }}'
imagePullPolicy: '{{ image_pull_policy }}'
resources: {{ task_resource_requirements }}
resources: {{ init_container_resource_requirements }}
command:
- /bin/sh
- -c
@@ -122,7 +122,7 @@ spec:
- name: init-projects
image: '{{ _init_projects_container_image }}'
imagePullPolicy: '{{ image_pull_policy }}'
resources: {{ task_resource_requirements }}
resources: {{ init_container_resource_requirements }}
command:
- /bin/sh
- -c

View File

@@ -77,7 +77,7 @@ spec:
- name: init
image: '{{ _init_container_image }}'
imagePullPolicy: '{{ image_pull_policy }}'
resources: {{ web_resource_requirements }}
resources: {{ init_container_resource_requirements }}
command:
- /bin/sh
- -c
@@ -106,7 +106,7 @@ spec:
- name: init-projects
image: '{{ _init_projects_container_image }}'
imagePullPolicy: '{{ image_pull_policy }}'
resources: {{ web_resource_requirements }}
resources: {{ init_container_resource_requirements }}
command:
- /bin/sh
- -c