1
0
Fork 0
forked from infra/ansible

bodhi: try and standardize the app names and also adjust playbook for deployment instead of deploymentconfig for scaling

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2026-05-02 10:06:44 -07:00
commit 830d4d5560
2 changed files with 10 additions and 14 deletions

View file

@ -169,22 +169,22 @@
post_tasks:
- name: Scale up pods
ansible.builtin.command: oc -n bodhi scale dc/bodhi-consumer --replicas={{ bodhi_openshift_pods }}
ansible.builtin.command: oc -n bodhi scale deployment bodhi-consumer --replicas={{ bodhi_openshift_pods }}
when: env == "production"
- name: Scale up pods
ansible.builtin.command: oc -n bodhi scale dc/bodhi-celery --replicas={{ bodhi_openshift_pods }}
ansible.builtin.command: oc -n bodhi scale deployment bodhi-celery --replicas={{ bodhi_openshift_pods }}
when: env == "production"
- name: Scale up pods
ansible.builtin.command: oc -n bodhi scale dc/bodhi-web --replicas=4
ansible.builtin.command: oc -n bodhi scale deployment bodhi-web --replicas=4
when: env == "production"
- name: Scale up pods
ansible.builtin.command: oc -n bodhi scale dc/bodhi-consumer --replicas={{ bodhi_openshift_pods_stg_consumers }}
ansible.builtin.command: oc -n bodhi scale deployment bodhi-consumer --replicas={{ bodhi_openshift_pods_stg_consumers }}
when: env == "staging"
- name: Scale up pods
ansible.builtin.command: oc -n bodhi scale dc/bodhi-celery --replicas={{ bodhi_openshift_pods }}
ansible.builtin.command: oc -n bodhi scale deployment bodhi-celery --replicas={{ bodhi_openshift_pods }}
when: env == "staging"
- name: Scale up pods
ansible.builtin.command: oc -n bodhi scale dc/bodhi-web --replicas={{ bodhi_openshift_pods }}
ansible.builtin.command: oc -n bodhi scale deployment bodhi-web --replicas={{ bodhi_openshift_pods }}
when: env == "staging"
- name: Set the timeout to the openshift route
ansible.builtin.command: "oc -n bodhi annotate route bodhi-web --overwrite haproxy.router.openshift.io/timeout=180s"

View file

@ -4,8 +4,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: bodhi
service: web
app: bodhi-web
name: bodhi-web
spec:
replicas: {{ bodhi_openshift_pods }}
@ -116,8 +115,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: bodhi
service: consumer
app: bodhi-consumer
name: bodhi-consumer
spec:
{% if env == 'staging' %}
@ -199,8 +197,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: bodhi
service: celery
app: bodhi-celery
name: bodhi-celery
spec:
replicas: {{ bodhi_openshift_pods }}
@ -278,8 +275,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: bodhi
service: celery-beat
app: bodhi-celery-beat
name: bodhi-celery-beat
spec:
replicas: 1