Skip to content

Commit

Permalink
Updating e2e testing for kube 1.17 and kind v0.7.0. Fixing support fo…
Browse files Browse the repository at this point in the history
…r kube 1.16+. Deprecating extensions api.
  • Loading branch information
Andrew Suderman committed Jan 23, 2020
1 parent faaec42 commit 0a5af95
Show file tree
Hide file tree
Showing 12 changed files with 127 additions and 68 deletions.
70 changes: 30 additions & 40 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
rok8s-scripts: fairwinds/rok8s-scripts@10
rok8s-scripts: fairwinds/rok8s-scripts@11

references:
install_goreleaser: &install_goreleaser
Expand All @@ -11,6 +11,19 @@ references:
curl -fsSLo goreleaser.deb https://github.com/goreleaser/goreleaser/releases/download/v0.106.0/goreleaser_amd64.deb
echo "c63e8dad590700f2f51e5508ec75c9f18d09ce570cbc05ebea4fb60cfad2bcc3 goreleaser.deb" | sha256sum -c
sudo dpkg -i goreleaser.deb
kind_configuration: &kind_configuration
pre_script: e2e/pre.sh
script: e2e/test.sh
kind_version: 0.7.0
command_runner_image: quay.io/reactiveops/ci-images:dev-80d3082a4d6d1fef922e67903fa44aa5a69a236f-alpine
requires:
- test
- rok8s-scripts/docker_build_and_push
filters:
branches:
only: /.*/
tags:
ignore: /v.*/

jobs:
test:
Expand Down Expand Up @@ -62,45 +75,22 @@ workflows:
only: /.*/
tags:
only: /v.*/
- rok8s-scripts/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.14.9"
kind_node_image: "kindest/node:v1.14.9@sha256:bdd3731588fa3ce8f66c7c22f25351362428964b6bca13048659f68b9e665b72"
pre_script: e2e/pre.sh
script: e2e/test.sh
requires:
- test
- rok8s-scripts/docker_build_and_push
filters:
branches:
only: /.*/
tags:
ignore: /v.*/
- rok8s-scripts/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.15.6"
kind_node_image: "kindest/node:v1.15.6@sha256:18c4ab6b61c991c249d29df778e651f443ac4bcd4e6bdd37e0c83c0d33eaae78"
pre_script: e2e/pre.sh
script: e2e/test.sh
requires:
- test
- rok8s-scripts/docker_build_and_push
filters:
branches:
only: /.*/
tags:
ignore: /v.*/
# - rok8s-scripts/kubernetes_e2e_tests:
# name: "End-To-End Kubernetes 1.16.3"
# kind_node_image: "kindest/node:v1.16.3@sha256:70ce6ce09bee5c34ab14aec2b84d6edb260473a60638b1b095470a3a0f95ebec"
# pre_script: e2e/pre.sh
# script: e2e/test.sh
# requires:
# - test
# - rok8s-scripts/docker_build_and_push
# filters:
# branches:
# only: /.*/
# tags:
# ignore: /v.*/
- rok8s-new/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.14.10"
kind_node_image: "kindest/node:v1.14.10@sha256:81ae5a3237c779efc4dda43cc81c696f88a194abcc4f8fa34f86cf674aa14977"
<<: *kind_configuration
- rok8s-new/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.15.7"
kind_node_image: "kindest/node:v1.15.7@sha256:e2df133f80ef633c53c0200114fce2ed5e1f6947477dbc83261a6a921169488d"
<<: *kind_configuration
- rok8s-new/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.16.4"
kind_node_image: "kindest/node:v1.16.4@sha256:b91a2c2317a000f3a783489dfb755064177dbc3a0b2f4147d50f04825d016f55"
<<: *kind_configuration
- rok8s-new/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.17.0"
kind_node_image: "kindest/node:v1.17.0@sha256:9512edae126da271b66b990b6fff768fbb7cd786c7d39e86bdf55906352fdf62"
<<: *kind_configuration
- release:
requires:
- test
Expand Down
13 changes: 11 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,22 @@ repos:
- id: pretty-format-json
args: ['--autofix']
- repo: https://github.com/jumanjihouse/pre-commit-hooks
sha: 1.11.0
rev: 1.11.0
hooks:
- id: forbid-binary
exclude: >
(?x)^(
.+\.png|
.+\.woff|
.+\.woff2|
.+\.tff|
.+\.ico
)$
- id: shellcheck
- id: git-check
- repo: https://github.com/dnephin/pre-commit-golang.git
sha: v0.3.4
rev: v0.3.4
hooks:
- id: go-fmt
- id: go-vet
Expand Down
21 changes: 14 additions & 7 deletions e2e/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

