chore: run sonobuoy in quick mode
This adds sonobuoy's quick mode test to basic integration. Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This commit is contained in:
parent
93218687ec
commit
40f803de66
271
.drone.yml
271
.drone.yml
File diff suppressed because it is too large
Load Diff
@ -136,9 +136,7 @@ local setup_ci = {
|
||||
local Step(name, image='', target='', depends_on=[], environment={}) = {
|
||||
local make = if target == '' then std.format('make %s', name) else std.format('make %s', target),
|
||||
|
||||
local common_env_vars = {
|
||||
BINDIR: '/usr/local/bin',
|
||||
},
|
||||
local common_env_vars = {},
|
||||
|
||||
name: name,
|
||||
image: if image == '' then build_container else image,
|
||||
@ -192,7 +190,7 @@ local image_gcp = Step("image-gcp", depends_on=[installer]);
|
||||
local image_vmware = Step("image-vmware", depends_on=[installer]);
|
||||
local unit_tests = Step("unit-tests", depends_on=[talos]);
|
||||
local unit_tests_race = Step("unit-tests-race", depends_on=[golint]);
|
||||
local basic_integration = Step("basic-integration", depends_on=[unit_tests, talos, osctl_linux]);
|
||||
local basic_integration = Step("basic-integration", depends_on=[unit_tests, talos, osctl_linux], environment={TALOS_PLATFORM: "docker"});
|
||||
|
||||
local coverage = {
|
||||
name: 'coverage',
|
||||
@ -310,9 +308,9 @@ local capi = Step("capi", depends_on=[basic_integration], environment=creds_env_
|
||||
local push_image_aws = Step("push-image-aws", depends_on=[image_aws], environment=creds_env_vars);
|
||||
local push_image_azure = Step("push-image-azure", depends_on=[image_azure], environment=creds_env_vars);
|
||||
local push_image_gcp = Step("push-image-gcp", depends_on=[image_gcp], environment=creds_env_vars);
|
||||
local e2e_integration_aws = Step("e2e-integration-aws", target="e2e-integration", depends_on=[capi, push_image_aws], environment={PLATFORM: "aws"});
|
||||
local e2e_integration_azure = Step("e2e-integration-azure", target="e2e-integration", depends_on=[capi, push_image_azure], environment={PLATFORM: "azure"});
|
||||
local e2e_integration_gcp = Step("e2e-integration-gcp", target="e2e-integration", depends_on=[capi, push_image_gcp], environment={PLATFORM: "gcp"});
|
||||
local e2e_integration_aws = Step("e2e-integration-aws", target="e2e-integration", depends_on=[capi, push_image_aws], environment={TALOS_PLATFORM: "aws"});
|
||||
local e2e_integration_azure = Step("e2e-integration-azure", target="e2e-integration", depends_on=[capi, push_image_azure], environment={TALOS_PLATFORM: "azure"});
|
||||
local e2e_integration_gcp = Step("e2e-integration-gcp", target="e2e-integration", depends_on=[capi, push_image_gcp], environment={TALOS_PLATFORM: "gcp"});
|
||||
|
||||
local e2e_steps = default_steps + [
|
||||
capi,
|
||||
@ -334,9 +332,9 @@ local e2e_pipeline = Pipeline('e2e', e2e_steps) + e2e_trigger;
|
||||
|
||||
// Conformance pipeline.
|
||||
|
||||
local conformance_aws = Step("conformance-aws", target="e2e-integration", depends_on=[capi, push_image_aws], environment={PLATFORM: "aws", CONFORMANCE: "run"});
|
||||
local conformance_azure = Step("conformance-azure", target="e2e-integration", depends_on=[capi, push_image_azure], environment={PLATFORM: "azure", CONFORMANCE: "run"});
|
||||
local conformance_gcp = Step("conformance-gcp", target="e2e-integration", depends_on=[capi, push_image_gcp], environment={PLATFORM: "gcp", CONFORMANCE: "run"});
|
||||
local conformance_aws = Step("conformance-aws", target="e2e-integration", depends_on=[capi, push_image_aws], environment={SONOBUOY_MODE: "certified-conformance", TALOS_PLATFORM: "aws"});
|
||||
local conformance_azure = Step("conformance-azure", target="e2e-integration", depends_on=[capi, push_image_azure], environment={SONOBUOY_MODE: "certified-conformance", TALOS_PLATFORM: "azure"});
|
||||
local conformance_gcp = Step("conformance-gcp", target="e2e-integration", depends_on=[capi, push_image_gcp], environment={SONOBUOY_MODE: "certified-conformance", TALOS_PLATFORM: "gcp"});
|
||||
|
||||
local push_edge = {
|
||||
name: 'push-edge',
|
||||
|
@ -35,3 +35,7 @@ mkdir -p "${TMP}"
|
||||
"${OSCTL}" cluster create --name basic-integration --image "${TALOS_IMG}" --masters=3 --mtu 1440 --cpus 4.0 --wait --endpoint "${ENDPOINT}"
|
||||
|
||||
"${INTEGRATION_TEST}" -test.v -talos.osctlpath "${OSCTL}" -talos.k8sendpoint "${ENDPOINT}:6443"
|
||||
|
||||
mkdir -p ${TMP}/${TALOS_PLATFORM}
|
||||
"${OSCTL}" kubeconfig ${TMP}/${TALOS_PLATFORM}
|
||||
./hack/test/conformance.sh
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
|
||||
PLATFORM=""
|
||||
export TALOS_PLATFORM="docker"
|
||||
|
||||
source ./hack/test/e2e-runner.sh
|
||||
|
||||
@ -24,10 +24,6 @@ cat ${PWD}/hack/test/manifests/capg-components.yaml| envsubst > ${TMP}/capg-comp
|
||||
##They've got an incorrect image pull policy.
|
||||
##curl -L ${CAPG_COMPONENTS} | envsubst > ${TMP}/capg-components.yaml
|
||||
|
||||
## Clean up osctl endpoint, fetch kubeconfig
|
||||
e2e_run "osctl config endpoint 10.5.0.2"
|
||||
e2e_run "osctl kubeconfig ${TMP}"
|
||||
|
||||
## Drop in capi stuff
|
||||
e2e_run "kubectl apply -f ${TMP}/provider-components.yaml"
|
||||
e2e_run "kubectl apply -f ${CAPI_COMPONENTS}"
|
||||
@ -36,7 +32,7 @@ e2e_run "kubectl apply -f ${TMP}/capg-components.yaml"
|
||||
|
||||
## Wait for talosconfig in cm then dump it out
|
||||
e2e_run "timeout=\$((\$(date +%s) + ${TIMEOUT}))
|
||||
until KUBECONFIG=${TMP}/kubeconfig kubectl wait --timeout=1s --for=condition=Ready -n ${CABPT_NS} pods --all; do
|
||||
until KUBECONFIG=${KUBECONFIG} kubectl wait --timeout=1s --for=condition=Ready -n ${CABPT_NS} pods --all; do
|
||||
[[ \$(date +%s) -gt \$timeout ]] && exit 1
|
||||
echo 'Waiting to CABPT pod to be available...'
|
||||
sleep 10
|
||||
|
@ -5,13 +5,13 @@ source ./hack/test/e2e-runner.sh
|
||||
|
||||
# ## Run CIS conformance
|
||||
# echo "Master CIS Conformance:"
|
||||
# e2e_run "export KUBECONFIG=${KUBECONFIG}-${PLATFORM}-capi
|
||||
# e2e_run "export KUBECONFIG=${KUBECONFIG}-${TALOS_PLATFORM}-capi
|
||||
# kubectl apply -f /e2emanifests/cis-kube-bench-master.yaml
|
||||
# kubectl wait --timeout=300s --for=condition=complete job/kube-bench-master > /dev/null
|
||||
# kubectl logs job/kube-bench-master"
|
||||
|
||||
# echo "Worker CIS Conformance:"
|
||||
# e2e_run "export KUBECONFIG=${KUBECONFIG}-${PLATFORM}-capi
|
||||
# e2e_run "export KUBECONFIG=${KUBECONFIG}-${TALOS_PLATFORM}-capi
|
||||
# kubectl apply -f /e2emanifests/cis-kube-bench-node.yaml
|
||||
# kubectl wait --timeout=300s --for=condition=complete job/kube-bench-node > /dev/null
|
||||
# kubectl logs job/kube-bench-node"
|
||||
@ -25,7 +25,7 @@ e2e_run "set -eou pipefail
|
||||
--wait \
|
||||
--skip-preflight \
|
||||
--plugin e2e \
|
||||
--mode certified-conformance
|
||||
--mode ${SONOBUOY_MODE}
|
||||
results=\$(sonobuoy retrieve --kubeconfig ${KUBECONFIG})
|
||||
sonobuoy e2e --kubeconfig ${KUBECONFIG} \$results
|
||||
sonobuoy status --kubeconfig ${KUBECONFIG} --json | tee /tmp/status.json
|
||||
|
@ -6,24 +6,24 @@ source ./hack/test/e2e-runner.sh
|
||||
## Create tmp dir
|
||||
mkdir -p ${TMPPLATFORM}
|
||||
|
||||
NAME_PREFIX="talos-e2e-${SHA}-${PLATFORM}"
|
||||
NAME_PREFIX="talos-e2e-${SHA}-${TALOS_PLATFORM}"
|
||||
|
||||
## Cleanup the platform resources upon any exit
|
||||
cleanup() {
|
||||
e2e_run "KUBECONFIG=${TMP}/kubeconfig kubectl delete cluster ${NAME_PREFIX}"
|
||||
e2e_run "KUBECONFIG=${TMP}/docker/kubeconfig kubectl delete cluster ${NAME_PREFIX}"
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
## Download kustomize and template out capi cluster, then deploy it
|
||||
e2e_run "KUBECONFIG=${TMP}/kubeconfig kubectl apply -f ${TMPPLATFORM}/cluster.yaml"
|
||||
e2e_run "KUBECONFIG=${TMP}/docker/kubeconfig kubectl apply -f ${TMPPLATFORM}/cluster.yaml"
|
||||
|
||||
## Wait for talosconfig in cm then dump it out
|
||||
e2e_run "timeout=\$((\$(date +%s) + ${TIMEOUT}))
|
||||
until [ -n \"\${STATUS_TALOSCONFIG}\" ]; do
|
||||
[[ \$(date +%s) -gt \$timeout ]] && exit 1
|
||||
sleep 10
|
||||
STATUS_TALOSCONFIG=\$( KUBECONFIG=${TMP}/kubeconfig kubectl get talosconfig ${NAME_PREFIX}-controlplane-0 -o jsonpath='{.status.talosConfig}' )
|
||||
STATUS_TALOSCONFIG=\$( KUBECONFIG=${TMP}/docker/kubeconfig kubectl get talosconfig ${NAME_PREFIX}-controlplane-0 -o jsonpath='{.status.talosConfig}' )
|
||||
done
|
||||
echo \"\${STATUS_TALOSCONFIG}\" > ${TALOSCONFIG}"
|
||||
|
||||
@ -32,7 +32,7 @@ e2e_run "timeout=\$((\$(date +%s) + ${TIMEOUT}))
|
||||
until [ -n \"\${MASTER_0_IP}\" ]; do
|
||||
[[ \$(date +%s) -gt \$timeout ]] && exit 1
|
||||
sleep 10
|
||||
MASTER_0_IP=\$( KUBECONFIG=${TMP}/kubeconfig kubectl get machine -o go-template --template='{{range .status.addresses}}{{if eq .type \"ExternalIP\"}}{{.address}}{{end}}{{end}}' ${NAME_PREFIX}-controlplane-0 )
|
||||
MASTER_0_IP=\$( KUBECONFIG=${TMP}/docker/kubeconfig kubectl get machine -o go-template --template='{{range .status.addresses}}{{if eq .type \"ExternalIP\"}}{{.address}}{{end}}{{end}}' ${NAME_PREFIX}-controlplane-0 )
|
||||
done
|
||||
echo \${MASTER_0_IP} > ${TMP}/master0ip"
|
||||
|
||||
@ -78,8 +78,6 @@ e2e_run "kubectl get nodes -o wide"
|
||||
## Run integration tests
|
||||
e2e_run "integration-test -test.v"
|
||||
|
||||
## Run conformance tests if var is not null
|
||||
if [ ${CONFORMANCE:-"dontrun"} == "run" ]; then
|
||||
echo "Beginning conformance tests..."
|
||||
./hack/test/conformance.sh
|
||||
fi
|
||||
## Run conformance tests
|
||||
echo "Beginning conformance tests..."
|
||||
./hack/test/conformance.sh
|
||||
|
@ -2,7 +2,7 @@
|
||||
export KUBERNETES_VERSION=v1.17.0
|
||||
export TALOS_IMG="docker.io/autonomy/talos:${TAG}"
|
||||
export TMP="/tmp/e2e"
|
||||
export TMPPLATFORM="${TMP}/${PLATFORM}"
|
||||
export TMPPLATFORM="${TMP}/${TALOS_PLATFORM}"
|
||||
export OSCTL="${PWD}/${ARTIFACTS}/osctl-linux-amd64"
|
||||
export INTEGRATION_TEST="${PWD}/${ARTIFACTS}/integration-test-linux-amd64"
|
||||
export TALOSCONFIG="${TMPPLATFORM}/talosconfig"
|
||||
@ -28,8 +28,9 @@ export CAPG_COMPONENTS="https://github.com/kubernetes-sigs/cluster-api-provider-
|
||||
|
||||
export KUSTOMIZE_VERSION="3.1.0"
|
||||
export KUSTOMIZE_URL="https://github.com/kubernetes-sigs/kustomize/releases/download/v${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_amd64"
|
||||
export SONOBUOY_VERSION="0.16.5"
|
||||
export SONOBUOY_VERSION="0.17.1"
|
||||
export SONOBUOY_URL="https://github.com/heptio/sonobuoy/releases/download/v${SONOBUOY_VERSION}/sonobuoy_${SONOBUOY_VERSION}_linux_amd64.tar.gz"
|
||||
export SONOBUOY_MODE=${SONOBUOY_MODE:-quick}
|
||||
export CABPT_NS="cabpt-system"
|
||||
|
||||
e2e_run() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user