feat: update k8s and sonobuoy versions

This PR will update k8s to the latest 1.18 release and bump sonobuoy to
help resolve some e2e flakes. Also adds some retry logic around the
sonobuoy run.

Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
This commit is contained in:
Spencer Smith 2020-06-09 20:25:47 -04:00 committed by talos-bot
parent 11ad2a5ea8
commit e03a68f8eb
10 changed files with 23 additions and 18 deletions

View File

@ -13,10 +13,10 @@ OPERATING_SYSTEM := $(shell uname -s | tr "[:upper:]" "[:lower:]")
OSCTL_DEFAULT_TARGET := talosctl-$(OPERATING_SYSTEM)
INTEGRATION_TEST_DEFAULT_TARGET := integration-test-$(OPERATING_SYSTEM)
INTEGRATION_TEST_PROVISION_DEFAULT_TARGET := integration-test-provision-$(OPERATING_SYSTEM)
KUBECTL_URL ?= https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/$(OPERATING_SYSTEM)/amd64/kubectl
KUBECTL_URL ?= https://storage.googleapis.com/kubernetes-release/release/v1.18.3/bin/$(OPERATING_SYSTEM)/amd64/kubectl
CLUSTERCTL_VERSION ?= 0.3.5
CLUSTERCTL_URL ?= https://github.com/kubernetes-sigs/cluster-api/releases/download/v$(CLUSTERCTL_VERSION)/clusterctl-$(OPERATING_SYSTEM)-amd64
SONOBUOY_VERSION ?= 0.18.0
SONOBUOY_VERSION ?= 0.18.2
SONOBUOY_URL ?= https://github.com/heptio/sonobuoy/releases/download/v$(SONOBUOY_VERSION)/sonobuoy_$(SONOBUOY_VERSION)_$(OPERATING_SYSTEM)_amd64.tar.gz
TESTPKGS ?= ./...
RELEASES ?= v0.5.0 v0.6.0-alpha.1

View File

@ -28,7 +28,7 @@ talosctl cluster create [flags]
--initrd-path string the uncompressed kernel image to use (default "_out/initramfs.xz")
-i, --input-dir string location of pre-generated config files
--install-image string the installer image to use (default "docker.io/autonomy/installer:latest")
--kubernetes-version string desired kubernetes version to run (default "1.18.0")
--kubernetes-version string desired kubernetes version to run (default "1.18.3")
--masters int the number of masters to create (default 1)
--memory int the limit on memory usage in MB (each container) (default 1024)
--mtu int MTU of the docker bridge network (default 1500)

View File

@ -22,7 +22,7 @@ talosctl gen config <cluster name> <cluster endpoint> [flags]
-h, --help help for config
--install-disk string the disk to install to (default "/dev/sda")
--install-image string the image used to perform an installation (default "docker.io/autonomy/installer:latest")
--kubernetes-version string desired kubernetes version to run (default "1.18.0")
--kubernetes-version string desired kubernetes version to run (default "1.18.3")
-o, --output-dir string destination to output generated files
--registry-mirror strings list of registry mirrors to use in format: <registry host>=<mirror URL>
--version string the desired machine config version to generate (default "v1alpha1")

View File

@ -35,7 +35,7 @@ machine:
force: false
cluster:
controlPlane:
version: 1.18.0
version: 1.18.3
endpoint: https://1.2.3.4
clusterName: example
network:

View File

@ -59,7 +59,7 @@ spec:
kind: AWSMachine
name: talos-e2e-{{TAG}}-aws-controlplane-0
namespace: default
version: 1.18.0
version: 1.18.3
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AWSMachine
@ -112,7 +112,7 @@ spec:
kind: AWSMachine
name: talos-e2e-{{TAG}}-aws-controlplane-1
namespace: default
version: 1.18.0
version: 1.18.3
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AWSMachine
@ -165,7 +165,7 @@ spec:
kind: AWSMachine
name: talos-e2e-{{TAG}}-aws-controlplane-2
namespace: default
version: 1.18.0
version: 1.18.3
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AWSMachine
@ -232,7 +232,7 @@ spec:
kind: AWSMachineTemplate
name: talos-e2e-{{TAG}}-aws-workers
namespace: default
version: 1.18.0
version: 1.18.3
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: AWSMachineTemplate

