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:
parent
85de7fe8c0
commit
ae32caf150
2 changed files with 23 additions and 0 deletions
22
roles/communishift/tasks/create-resource-quota.yml
Normal file
22
roles/communishift/tasks/create-resource-quota.yml
Normal 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
|
|
@ -11,3 +11,4 @@
|
||||||
- include_tasks: create-efs-secret.yml
|
- include_tasks: create-efs-secret.yml
|
||||||
- include_tasks: create-role.yml
|
- include_tasks: create-role.yml
|
||||||
- include_tasks: create-role-binding.yml
|
- include_tasks: create-role-binding.yml
|
||||||
|
- include_tasks: create-resource-quota.yml
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue