From 59d976766e3cebc706f2b1cd306f41dad7ca87de Mon Sep 17 00:00:00 2001 From: Matthew Cary Date: Wed, 2 Feb 2022 16:26:45 +0000 Subject: [PATCH] use cos_containerd as default image --- test/k8s-integration/cluster.go | 3 ++- test/k8s-integration/main.go | 4 ++-- test/run-k8s-integration-ci.sh | 2 +- test/run-k8s-integration.sh | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/k8s-integration/cluster.go b/test/k8s-integration/cluster.go index 5a2c2b0c8..38257c29f 100644 --- a/test/k8s-integration/cluster.go +++ b/test/k8s-integration/cluster.go @@ -135,8 +135,9 @@ func clusterUpGCE(k8sDir, gceZone string, numNodes int, numWindowsNodes int, ima func setImageTypeEnvs(imageType string) error { switch strings.ToLower(imageType) { case "cos": + case "cos_containerd": case "gci": // GCI/COS is default type and does not need env vars set - case "ubuntu": + case "ubuntu", "ubuntu_containerd": return errors.New("setting environment vars for bringing up *ubuntu* cluster on GCE is unimplemented") /* TODO(dyzz) figure out how to bring up a Ubuntu cluster on GCE. The below doesn't work. err := os.Setenv("KUBE_OS_DISTRIBUTION", "ubuntu") diff --git a/test/k8s-integration/main.go b/test/k8s-integration/main.go index 5a29aefeb..7a83c5858 100644 --- a/test/k8s-integration/main.go +++ b/test/k8s-integration/main.go @@ -47,7 +47,7 @@ var ( gkeClusterVer = flag.String("gke-cluster-version", "", "version of Kubernetes master and node for gke") numNodes = flag.Int("num-nodes", 0, "the number of nodes in the test cluster") numWindowsNodes = flag.Int("num-windows-nodes", 0, "the number of Windows nodes in the test cluster") - imageType = flag.String("image-type", "cos", "the image type to use for the cluster") + imageType = flag.String("image-type", "cos_containerd", "the image type to use for the cluster") gkeReleaseChannel = flag.String("gke-release-channel", "", "GKE release channel to be used for cluster deploy. One of 'rapid', 'stable' or 'regular'") gkeTestClusterPrefix = flag.String("gke-cluster-prefix", "pdcsi", "Prefix of GKE cluster names. A random suffix will be appended to form the full name.") gkeTestClusterName = flag.String("gke-cluster-name", "", "Name of existing cluster") @@ -155,7 +155,7 @@ func main() { if !*bringupCluster && *platform != "windows" { ensureVariable(kubeFeatureGates, false, "kube-feature-gates set but not bringing up new cluster") } else { - ensureVariable(imageType, true, "image type is a required flag. Available options include 'cos' and 'ubuntu'") + ensureVariable(imageType, true, "image type is a required flag. A good default is 'cos_containerd'") if *isRegionalCluster { klog.Error("is-regional-cluster can only be set when using an existing cluster") } diff --git a/test/run-k8s-integration-ci.sh b/test/run-k8s-integration-ci.sh index 6027898b6..e2fbeffbd 100755 --- a/test/run-k8s-integration-ci.sh +++ b/test/run-k8s-integration-ci.sh @@ -20,7 +20,7 @@ readonly kube_version=${GCE_PD_KUBE_VERSION:-master} readonly test_version=${TEST_VERSION:-master} readonly gce_zone=${GCE_CLUSTER_ZONE:-us-central1-b} readonly gce_region=${GCE_CLUSTER_REGION:-} -readonly image_type=${IMAGE_TYPE:-cos} +readonly image_type=${IMAGE_TYPE:-cos_containerd} readonly use_gke_managed_driver=${USE_GKE_MANAGED_DRIVER:-false} readonly gke_release_channel=${GKE_RELEASE_CHANNEL:-""} readonly teardown_driver=${GCE_PD_TEARDOWN_DRIVER:-true} diff --git a/test/run-k8s-integration.sh b/test/run-k8s-integration.sh index 3ade9fc19..cf360f04b 100755 --- a/test/run-k8s-integration.sh +++ b/test/run-k8s-integration.sh @@ -20,7 +20,7 @@ readonly kube_version=${GCE_PD_KUBE_VERSION:-master} readonly test_version=${TEST_VERSION:-master} readonly gce_zone=${GCE_CLUSTER_ZONE:-us-central1-b} readonly gce_region=${GCE_CLUSTER_REGION:-} -readonly image_type=${IMAGE_TYPE:-cos} +readonly image_type=${IMAGE_TYPE:-cos_containerd} readonly use_gke_managed_driver=${USE_GKE_MANAGED_DRIVER:-false} readonly gke_release_channel=${GKE_RELEASE_CHANNEL:-""} readonly teardown_driver=${GCE_PD_TEARDOWN_DRIVER:-true}