View File

@ -58,7 +58,7 @@ spec:
kind: GCPMachine
name: talos-e2e-{{TAG}}-gcp-controlplane-0
namespace: default
version: 1.18.0
version: 1.18.3
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: GCPMachine
@ -105,7 +105,7 @@ spec:
kind: GCPMachine
name: talos-e2e-{{TAG}}-gcp-controlplane-1
namespace: default
version: 1.18.0
version: 1.18.3
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: GCPMachine
@ -152,7 +152,7 @@ spec:
kind: GCPMachine
name: talos-e2e-{{TAG}}-gcp-controlplane-2
namespace: default
version: 1.18.0
version: 1.18.3
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: GCPMachine
@ -212,7 +212,7 @@ spec:
kind: GCPMachineTemplate
name: talos-e2e-{{TAG}}-gcp-workers
namespace: default
version: 1.18.0
version: 1.18.3
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: GCPMachineTemplate

View File

@ -102,12 +102,17 @@ function run_talos_integration_test_docker {
}
function run_kubernetes_integration_test {
${SONOBUOY} run \
timeout=$(($(date +%s) + ${TIMEOUT}))
until ${SONOBUOY} run \
--kubeconfig ${KUBECONFIG} \
--wait \
--skip-preflight \
--plugin e2e \
--mode ${SONOBUOY_MODE}
--mode ${SONOBUOY_MODE}; do
[[ $(date +%s) -gt $timeout ]] && exit 1
echo "attempting to run sonobuoy"
sleep 10
done
${SONOBUOY} status --kubeconfig ${KUBECONFIG} --json | jq . | tee ${TMP}/sonobuoy-status.json
if [ $(cat ${TMP}/sonobuoy-status.json | jq -r '.plugins[] | select(.plugin == "e2e") | ."result-status"') != 'passed' ]; then exit 1; fi
}

View File

@ -81,7 +81,7 @@ function down {
}
function workspace {
docker run --rm -it -v $PWD:/workspace -v $PWD/../../../${ARTIFACTS}/talosctl-linux-amd64:/bin/talosctl:ro --network talos --dns 172.28.1.1 -w /workspace/matchbox/assets -e TALOSCONFIG='/workspace/matchbox/assets/talosconfig' -e KUBECONFIG='/workspace/matchbox/assets/kubeconfig' --entrypoint /bin/bash k8s.gcr.io/hyperkube:v1.18.0
docker run --rm -it -v $PWD:/workspace -v $PWD/../../../${ARTIFACTS}/talosctl-linux-amd64:/bin/talosctl:ro --network talos --dns 172.28.1.1 -w /workspace/matchbox/assets -e TALOSCONFIG='/workspace/matchbox/assets/talosconfig' -e KUBECONFIG='/workspace/matchbox/assets/kubeconfig' --entrypoint /bin/bash k8s.gcr.io/hyperkube:v1.18.3
}
main $@

View File

@ -34,7 +34,7 @@ machine:
force: false
cluster:
controlPlane:
version: 1.18.0
version: 1.18.3
endpoint: https://1.2.3.4
clusterName: example
network:

View File

@ -139,7 +139,7 @@ const (
KubeletBootstrapKubeconfig = "/etc/kubernetes/bootstrap-kubeconfig"
// DefaultKubernetesVersion is the default target version of the control plane.
DefaultKubernetesVersion = "1.18.0"
DefaultKubernetesVersion = "1.18.3"
// KubernetesImage is the enforced hyperkube image to use for the control plane.
KubernetesImage = "k8s.gcr.io/hyperkube"