diff --git a/validate-microshift/.gitignore b/validate-microshift/.gitignore deleted file mode 100644 index f940e0b554..0000000000 --- a/validate-microshift/.gitignore +++ /dev/null @@ -1 +0,0 @@ -kubeconfig diff --git a/validate-microshift/cluster-debug-info.sh b/validate-microshift/cluster-debug-info.sh deleted file mode 100755 index 2fbe2606b5..0000000000 --- a/validate-microshift/cluster-debug-info.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash - -export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig - -declare -a commands_to_run=() -function to_run() { - local -r cmd="$*" - commands_to_run+=("${cmd}") -} - -to_run sudo vgs -to_run oc get cm -n kube-public microshift-version -o=jsonpath='{.data}' -to_run microshift version -to_run microshift version -o yaml -to_run microshift show-config -m effective -to_run oc version -to_run sudo crictl version -to_run uname -a -to_run cat /etc/*-release - -RESOURCES=(nodes pods configmaps deployments daemonsets statefulsets services routes replicasets persistentvolumeclaims persistentvolumes storageclasses endpoints endpointslices csidrivers csinodes) -for resource in "${RESOURCES[@]}"; do - to_run oc get "${resource}" -A -done - -to_run oc describe nodes -to_run oc get events -A --sort-by=.metadata.creationTimestamp - -for resource in "${RESOURCES[@]}"; do - to_run oc get "${resource}" -A -o yaml -done - -TO_DESCRIBE=(deployments daemonsets statefulsets replicasets) -for ns in $(kubectl get namespace -o jsonpath='{.items..metadata.name}'); do - to_run oc get namespace "${ns}" -o yaml - - for resource_type in "${TO_DESCRIBE[@]}"; do - for resource in $(kubectl get "${resource_type}" -n "${ns}" -o name); do - to_run oc describe -n "${ns}" "${resource}" - done - done - - for pod in $(kubectl get pods -n "${ns}" -o name); do - to_run oc describe -n "${ns}" "${pod}" - to_run oc get -n "${ns}" "${pod}" -o yaml - for container in $(kubectl get -n "${ns}" "${pod}" -o jsonpath='{.spec.containers[*].name}'); do - to_run oc logs -n "${ns}" "${pod}" "${container}" - to_run oc logs --previous=true -n "${ns}" "${pod}" "${container}" - done - done -done - -to_run nmcli -to_run ip a -to_run ip route -to_run sudo crictl images --digests -to_run sudo crictl ps -to_run sudo crictl pods -to_run ls -lah /etc/cni/net.d/ -to_run find /etc/cni/net.d/ -type f -exec echo {} \; -exec sudo cat {} \; -exec echo \; -to_run dnf list --installed -to_run dnf history -to_run sudo systemctl -a -l -to_run sudo journalctl -xu microshift -to_run sudo journalctl -xu microshift-etcd.scope - -echo -e "\n=== DEBUG INFORMATION ===\n" -echo "Following commands will be executed:" -for cmd in "${commands_to_run[@]}"; do - echo " - ${cmd}" -done - -for cmd in "${commands_to_run[@]}"; do - echo -e "\n\n > $ ${cmd}" - ${cmd} 2>&1 || true -done diff --git a/validate-microshift/e2e/microshift/15-assert.yaml b/validate-microshift/e2e/microshift/15-assert.yaml deleted file mode 100644 index 627bda17cd..0000000000 --- a/validate-microshift/e2e/microshift/15-assert.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 500 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: service-ca - namespace: openshift-service-ca -status: - availableReplicas: 1 - readyReplicas: 1 diff --git a/validate-microshift/e2e/microshift/20-assert.yaml b/validate-microshift/e2e/microshift/20-assert.yaml deleted file mode 100644 index 4044d57a8f..0000000000 --- a/validate-microshift/e2e/microshift/20-assert.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 500 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: router-default - namespace: openshift-ingress -status: - availableReplicas: 1 - readyReplicas: 1 diff --git a/validate-microshift/e2e/microshift/25-assert.yaml b/validate-microshift/e2e/microshift/25-assert.yaml deleted file mode 100644 index 4246674c1d..0000000000 --- a/validate-microshift/e2e/microshift/25-assert.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 500 ---- -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: dns-default - namespace: openshift-dns -status: - numberReady: 1 diff --git a/validate-microshift/e2e/microshift/30-assert.yaml b/validate-microshift/e2e/microshift/30-assert.yaml deleted file mode 100644 index f562d96123..0000000000 --- a/validate-microshift/e2e/microshift/30-assert.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 500 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: topolvm-controller - namespace: openshift-storage -status: - availableReplicas: 1 - readyReplicas: 1 ---- -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: topolvm-node - namespace: openshift-storage -status: - numberAvailable: 1 - numberReady: 1 diff --git a/validate-microshift/e2e/microshift/35-assert.yaml b/validate-microshift/e2e/microshift/35-assert.yaml deleted file mode 100644 index edcb29c48b..0000000000 --- a/validate-microshift/e2e/microshift/35-assert.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 500 ---- -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: node-resolver - namespace: openshift-dns -status: - numberReady: 1 diff --git a/validate-microshift/e2e/microshift/40-assert.yaml b/validate-microshift/e2e/microshift/40-assert.yaml deleted file mode 100644 index 54f8c2c8e1..0000000000 --- a/validate-microshift/e2e/microshift/40-assert.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 30 ---- -apiVersion: v1 -kind: Pod -metadata: - namespace: openshift-service-ca - labels: - app: service-ca -status: - containerStatuses: - - name: service-ca-controller - ready: true - restartCount: 0 - started: true - phase: Running diff --git a/validate-microshift/kuttl-test.sh b/validate-microshift/kuttl-test.sh deleted file mode 100755 index 9654605c0f..0000000000 --- a/validate-microshift/kuttl-test.sh +++ /dev/null @@ -1,47 +0,0 @@ -#! /usr/bin/env bash - -set -eou pipefail -set -x - -ROOT="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/../")" - -KUTTL_VERSION="0.15.0" -KUTTL="${ROOT}/bin/kuttl" - -unamem=$(uname -m) -case ${unamem} in -"x86_64") - ARCH=x86_64 - ;; -"aarch64") - ARCH=arm64 - ;; -*) - echo >&2 "Unknown architecture: ${unamem}" - exit 1 - ;; -esac - -fetch_kuttl() { - for _ in $(seq 1 5); do - if curl -sSLo "${KUTTL}" "https://github.com/kudobuilder/kuttl/releases/download/v${KUTTL_VERSION}/kubectl-kuttl_${KUTTL_VERSION}_linux_${ARCH}"; then - chmod a+x "${KUTTL}" - return 0 - fi - - sleep 5s - done - - echo >&2 "Failed to fetch kuttl" - exit 1 -} - -mkdir -p "$(dirname "${KUTTL}")" -if [ ! -e "${KUTTL}" ]; then - fetch_kuttl -fi - -${KUTTL} test --namespace test || { - "${ROOT}/validate-microshift/cluster-debug-info.sh" - exit 1 -} diff --git a/validate-microshift/kuttl-test.yaml b/validate-microshift/kuttl-test.yaml deleted file mode 100644 index 353d3c9c8f..0000000000 --- a/validate-microshift/kuttl-test.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestSuite -testDirs: - - ./e2e -timeout: 30