#1306 communishift: set default resource limits for pods
Merged a year ago by kevin. Opened a year ago by darknao.
fedora-infra/ darknao/ansible communishift  into  main

@@ -0,0 +1,21 @@ 

+ ---

+ - name: Create a k8s LimitRange

+   community.okd.k8s:

+     api_key: "{{ communishift_ocp_api_token }}"

+     host: "{{ communishift_ocp_api_host }}"

+     state: present

+     definition:

+       apiVersion: v1

+       kind: LimitRange

+       metadata:

+         name: "{{ communishift_project_name }}-limitrange"

+         namespace: "{{ communishift_project_name }}"

+       spec:

+         limits:

+           - default:

+               cpu: 500m

+               memory: 500Mi

+             defaultRequest:

+               cpu: 100m

+               memory: 100Mi

+             type: Container

@@ -12,3 +12,4 @@ 

  - include_tasks: create-role.yml

  - include_tasks: create-role-binding.yml

  - include_tasks: create-resource-quota.yml

+ - include_tasks: create-limit-range.yml

Once a resource quota is set for a namespace, kube will refuse to
schedule any pod without limits set, including build pod.
This can be difficult to figure out unless you know where to look, and
can be challenging for new openshift/kubernetes users.
Setting a default limit would, at least, avoid the non-schedulable
issue.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

rebased onto abd40a6626f1469bc48704542f2b53a3e3d96963

a year ago

Build succeeded.

rebased onto c312d893ee003bbad1fe9b52236f661abddf19f4

a year ago

Build succeeded.

rebased onto 7e979cb

a year ago

rebased onto 7e979cb

a year ago

Pull-Request has been merged by kevin

a year ago

Build succeeded.