diff --git a/src/coldfront_plugin_cloud/attributes.py b/src/coldfront_plugin_cloud/attributes.py index 68f31de..41c0cda 100644 --- a/src/coldfront_plugin_cloud/attributes.py +++ b/src/coldfront_plugin_cloud/attributes.py @@ -47,6 +47,7 @@ QUOTA_LIMITS_CPU = 'OpenShift Limit on CPU Quota' QUOTA_LIMITS_MEMORY = 'OpenShift Limit on RAM Quota (MB)' QUOTA_LIMITS_EPHEMERAL_STORAGE_GB = 'OpenShift Limit on Ephemeral Storage Quota (GB)' +QUOTA_LIMITS_GPU = 'OpenShift Limit on GPU Quota' QUOTA_REQUESTS_STORAGE = 'OpenShift Request on Storage Quota (GB)' QUOTA_PVC = 'OpenShift Persistent Volume Claims Quota' @@ -62,5 +63,6 @@ QUOTA_LIMITS_CPU, QUOTA_LIMITS_MEMORY, QUOTA_LIMITS_EPHEMERAL_STORAGE_GB, + QUOTA_LIMITS_GPU, QUOTA_REQUESTS_STORAGE, QUOTA_PVC] diff --git a/src/coldfront_plugin_cloud/openshift.py b/src/coldfront_plugin_cloud/openshift.py index de86982..d216dc6 100644 --- a/src/coldfront_plugin_cloud/openshift.py +++ b/src/coldfront_plugin_cloud/openshift.py @@ -13,6 +13,7 @@ attributes.QUOTA_LIMITS_CPU: lambda x: {":limits.cpu": f"{x * 1000}m"}, attributes.QUOTA_LIMITS_MEMORY: lambda x: {":limits.memory": f"{x}Mi"}, attributes.QUOTA_LIMITS_EPHEMERAL_STORAGE_GB: lambda x: {":limits.ephemeral-storage": f"{x}Gi"}, + attributes.QUOTA_LIMITS_GPU: lambda x: {":requests.nvidia.com/gpu": f"{x}"}, attributes.QUOTA_REQUESTS_STORAGE: lambda x: {":requests.storage": f"{x}Gi"}, attributes.QUOTA_PVC: lambda x: {":persistentvolumeclaims": f"{x}"}, } diff --git a/src/coldfront_plugin_cloud/tasks.py b/src/coldfront_plugin_cloud/tasks.py index d92bbeb..6b873bd 100644 --- a/src/coldfront_plugin_cloud/tasks.py +++ b/src/coldfront_plugin_cloud/tasks.py @@ -32,6 +32,7 @@ attributes.QUOTA_LIMITS_CPU: 1, attributes.QUOTA_LIMITS_MEMORY: 4096, attributes.QUOTA_LIMITS_EPHEMERAL_STORAGE_GB: 5, + attributes.QUOTA_LIMITS_GPU: 1, attributes.QUOTA_REQUESTS_STORAGE: 20, attributes.QUOTA_PVC: 2 } @@ -45,7 +46,9 @@ attributes.QUOTA_FLOATING_IPS: 2, attributes.QUOTA_GPU: 0, }, - 'openshift': dict() + 'openshift': { + attributes.QUOTA_LIMITS_GPU: 0, + } }