diff --git a/tests/integration/kubernetes/k8s-qos-pods.bats b/tests/integration/kubernetes/k8s-qos-pods.bats index 6f1df43ef8..1ab96920eb 100644 --- a/tests/integration/kubernetes/k8s-qos-pods.bats +++ b/tests/integration/kubernetes/k8s-qos-pods.bats @@ -16,9 +16,15 @@ setup() { @test "Guaranteed QoS" { pod_name="qos-test" + yaml_file="${pod_config_dir}/pod-guaranteed.yaml" + + # Add policy to the yaml file + policy_settings_dir="$(create_tmp_policy_settings_dir "${pod_config_dir}")" + add_requests_to_policy_settings "${policy_settings_dir}" "ReadStreamRequest" + auto_generate_policy "${policy_settings_dir}" "${yaml_file}" # Create pod - kubectl create -f "${pod_config_dir}/pod-guaranteed.yaml" + kubectl create -f "${yaml_file}" # Check pod creation kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name" @@ -29,9 +35,15 @@ setup() { @test "Burstable QoS" { pod_name="burstable-test" + yaml_file="${pod_config_dir}/pod-burstable.yaml" + + # Add policy to the yaml file + policy_settings_dir="$(create_tmp_policy_settings_dir "${pod_config_dir}")" + add_requests_to_policy_settings "${policy_settings_dir}" "ReadStreamRequest" + auto_generate_policy "${policy_settings_dir}" "${yaml_file}" # Create pod - kubectl create -f "${pod_config_dir}/pod-burstable.yaml" + kubectl create -f "${yaml_file}" # Check pod creation kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name" @@ -42,9 +54,15 @@ setup() { @test "BestEffort QoS" { pod_name="besteffort-test" + yaml_file="${pod_config_dir}/pod-besteffort.yaml" + + # Add policy to the yaml file + policy_settings_dir="$(create_tmp_policy_settings_dir "${pod_config_dir}")" + add_requests_to_policy_settings "${policy_settings_dir}" "ReadStreamRequest" + auto_generate_policy "${policy_settings_dir}" "${yaml_file}" # Create pod - kubectl create -f "${pod_config_dir}/pod-besteffort.yaml" + kubectl create -f "${yaml_file}" # Check pod creation kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name" @@ -55,4 +73,5 @@ setup() { teardown() { kubectl delete pod "$pod_name" + delete_tmp_policy_settings_dir "${policy_settings_dir}" }