Skip to content

Commit

Permalink
enable test handler for containerd runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
upodroid committed Nov 1, 2023
1 parent 419b93b commit d187b57
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ gcs-publish-ci: gsutil version-dist-ci
@echo "== Uploading kops =="
gsutil -h "Cache-Control:private, max-age=0, no-transform" -m cp -n -r ${UPLOAD}/kops/* ${GCS_LOCATION}
echo "VERSION: ${VERSION}"
echo "${GCS_URL}/${VERSION}" > ${UPLOAD}/${LATEST_FILE}
echo "${GCS_URL}${VERSION}" > ${UPLOAD}/${LATEST_FILE}
gsutil -h "Cache-Control:private, max-age=0, no-transform" cp ${UPLOAD}/${LATEST_FILE} ${GCS_LOCATION}

.PHONY: gen-cli-docs
Expand Down
10 changes: 0 additions & 10 deletions tests/e2e/kubetest2-kops/deployer/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ import (
"errors"
"fmt"
"os"
"path"
"path/filepath"
"strings"
"time"

"k8s.io/klog/v2"
"k8s.io/kops/tests/e2e/kubetest2-kops/gce"
"k8s.io/kops/tests/e2e/pkg/kops"
"k8s.io/kops/tests/e2e/pkg/target"
"k8s.io/kops/tests/e2e/pkg/util"
"sigs.k8s.io/kubetest2/pkg/boskos"
Expand All @@ -51,14 +49,6 @@ func (d *deployer) initialize() error {
return fmt.Errorf("init failed to check up flags: %v", err)
}
}
if d.KopsVersionMarker != "" {
d.KopsBinaryPath = path.Join(d.commonOptions.RunDir(), "kops")
baseURL, err := kops.DownloadKops(d.KopsVersionMarker, d.KopsBinaryPath)
if err != nil {
return fmt.Errorf("init failed to download kops from url: %v", err)
}
d.KopsBaseURL = baseURL
}

switch d.CloudProvider {
case "aws":
Expand Down
13 changes: 13 additions & 0 deletions tests/e2e/kubetest2-kops/deployer/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"errors"
"fmt"
osexec "os/exec"
"path"
"strings"
"time"

Expand All @@ -41,6 +42,17 @@ func (d *deployer) Up() error {
return err
}

// kops is fetched when --up is called instead of init to support a scenario where k/k is being built
// and a kops build is not ready yet
if d.KopsVersionMarker != "" {
d.KopsBinaryPath = path.Join(d.commonOptions.RunDir(), "kops")
baseURL, err := kops.DownloadKops(d.KopsVersionMarker, d.KopsBinaryPath)
if err != nil {
return fmt.Errorf("init failed to download kops from url: %v", err)
}
d.KopsBaseURL = baseURL
}

if d.terraform == nil {
klog.Info("Cleaning up any leaked resources from previous cluster")
// Intentionally ignore errors:
Expand Down Expand Up @@ -118,6 +130,7 @@ func (d *deployer) createCluster(zones []string, adminAccess string, yes bool) e
"--kubernetes-version", d.KubernetesVersion,
"--ssh-public-key", d.SSHPublicKeyPath,
"--set", "cluster.spec.nodePortAccess=0.0.0.0/0",
"--set", "spec.containerd.configAdditions=plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.test-handler.runtime_type=\"io.containerd.runc.v2\"",
}
if yes {
args = append(args, "--yes")
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/scenarios/build/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ make test-e2e-install

cd "${GOPATH}"/src/k8s.io/kubernetes

# this job assumes pull-kops-e2e-k8s-aws-calico is always ran on presubmits
kubetest2 kops -v=6 \
--up --down --build --build-kubernetes=true --target-build-arch=linux/amd64 \
--cloud-provider=gce --admin-access=0.0.0.0/0 \
--kops-version-marker=https://storage.googleapis.com/kops-ci/bin/latest-ci.txt \
--kops-version-marker=https://storage.googleapis.com/k8s-staging-kops/pulls/pull-kops-e2e-k8s-aws-calico/pull-"${PULL_PULL_SHA}"/latest-ci.txt \
--create-args "--networking=kubenet --set=spec.nodeProblemDetector.enabled=true" \
--test=kops \
-- \
Expand Down

0 comments on commit d187b57

Please sign in to comment.