Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions courses/ocp4_advanced_deployment/lab_hw/grade_lab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
node_label: "node-role.kubernetes.io/master="
node_count: 3
task_description_message: Check if the cluster has 3 masters
student_error_message: "The cluster doesn't have 3 masters"
student_error_message: ": The cluster doesn't have 3 masters"

- name: Check if there are 2 infra
include_role:
Expand All @@ -36,7 +36,7 @@
node_label: "node-role.kubernetes.io/infra="
node_count: 2
task_description_message: Check if the cluster has 2 infra nodes
student_error_message: "The cluster doesn't have 2 infra nodes"
student_error_message: ": The cluster doesn't have 2 infra nodes"

- name: Check if there are 2 workers
include_role:
Expand All @@ -45,7 +45,7 @@
node_label: "node-role.kubernetes.io/worker="
node_count: 4 # because infra are workers too
task_description_message: Check if the cluster has 2 worker nodes
student_error_message: "The cluster doesn't have 2 worker nodes"
student_error_message: ": The cluster doesn't have 2 worker nodes"

- name: Check if the image registry is running on infra nodes
include_role:
Expand All @@ -54,7 +54,7 @@
node_label: node-role.kubernetes.io/infra=
pod_label: docker-registry=default
task_description_message: Check if image registry is running on infra nodes
student_error_message: "The image registry is not running on infra nodes"
student_error_message: ": The image registry is not running on infra nodes"

- name: Check if cluster monitoring is running on infra nodes
include_role:
Expand All @@ -63,7 +63,7 @@
node_label: node-role.kubernetes.io/infra=
pod_label: app=prometheus
task_description_message: Check if cluster monitoring is running on infra nodes
student_error_message: "Cluster monitoring is not running on infra nodes"
student_error_message: ": Cluster monitoring is not running on infra nodes"

- name: Check if Elasticsearch is running on infra nodes
include_role:
Expand All @@ -72,7 +72,7 @@
node_label: node-role.kubernetes.io/infra=
pod_label: component=elasticsearch
task_description_message: Check if Elasticsearch is running on infra nodes
student_error_message: "Elasticsearch is not running on infra nodes"
student_error_message: ": Elasticsearch is not running on infra nodes"

- name: Check if the CPU request is 500m for Elasticsearch
include_role:
Expand All @@ -86,7 +86,7 @@
json_query: "spec.nodeSpec.resources.requests.cpu"
value: "500m"
task_description_message: Check if the CPU request is 500m for Elasticsearch
student_error_message: "CPU request is not 500m for Elasticsearch"
student_error_message: ": CPU request is not 500m for Elasticsearch"

- name: Check if the memory request is 4Gi for Elasticsearch
include_role:
Expand All @@ -100,7 +100,7 @@
json_query: "spec.nodeSpec.resources.requests.memory"
value: "4Gi"
task_description_message: Check if the memory request is 4Gi for Elasticsearch
student_error_message: "Memory request is not 4Gi for Elasticsearch"
student_error_message: ": Memory request is not 4Gi for Elasticsearch"

- name: Check if the storage size is 20G for Elasticsearch
include_role:
Expand All @@ -114,7 +114,7 @@
json_query: "spec.nodes[0].storage.size"
value: "20G"
task_description_message: Check if the storage size is 20G for Elasticsearch
student_error_message: "Storage size is not 20G for Elasticsearch"
student_error_message: ": Storage size is not 20G for Elasticsearch"

- name: Check if there are 2 routers
include_role:
Expand All @@ -123,7 +123,7 @@
pod_label: ingresscontroller.operator.openshift.io/deployment-ingresscontroller=default
pod_count: 2
task_description_message: Check if the cluster has 2 router pods
student_error_message: "The cluster doesn't have 2 router pods"
student_error_message: ": The cluster doesn't have 2 router pods"

- name: Check if the routers are running on infra nodes
include_role:
Expand All @@ -132,23 +132,23 @@
node_label: node-role.kubernetes.io/infra=
pod_label: ingresscontroller.operator.openshift.io/deployment-ingresscontroller=default
task_description_message: Check if the routers are running on infra nodes
student_error_message: "The routers are not running on infra nodes"
student_error_message: ": The routers are not running on infra nodes"

