communishift: Added task for creating Openshift ResourceQuota

Signed-off-by: David Kirwan <dkirwan@redhat.com>
Signed-off-by: Lenka Segura <lsegura@redhat.com>
Signed-off-by: Patrik Polakovic <ppolakov@redhat.com>
This commit is contained in:
David Kirwan 2022-08-23 09:05:09 +01:00
parent 85de7fe8c0
commit ae32caf150
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,22 @@
---
- name: Create a k8s ResourceQuota
community.okd.k8s:
api_key: "{{ communishift_ocp_api_token }}"
host: "{{ communishift_ocp_api_host }}"
state: present
definition:
apiVersion: v1
kind: ResourceQuota
metadata:
name: "{{ communishift_project_name }}-quota"
namespace: "{{ communishift_project_name }}"
spec:
hard:
cpu: "1" # requests.cpu
memory: "1Gi" # requests.memory
limits.cpu: "1"
limits.memory: "2Gi"
requests.storage: "5Gi"
persistentvolumeclaims: "1"
pods: "2"
replicationcontrollers: 1

View file

@ -11,3 +11,4 @@
- include_tasks: create-efs-secret.yml
- include_tasks: create-role.yml
- include_tasks: create-role-binding.yml
- include_tasks: create-resource-quota.yml