From 461efc0dd57188867c1773880766ea840a4fbced Mon Sep 17 00:00:00 2001 From: Saul Paredes Date: Fri, 8 Nov 2024 12:02:35 -0800 Subject: [PATCH] tests: remove manifest v1 test This test was meant to show support for pulling images with v1 manifest schema versions. The nginxhttps image has been modified in https://hub.docker.com/r/ymqytw/nginxhttps/tags such that we are no longer able to pull it: $ docker pull ymqytw/nginxhttps:1.5 Error response from daemon: missing signature key We may remove this test since schema version 1 manifests are deprecated per https://docs.docker.com/engine/deprecated/#pushing-and-pulling-with-image-manifest-v2-schema-1 : "These legacy formats should no longer be used, and users are recommended to update images to use current formats, or to upgrade to more current images". This schema version was used by old docker versions. Further OCI spec https://github.com/opencontainers/image-spec/blob/main/manifest.md#image-manifest-property-descriptions only supports schema version 2. Signed-off-by: Saul Paredes --- .../filter_out_per_arch/aarch64.yaml | 3 +- .../filter_out_per_arch/ppc64le.yaml | 3 +- .../kubernetes/filter_out_per_arch/s390x.yaml | 3 +- .../kubernetes/k8s-pod-manifest-v1.bats | 31 ------------------- .../kubernetes/run_kubernetes_tests.sh | 9 ------ .../pod-manifest-v1.yaml | 18 ----------- 6 files changed, 3 insertions(+), 64 deletions(-) delete mode 100644 tests/integration/kubernetes/k8s-pod-manifest-v1.bats delete mode 100644 tests/integration/kubernetes/runtimeclass_workloads/pod-manifest-v1.yaml diff --git a/tests/integration/kubernetes/filter_out_per_arch/aarch64.yaml b/tests/integration/kubernetes/filter_out_per_arch/aarch64.yaml index ec8607575e..92f1bab555 100644 --- a/tests/integration/kubernetes/filter_out_per_arch/aarch64.yaml +++ b/tests/integration/kubernetes/filter_out_per_arch/aarch64.yaml @@ -23,5 +23,4 @@ kubernetes: - k8s-limit-range - k8s-number-cpus - k8s-oom - - k8s-qos-pods - - k8s-pod-manifest-v1.bats + - k8s-qos-pods \ No newline at end of file diff --git a/tests/integration/kubernetes/filter_out_per_arch/ppc64le.yaml b/tests/integration/kubernetes/filter_out_per_arch/ppc64le.yaml index 33a45e151e..dcff675e81 100644 --- a/tests/integration/kubernetes/filter_out_per_arch/ppc64le.yaml +++ b/tests/integration/kubernetes/filter_out_per_arch/ppc64le.yaml @@ -11,5 +11,4 @@ kubernetes: - k8s-inotify - k8s-limit-range - k8s-number-cpus - - k8s-oom - - k8s-pod-manifest-v1.bats + - k8s-oom \ No newline at end of file diff --git a/tests/integration/kubernetes/filter_out_per_arch/s390x.yaml b/tests/integration/kubernetes/filter_out_per_arch/s390x.yaml index 1bd80590ba..57de88adfb 100644 --- a/tests/integration/kubernetes/filter_out_per_arch/s390x.yaml +++ b/tests/integration/kubernetes/filter_out_per_arch/s390x.yaml @@ -6,5 +6,4 @@ kubernetes: - k8s-caps - k8s-inotify - - k8s-sandbox-vcpus-allocation # see https://github.com/kata-containers/kata-containers/issues/9093 - - k8s-pod-manifest-v1.bats + - k8s-sandbox-vcpus-allocation # see https://github.com/kata-containers/kata-containers/issues/9093 \ No newline at end of file diff --git a/tests/integration/kubernetes/k8s-pod-manifest-v1.bats b/tests/integration/kubernetes/k8s-pod-manifest-v1.bats deleted file mode 100644 index 3353a66d40..0000000000 --- a/tests/integration/kubernetes/k8s-pod-manifest-v1.bats +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bats -# -# Copyright (c) 2024 Microsoft. -# -# SPDX-License-Identifier: Apache-2.0 -# - -load "${BATS_TEST_DIRNAME}/../../common.bash" -load "${BATS_TEST_DIRNAME}/tests_common.sh" - -setup() { - get_pod_config_dir - pod_name="nginxhttps" - pod_yaml="${pod_config_dir}/pod-manifest-v1.yaml" - auto_generate_policy "${pod_config_dir}" "${pod_yaml}" -} - -@test "Deploy manifest v1 pod" { - - kubectl create -f "${pod_yaml}" - - # Wait for pod to start - kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name" -} - -teardown() { - # Debugging information - kubectl describe "pod/$pod_name" - - kubectl delete pod "$pod_name" -} diff --git a/tests/integration/kubernetes/run_kubernetes_tests.sh b/tests/integration/kubernetes/run_kubernetes_tests.sh index 24d701e4e1..b6f62d93d2 100755 --- a/tests/integration/kubernetes/run_kubernetes_tests.sh +++ b/tests/integration/kubernetes/run_kubernetes_tests.sh @@ -86,15 +86,6 @@ else "k8s-nginx-connectivity.bats" \ ) - # When testing auto-generated policy, the genpolicy tool: - # - Is able to pull this older format container image by pulling through containerd. - # - Fails to pull the same container image by using the oci_distribution crate. - # Pulling through containerd might not be practical for all users, so both pulling - # methods are supported for most container images. - if [ "${GENPOLICY_PULL_METHOD}" == "containerd" ]; then - K8S_TEST_SMALL_HOST_UNION+=("k8s-pod-manifest-v1.bats") - fi - K8S_TEST_NORMAL_HOST_UNION=( \ "k8s-number-cpus.bats" \ "k8s-parallel.bats" \ diff --git a/tests/integration/kubernetes/runtimeclass_workloads/pod-manifest-v1.yaml b/tests/integration/kubernetes/runtimeclass_workloads/pod-manifest-v1.yaml deleted file mode 100644 index 92c029b4c7..0000000000 --- a/tests/integration/kubernetes/runtimeclass_workloads/pod-manifest-v1.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (c) 2024 Microsoft -# -# SPDX-License-Identifier: Apache-2.0 -# -apiVersion: v1 -kind: Pod -metadata: - name: nginxhttps - -spec: - runtimeClassName: kata - terminationGracePeriodSeconds: 0 - containers: - - name: nginxhttps - image: "docker.io/ymqytw/nginxhttps:1.5" - ports: - - containerPort: 80