- name: Check if 5 user identities exist
include_role:
name: grader_check_ocp_identity
vars:
id_count: 5
task_description_message: Check if 5 user identities exist
student_error_message: "The cluster doesn't have 5 user identities"
student_error_message: ": The cluster doesn't have 5 user identities"

- name: Check if john is a member of lab-cluster-admins with cluster-admin authorization
include_role:
name: grader_check_oc_command
vars:
oc_command: "auth can-i delete nodes -A --as-group=lab-cluster-admins --as john"
task_description_message: Check if john is a member of group lab-cluster-admins
student_error_message: "User john is not a in the lab-cluster-admins group"
student_error_message: ": User john is not a in the lab-cluster-admins group"

- name: Create a project george-test
command: oc new-project george-test
Expand All @@ -162,7 +162,7 @@
resource_namespace: george-test
resource_name: project-limits
task_description_message: Check LimitRange in project george-test
student_error_message: "LimitRange project-limits doesn't exist in project george-test"
student_error_message: ": LimitRange project-limits doesn't exist in project george-test"

- name: Check if the default CPU request is 500m in the LimitRange
include_role:
Expand All @@ -176,7 +176,7 @@
json_query: "spec.limits[[email protected]=='Container'].defaultRequest.cpu|[0]"
value: "500m"
task_description_message: Check if the default CPU request is 500m in the LimitRange
student_error_message: "Default CPU request is not 500m in the LimitRange project-limits"
student_error_message: ": Default CPU request is not 500m in the LimitRange project-limits"

- name: Check if the default memory request is 500Mi in the LimitRange
include_role:
Expand All @@ -190,7 +190,7 @@
json_query: "spec.limits[[email protected]=='Container'].defaultRequest.memory|[0]"
value: "500Mi"
task_description_message: Check if the default memory request is 500Mi in the LimitRange
student_error_message: "Default CPU request is not 500Mi in the LimitRange project-limits"
student_error_message: ": Default CPU request is not 500Mi in the LimitRange project-limits"

- name: Check ResourceQuota in project george-test
include_role:
Expand All @@ -200,7 +200,7 @@
resource_namespace: george-test
resource_name: project-quota
task_description_message: Check ResourceQuota in project george-test
student_error_message: "ResourceQuota project-quota doesn't exist in project george-test"
student_error_message: ": ResourceQuota project-quota doesn't exist in project george-test"

- name: Check if the CPU quota is 4 in the project george-test
include_role:
Expand All @@ -214,7 +214,7 @@
json_query: 'status.hard."requests.cpu"'
value: "4"
task_description_message: Check if the CPU quota is 4 in the project george-test
student_error_message: "CPU ResourceQuota is not set to 4 in the project george-test"
student_error_message: ": CPU ResourceQuota is not set to 4 in the project george-test"

- name: Check if the storage request quota is 20G in the project george-test
include_role:
Expand All @@ -228,7 +228,7 @@
json_query: 'status.hard."requests.storage"'
value: "20G"
task_description_message: Check if the storage request quota is 20G in the project george-test
student_error_message: "Storage requests quota is not set to 20G in the project george-test"
student_error_message: ": Storage requests quota is not set to 20G in the project george-test"

- name: Check NetworkPolicy allow-same-namespace in project george-test
include_role:
Expand All @@ -238,7 +238,7 @@
resource_namespace: george-test
resource_name: allow-same-namespace
task_description_message: Check NetworkPolicy allow-same-namespace in project george-test
student_error_message: "NetworkPolicy allow-same-namespace doesn't exist in project george-test"
student_error_message: ": NetworkPolicy allow-same-namespace doesn't exist in project george-test"

- name: Check NetworkPolicy allow-from-openshift-ingress in project george-test
include_role:
Expand All @@ -248,7 +248,7 @@
resource_namespace: george-test
resource_name: allow-from-openshift-ingress
task_description_message: Check NetworkPolicy allow-from-openshift-ingress in project george-test
student_error_message: "NetworkPolicy allow-from-openshift-ingress doesn't exist in project george-test"
student_error_message: ": NetworkPolicy allow-from-openshift-ingress doesn't exist in project george-test"

- name: Delete project george-test
command: oc delete project george-test
Expand Down