vertical_pod_autoscaler_tag=vertical-pod-autoscaler-0.5.1
vertical_pod_autoscaler_ref=e16a0adef6c7d79a23d57f9bbbef26fc9da59378
timeout=60s
reinstall_wait=30s

Expand Down Expand Up @@ -28,7 +28,10 @@ echo "** Install Metrics-Server **"
echo "****************************"
printf "\n\n"

helm install stable/metrics-server --version=2.8.2 --set args[0]=--kubelet-insecure-tls --set args[1]=--kubelet-preferred-address-types=InternalIP --namespace metrics-server --name metrics-server
helm repo add stable https://kubernetes-charts.storage.googleapis.com
helm repo update
kubectl create namespace metrics-server
helm install metrics-server stable/metrics-server --version=2.9.0 --set args[0]=--kubelet-insecure-tls --set args[1]=--kubelet-preferred-address-types=InternalIP --namespace metrics-server

printf "\n\n"
echo "****************************"
Expand All @@ -41,7 +44,7 @@ if [ ! -d "autoscaler" ] ; then
fi

cd autoscaler/vertical-pod-autoscaler
git checkout "$vertical_pod_autoscaler_tag"
git checkout "$vertical_pod_autoscaler_ref"
./hack/vpa-up.sh

cd ../../
Expand Down Expand Up @@ -77,10 +80,14 @@ echo "**********************"
printf "\n\n"

helm repo add fairwinds-incubator https://charts.fairwinds.com/incubator
helm install fairwinds-incubator/basic-demo --namespace demo -n basic-demo --version=0.2.1
helm install fairwinds-incubator/basic-demo --namespace demo-no-label -n basic-demo-no-label --version=0.2.1
helm install fairwinds-incubator/basic-demo --namespace demo-included -n basic-demo-included --version=0.2.1
helm install fairwinds-incubator/basic-demo --namespace demo-excluded -n basic-demo-excluded --version=0.2.1
kubectl create ns demo
kubectl create ns demo-no-label
kubectl create ns demo-included
kubectl create ns demo-excluded
helm install basic-demo fairwinds-incubator/basic-demo --namespace demo --version=0.2.3
helm install basic-demo-no-label fairwinds-incubator/basic-demo --namespace demo-no-label --version=0.2.3
helm install basic-demo-included fairwinds-incubator/basic-demo --namespace demo-included --version=0.2.3
helm install basic-demo-excluded fairwinds-incubator/basic-demo --namespace demo-excluded --version=0.2.3

kubectl -n demo wait deployment --timeout=$timeout --for condition=available -l app.kubernetes.io/name=basic-demo
kubectl -n demo-no-label wait deployment --timeout=$timeout --for condition=available -l app.kubernetes.io/name=basic-demo
Expand Down
22 changes: 12 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,33 @@ module github.com/fairwindsops/goldilocks
go 1.12

require (
cloud.google.com/go v0.49.0 // indirect
cloud.google.com/go v0.51.0 // indirect
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 // indirect
github.com/gobuffalo/envy v1.8.1 // indirect
github.com/gobuffalo/logger v1.0.3 // indirect
github.com/gobuffalo/packr/v2 v2.7.1
github.com/gogo/protobuf v1.3.1 // indirect
github.com/google/go-cmp v0.3.1 // indirect
github.com/google/go-cmp v0.4.0 // indirect
github.com/gorilla/mux v1.7.3
github.com/hashicorp/golang-lru v0.5.3 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/imdario/mergo v0.3.8 // indirect
github.com/rogpeppe/go-internal v1.5.0 // indirect
github.com/json-iterator/go v1.1.9 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rogpeppe/go-internal v1.5.2 // indirect
github.com/satori/go.uuid v1.2.0
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.4.0
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 // indirect
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 // indirect
golang.org/x/sys v0.0.0-20191210023423-ac6580df4449 // indirect
google.golang.org/appengine v1.6.5 // indirect
golang.org/x/crypto v0.0.0-20200117160349-530e935923ad // indirect
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sys v0.0.0-20200121082415-34d275377bf9 // indirect
gopkg.in/yaml.v2 v2.2.7 // indirect
k8s.io/api v0.17.2
k8s.io/apimachinery v0.17.2
k8s.io/autoscaler/vertical-pod-autoscaler v0.0.0-20191211165407-195d3d988f4f
k8s.io/client-go v0.0.0-20191109102209-3c0d1af94be5
k8s.io/klog v1.0.0
k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6 // indirect
k8s.io/utils v0.0.0-20200117235808-5f6fbceb4c31 // indirect
sigs.k8s.io/controller-runtime v0.4.0
)

0 comments on commit 0a5af95

Please sign in to comment.