Check can apply the resource quota limit to project and namespace

  • Related issues: #1454 Incorrect memory unit conversion in namespace resource quota

Category:

  • Rancher Integration

Environment setup

  1. Install the latest rancher from docker command
$ sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher:v2.6.3

Verification Steps

  1. Access Rancher dashboard
  2. Open Cluster management -> Explore the active cluster
  3. Create a new project test-1454-proj in Projects/Namespaces
  4. Set resource quota for the project
  • Memory Limit:
    • Project Limit: 512
    • Namespace default limit: 256
  • Memory Reservation:
    • Project Limit: 256
    • Namespace default limit: 128
  1. Click create namespace test-1454-ns under project test-1454-proj
  2. Click Kubectl Shell and run the following command
  • kubectl get ns
  • kubectl get quota -n test-1454-ns
  1. Check the output
  2. Click Workload -> Deployments -> Create
  3. Given the Name, Namespace and Container image image
  4. Click Create

Expected Results

Based on configured project resource limit and namespace default limit,

  1. The memory limit of 256 Megabytes and memory reservation of 128 Megabytes can be configured and applied to project correctly.

image

image

image