From ebc040fe75c314732cb868676d4b4f3e2b7e020d Mon Sep 17 00:00:00 2001 From: Rick Elrod Date: Sat, 10 Dec 2022 22:06:25 -0600 Subject: [PATCH] scale web/task replicas separately This is a breaking change since 'replicas' is no longer used. Signed-off-by: Rick Elrod --- config/crd/bases/awx.ansible.com_awxs.yaml | 9 +++++++-- roles/installer/defaults/main.yml | 3 ++- roles/installer/templates/deployments/task.yaml.j2 | 2 +- roles/installer/templates/deployments/web.yaml.j2 | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/config/crd/bases/awx.ansible.com_awxs.yaml b/config/crd/bases/awx.ansible.com_awxs.yaml index 9e30b9cb..1105eebb 100644 --- a/config/crd/bases/awx.ansible.com_awxs.yaml +++ b/config/crd/bases/awx.ansible.com_awxs.yaml @@ -699,8 +699,13 @@ spec: service_account_annotations: description: ServiceAccount annotations type: string - replicas: - description: Number of instance replicas + web_replicas: + description: Number of web instance replicas + type: integer + default: 1 + format: int32 + task_replicas: + description: Number of task instance replicas type: integer default: 1 format: int32 diff --git a/roles/installer/defaults/main.yml b/roles/installer/defaults/main.yml index 85676ee9..f72fa7f5 100644 --- a/roles/installer/defaults/main.yml +++ b/roles/installer/defaults/main.yml @@ -172,7 +172,8 @@ _init_projects_container_image: quay.io/centos/centos:stream9 create_preload_data: true -replicas: "1" +web_replicas: "1" +task_replicas: "1" task_args: - /usr/bin/launch_awx_task.sh diff --git a/roles/installer/templates/deployments/task.yaml.j2 b/roles/installer/templates/deployments/task.yaml.j2 index 6af21d77..44cc0d59 100644 --- a/roles/installer/templates/deployments/task.yaml.j2 +++ b/roles/installer/templates/deployments/task.yaml.j2 @@ -8,7 +8,7 @@ metadata: {{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }} {{ lookup("template", "../common/templates/labels/version.yaml.j2") | indent(width=4) | trim }} spec: - replicas: {{ replicas }} + replicas: {{ task_replicas }} selector: matchLabels: app.kubernetes.io/name: '{{ ansible_operator_meta.name }}-task' diff --git a/roles/installer/templates/deployments/web.yaml.j2 b/roles/installer/templates/deployments/web.yaml.j2 index 48da18fc..4eb82922 100644 --- a/roles/installer/templates/deployments/web.yaml.j2 +++ b/roles/installer/templates/deployments/web.yaml.j2 @@ -9,7 +9,7 @@ metadata: {{ lookup("template", "labels/common.yaml.j2") | indent(width=4) | trim }} {{ lookup("template", "labels/version.yaml.j2") | indent(width=4) | trim }} spec: - replicas: {{ replicas }} + replicas: {{ web_replicas }} selector: matchLabels: app.kubernetes.io/name: '{{ ansible_operator_meta.name }}-web'