mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-07-27 00:51:39 +08:00
Koschei: just use millicores to avoid numeric operations
This commit is contained in:
@@ -43,15 +43,15 @@
|
||||
template: backend-deployment.yml
|
||||
objectname: "{{ item.name }}-deployment.yml"
|
||||
service: "{{ item.name }}"
|
||||
min_cpu: {{ item.cpu[0] }}
|
||||
max_cpu: {{ item.cpu[1] }}
|
||||
min_mem: {{ item.memory[0] }}
|
||||
max_mem: {{ item.memory[1] }}
|
||||
min_cpu: "{{ item.cpu[0] }}"
|
||||
max_cpu: "{{ item.cpu[1] }}"
|
||||
min_mem: "{{ item.memory[0] }}"
|
||||
max_mem: "{{ item.memory[1] }}"
|
||||
with_items:
|
||||
- { name: polling, cpu: [ 1.0, 1.5 ], memory: [ 256, 512 ] }
|
||||
- { name: scheduler, cpu: [ 0.2, 0.5 ], memory: [ 64, 128 ] }
|
||||
- { name: build-resolver, cpu: [ 1.0, 1.5 ], memory: [ 1024, 4096 ] }
|
||||
- { name: repo-resolver, cpu: [ 2.0, 8.0 ], memory: [ 1024, 4096 ] }
|
||||
- { name: polling, cpu: [ 1000, 1500 ], memory: [ 256, 512 ] }
|
||||
- { name: scheduler, cpu: [ 200, 500 ], memory: [ 64, 128 ] }
|
||||
- { name: build-resolver, cpu: [ 1000, 1500 ], memory: [ 1024, 4096 ] }
|
||||
- { name: repo-resolver, cpu: [ 2000, 8000 ], memory: [ 1024, 4096 ] }
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@ spec:
|
||||
readOnly: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: "{{ (1000 * min_cpu) | int }}m"
|
||||
cpu: "{{ min_cpu }}m"
|
||||
memory: "{{ min_mem }}Mi"
|
||||
limits:
|
||||
cpu: "{{ (1000 * max_cpu) | int }}m"
|
||||
cpu: "{{ max_cpu }}m"
|
||||
memory: "{{ max_mem }}Mi"
|
||||
volumes:
|
||||
- name: config
|
||||
|
||||
Reference in New Issue
Block a user