From c6bd3902b9c0fa80b380b64f05ab2166112ffac1 Mon Sep 17 00:00:00 2001 From: James Munnelly Date: Fri, 7 Sep 2018 23:24:51 +0100 Subject: [PATCH] Rename legacy minikube e2e testing script Also tidy up kind e2e testing script Signed-off-by: James Munnelly --- hack/ci/run-e2e-kind.sh | 8 +--- hack/{ci.sh => ci/run-e2e-minikube.sh} | 43 ++++++--------------- test/fixtures/kind-config-force.yaml | 53 -------------------------- 3 files changed, 12 insertions(+), 92 deletions(-) rename hack/{ci.sh => ci/run-e2e-minikube.sh} (69%) delete mode 100644 test/fixtures/kind-config-force.yaml diff --git a/hack/ci/run-e2e-kind.sh b/hack/ci/run-e2e-kind.sh index c176f6da7..3a85c3559 100755 --- a/hack/ci/run-e2e-kind.sh +++ b/hack/ci/run-e2e-kind.sh @@ -41,17 +41,11 @@ trap cleanup EXIT # deploy_kind will deploy a kubernetes-in-docker cluster deploy_kind() { - - local KIND_CONFIG="kind-config.yaml" - if [ ! -z "${KIND_KUBEADM_1_11_FORCE:-}" ]; then - KIND_CONFIG="kind-config-force.yaml" - fi - # create the kind cluster kind create \ --name="${KIND_CLUSTER_NAME}" \ --image="${KIND_IMAGE}" \ - --config "${REPO_ROOT}"/test/fixtures/"${KIND_CONFIG}" + --config "${REPO_ROOT}"/test/fixtures/kind-config.yaml export KUBECONFIG="${HOME}/.kube/kind-config-${KIND_CLUSTER_NAME}" diff --git a/hack/ci.sh b/hack/ci/run-e2e-minikube.sh similarity index 69% rename from hack/ci.sh rename to hack/ci/run-e2e-minikube.sh index fa1548103..f9275f216 100755 --- a/hack/ci.sh +++ b/hack/ci/run-e2e-minikube.sh @@ -14,8 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -## This file is a stop gap whilst we migrate the Makefile to better -## supprt prow for our testing +# This file is the entrypoint to our legacy minikube e2e testing environment +# for cert-manager. It is currently used to run e2e test jobs against a +# 1.9 or lower minikube built cluster. +# This script should not be used for anything except for our CI process. + set -o errexit set -o nounset set -o pipefail @@ -28,36 +31,12 @@ echo "Waiting for minikube cluster to be ready..." while true; do if kubectl get nodes; then break; fi; echo "Waiting 5s for kubernetes to be ready..."; sleep 5; done -echo "Installing helm with cluster-admin privileges..." -cat < the default template -kubeadmConfigTemplate: | - # config generated by kind - apiVersion: kubeadm.k8s.io/v1alpha2 - kind: MasterConfiguration - clusterName: {{.ClusterName}} - # on docker for mac we have to expose the api server via port forward, - # so we need to ensure the cert is valid for localhost so we can talk - # to the cluster after rewriting the kubeconfig to point to localhost - apiServerCertSANs: [localhost] - kubernetesVersion: {{.KubernetesVersion}} - {{if ne .UnifiedControlPlaneImage ""}} - # optionally specify a unified control plane image - unifiedControlPlaneImage: {{.UnifiedControlPlaneImage}}:{{.DockerStableTag}} - {{end}} - networking: - # Don't think setting pod subnet is currently required - # podSubnet: "" - serviceSubnet: 10.0.0.0/16 - kubeletConfiguration: - baseConfig: - clusterDNS: - - 10.0.0.10 -nodeLifecycle: - preKubeadm: - # we download kubeadm 1.11.x here manually as earlier version of kubeadm do - # not support the kubeadm MasterConfiguration structure - - name: download kubeadm 1.11.2 - mustSucceed: true - command: - - /bin/bash - - -c - - | - #!/bin/bash - set -o errexit - set -o nounset - set -o pipefail - - curl -o /usr/bin/kubeadm https://storage.googleapis.com/kubernetes-release/release/v1.11.2/bin/linux/amd64/kubeadm - chmod +x /usr/bin/kubeadm