rework communishift to allow for per-project resource requirements

This commit is contained in:
Leo Puvilland
2023-11-16 10:17:21 -08:00
committed by kevin
parent 845ba32c3a
commit 125f956f06
4 changed files with 27 additions and 10 deletions

View File

@@ -33,6 +33,26 @@ br0_nm: 255.255.255.0
br1_nm: 255.255.255.0
# assume collectd apache
collectd_apache: true
# communishift project resource overrides
communishift_projects:
communishift-dev-test:
name: communishift-dev-test
communishift-fedora-review-service:
name: communishift-fedora-review-service
communishift-lightspeed-build:
name: communishift-lightspeed-build
communishift-log-detective:
name: communishift-log-detective
communishift-mattdm:
name: communishift-mattdm
communishift-openscanhub:
name: communishift-openscanhub
cpu_requests: 2
memory_requests: 2Gi
cpu_limits: 2
memory_limits: 4Gi
communishift-planet:
name: communishift-planet
# true or false if we are or are not a copr build virthost.
# Default to false
copr_build_virthost: false

View File

@@ -32,10 +32,7 @@
apply:
tags:
- create_efs
vars:
communishift_project_name: "{{ outer_item }}"
loop_control:
loop_var: outer_item
loop: "{{ lookup('dict', communishift_projects) }}"
vars:
communishift_package_list:
- kubernetes

View File

@@ -12,11 +12,11 @@
namespace: "{{ communishift_project_name }}"
spec:
hard:
cpu: "1" # requests.cpu
memory: "1Gi" # requests.memory
limits.cpu: "1"
limits.memory: "2Gi"
requests.storage: "5Gi"
cpu: "{{ item.value.cpu_requests | 1 }}" # requests.cpu
memory: "{{ item.value.memory_requests | 1Gi }}" # requests.memory
limits.cpu: "{{ item.value.cpu_limits | 1 }}"
limits.memory: "{{ item.value.memory_limits | 2Gi }}"
requests.storage: "{{ item.value.storage_requests | 5Gi }}"
persistentvolumeclaims: "1"
pods: "2"
replicationcontrollers: 1

View File

@@ -69,7 +69,7 @@ global_pkgs_inst: ['bind-utils', 'nc', 'openssh-clients',
'patch', 'postfix', 'rsync', 'strace',
'tmpwatch', 'traceroute', 'vim-enhanced', 'xz', 'zsh',
'bash-completion',
'atop', 'htop', 'rsyslog' ]
'atop', 'htop', 'rsyslog']
# Set up variables for various files to make sure we don't forget to use.
repoSpanner_rpms_http: 8445
repoSpanner_ansible_http: 8443