From 7567f009fea324429c25c4c25b73b8f497b0f5c6 Mon Sep 17 00:00:00 2001 From: John Schnake Date: Tue, 1 Oct 2019 12:45:21 -0500 Subject: [PATCH] Update our registry to dockerhub and use our latest kind-node New Dockerhub org for sonobuoy so we will start moving our image publishing there. As of now we do not have our main images published there (another PR will do that) but I've manually built/pushed kind-node:v1.16.0 and so we can use it in our CI. - updates makefile to make/build based on the sonobuoy repo - updates the default repo to grab the sonobuoy image from - updates our test to use the custom kind image - updates our makefile to build the custom kind image Fixes #913 Signed-off-by: John Schnake --- .travis.yml | 2 +- Makefile | 25 ++++++++++++++++++- cmd/sonobuoy/app/gen_test.go | 14 +++++------ kind-config.yaml | 4 +-- .../default-plugins-via-nil-selection.golden | 4 +-- pkg/client/testdata/default.golden | 4 +-- pkg/client/testdata/e2e-default.golden | 4 +-- .../testdata/no-plugins-via-selection.golden | 4 +-- .../plugins-and-pluginSelection.golden | 4 +-- .../testdata/systemd-logs-default.golden | 4 +-- pkg/config/config.go | 4 +-- site/docs/master/release.md | 8 ++++++ 12 files changed, 56 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index 18e16e6ab..624a8f1a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ script: - ./scripts/run_integration_tests.sh - ./travis-ci.sh before_install: -- curl -L https://github.com/kubernetes-sigs/kind/releases/download/v0.4.0/kind-linux-amd64 +- curl -L https://github.com/kubernetes-sigs/kind/releases/download/v0.5.1/kind-linux-amd64 --output $HOME/bin/kind && chmod +x $HOME/bin/kind - kind create cluster --config kind-config.yaml - export KUBECONFIG="$(kind get kubeconfig-path --name="kind")" diff --git a/Makefile b/Makefile index 872ba1a97..54405d5a4 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ BINARY = sonobuoy TARGET = sonobuoy GOTARGET = github.com/vmware-tanzu/$(TARGET) GOPATH = $(shell go env GOPATH) -REGISTRY ?= gcr.io/heptio-images +REGISTRY ?= sonobuoy IMAGE = $(REGISTRY)/$(TARGET) DIR := ${CURDIR} DOCKER ?= docker @@ -73,6 +73,10 @@ DOCKER_FLAGS = DOCKER_BUILD ?= $(DOCKER) run --rm -v $(DIR):$(BUILDMNT) $(DOCKER_FLAGS) -w $(BUILDMNT) $(BUILD_IMAGE) /bin/sh -c GO_BUILD ?= CGO_ENABLED=0 $(GO_SYSTEM_FLAGS) go build -o $(BINARY) $(VERBOSE_FLAG) -ldflags="-s -w -X $(GOTARGET)/pkg/buildinfo.Version=$(GIT_VERSION) -X $(GOTARGET)/pkg/buildinfo.GitSHA=$(GIT_REF_LONG)" $(GOTARGET) +# Kind images +K8S_PATH ?= $(GOPATH)/src/github.com/kubernetes/kubernetes +KIND_K8S_TAG ?= $(shell cd $(K8S_PATH) && git describe) + .PHONY: all container push clean test local-test local generate plugins int all: container @@ -188,5 +192,24 @@ clean: deploy_kind: container kind load docker-image --name $(KIND_CLUSTER) $(REGISTRY)/$(TARGET):$(IMAGE_VERSION) || true +# kind_images will build the kind-node image. Generally building the base image is not necessary +# and we can use the upstream kindest/base image. +kind_images: check-kind-env + kind build node-image --kube-root=$(K8S_PATH) --image $(REGISTRY)/kind-node:$(KIND_K8S_TAG) + +# push_kind_images will push the same image kind_images just built our registry. +push_kind_images: + docker push $(REGISTRY)/kind-node:$(KIND_K8S_TAG) + +# check-kind-env will show you what will be built/tagged before doing so with kind_images +check-kind-env: +ifndef K8S_PATH + $(error K8S_PATH is undefined) +endif +ifndef KIND_K8S_TAG + $(error KIND_K8S_TAG is undefined) +endif + echo --kube-root=$(K8S_PATH) tagging as --image $(REGISTRY)/kind-node:$(KIND_K8S_TAG) + native: $(GO_BUILD) diff --git a/cmd/sonobuoy/app/gen_test.go b/cmd/sonobuoy/app/gen_test.go index 7aa12eec4..385ca6363 100644 --- a/cmd/sonobuoy/app/gen_test.go +++ b/cmd/sonobuoy/app/gen_test.go @@ -117,7 +117,7 @@ func TestResolveConfig(t *testing.T) { input: "", expected: &config.Config{ Namespace: "sonobuoy", - WorkerImage: "gcr.io/heptio-images/sonobuoy:" + buildinfo.Version, + WorkerImage: "sonobuoy/sonobuoy:" + buildinfo.Version, ImagePullPolicy: "IfNotPresent", // default PluginSelections: []plugin.Selection{ {Name: "e2e"}, @@ -136,7 +136,7 @@ func TestResolveConfig(t *testing.T) { configFileContents: `{"Server":{"bindaddress":"10.0.0.1"}}`, expected: &config.Config{ Namespace: "sonobuoy", - WorkerImage: "gcr.io/heptio-images/sonobuoy:" + buildinfo.Version, + WorkerImage: "sonobuoy/sonobuoy:" + buildinfo.Version, ImagePullPolicy: "IfNotPresent", // default PluginSelections: []plugin.Selection{ {Name: "e2e"}, @@ -158,7 +158,7 @@ func TestResolveConfig(t *testing.T) { configFileContents: `{"Plugins":[{"name":"systemd-logs"}]}`, expected: &config.Config{ Namespace: "sonobuoy", - WorkerImage: "gcr.io/heptio-images/sonobuoy:" + buildinfo.Version, + WorkerImage: "sonobuoy/sonobuoy:" + buildinfo.Version, ImagePullPolicy: "IfNotPresent", // default PluginSelections: []plugin.Selection{ {Name: "systemd-logs"}, @@ -236,7 +236,7 @@ func TestResolveConfig(t *testing.T) { input: "--plugin e2e", expected: &config.Config{ Namespace: "sonobuoy", - WorkerImage: "gcr.io/heptio-images/sonobuoy:" + buildinfo.Version, + WorkerImage: "sonobuoy/sonobuoy:" + buildinfo.Version, ImagePullPolicy: "IfNotPresent", PluginSelections: nil, PluginSearchPath: defaultPluginSearchPath, @@ -251,7 +251,7 @@ func TestResolveConfig(t *testing.T) { input: "--config testdata/emptyQueryAndPlugins.conf", expected: &config.Config{ Namespace: "sonobuoy", - WorkerImage: "gcr.io/heptio-images/sonobuoy:" + buildinfo.Version, + WorkerImage: "sonobuoy/sonobuoy:" + buildinfo.Version, ImagePullPolicy: "IfNotPresent", PluginSearchPath: defaultPluginSearchPath, Aggregation: defaultAggr, @@ -264,7 +264,7 @@ func TestResolveConfig(t *testing.T) { input: "--plugin testdata/testPluginDir", expected: &config.Config{ Namespace: "sonobuoy", - WorkerImage: "gcr.io/heptio-images/sonobuoy:" + buildinfo.Version, + WorkerImage: "sonobuoy/sonobuoy:" + buildinfo.Version, ImagePullPolicy: "IfNotPresent", PluginSelections: nil, PluginSearchPath: defaultPluginSearchPath, @@ -282,7 +282,7 @@ func TestResolveConfig(t *testing.T) { input: "--plugin e2e --plugin testdata/testPluginDir --plugin testdata/testPluginDir/pluginNotYAML.ext", expected: &config.Config{ Namespace: "sonobuoy", - WorkerImage: "gcr.io/heptio-images/sonobuoy:" + buildinfo.Version, + WorkerImage: "sonobuoy/sonobuoy:" + buildinfo.Version, ImagePullPolicy: "IfNotPresent", PluginSelections: nil, PluginSearchPath: defaultPluginSearchPath, diff --git a/kind-config.yaml b/kind-config.yaml index 3ea87b6ee..dc1c25d72 100644 --- a/kind-config.yaml +++ b/kind-config.yaml @@ -2,7 +2,7 @@ kind: Cluster apiVersion: kind.sigs.k8s.io/v1alpha3 nodes: - role: control-plane - image: kindest/node:v1.15.0 + image: sonobuoy/kind-node:v1.16.0 - role: worker replicas: 2 - image: kindest/node:v1.15.0 + image: sonobuoy/kind-node:v1.16.0 diff --git a/pkg/client/testdata/default-plugins-via-nil-selection.golden b/pkg/client/testdata/default-plugins-via-nil-selection.golden index 73e2ea7e6..4636f3936 100644 --- a/pkg/client/testdata/default-plugins-via-nil-selection.golden +++ b/pkg/client/testdata/default-plugins-via-nil-selection.golden @@ -16,7 +16,7 @@ metadata: apiVersion: v1 data: config.json: | - {"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":null,"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"gcr.io/heptio-images/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","ProgressUpdatesPort":"8099"} + {"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":null,"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"sonobuoy/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","ProgressUpdatesPort":"8099"} kind: ConfigMap metadata: labels: @@ -101,7 +101,7 @@ spec: valueFrom: fieldRef: fieldPath: status.podIP - image: gcr.io/heptio-images/sonobuoy:static-version-for-testing + image: sonobuoy/sonobuoy:static-version-for-testing imagePullPolicy: IfNotPresent name: kube-sonobuoy volumeMounts: diff --git a/pkg/client/testdata/default.golden b/pkg/client/testdata/default.golden index 73e2ea7e6..4636f3936 100644 --- a/pkg/client/testdata/default.golden +++ b/pkg/client/testdata/default.golden @@ -16,7 +16,7 @@ metadata: apiVersion: v1 data: config.json: | - {"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":null,"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"gcr.io/heptio-images/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","ProgressUpdatesPort":"8099"} + {"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":null,"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"sonobuoy/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","ProgressUpdatesPort":"8099"} kind: ConfigMap metadata: labels: @@ -101,7 +101,7 @@ spec: valueFrom: fieldRef: fieldPath: status.podIP - image: gcr.io/heptio-images/sonobuoy:static-version-for-testing + image: sonobuoy/sonobuoy:static-version-for-testing imagePullPolicy: IfNotPresent name: kube-sonobuoy volumeMounts: diff --git a/pkg/client/testdata/e2e-default.golden b/pkg/client/testdata/e2e-default.golden index 8176eeedf..7c691e0f3 100644 --- a/pkg/client/testdata/e2e-default.golden +++ b/pkg/client/testdata/e2e-default.golden @@ -16,7 +16,7 @@ metadata: apiVersion: v1 data: config.json: | - {"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":[{"name":"e2e"}],"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"gcr.io/heptio-images/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","ProgressUpdatesPort":"8099"} + {"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":[{"name":"e2e"}],"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"sonobuoy/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","ProgressUpdatesPort":"8099"} kind: ConfigMap metadata: labels: @@ -72,7 +72,7 @@ spec: valueFrom: fieldRef: fieldPath: status.podIP - image: gcr.io/heptio-images/sonobuoy:static-version-for-testing + image: sonobuoy/sonobuoy:static-version-for-testing imagePullPolicy: IfNotPresent name: kube-sonobuoy volumeMounts: diff --git a/pkg/client/testdata/no-plugins-via-selection.golden b/pkg/client/testdata/no-plugins-via-selection.golden index c416c0eaf..d289c59d9 100644 --- a/pkg/client/testdata/no-plugins-via-selection.golden +++ b/pkg/client/testdata/no-plugins-via-selection.golden @@ -16,7 +16,7 @@ metadata: apiVersion: v1 data: config.json: | - {"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":[],"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"gcr.io/heptio-images/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","ProgressUpdatesPort":"8099"} + {"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":[],"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"sonobuoy/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","ProgressUpdatesPort":"8099"} kind: ConfigMap metadata: labels: @@ -52,7 +52,7 @@ spec: valueFrom: fieldRef: fieldPath: status.podIP - image: gcr.io/heptio-images/sonobuoy:static-version-for-testing + image: sonobuoy/sonobuoy:static-version-for-testing imagePullPolicy: IfNotPresent name: kube-sonobuoy volumeMounts: diff --git a/pkg/client/testdata/plugins-and-pluginSelection.golden b/pkg/client/testdata/plugins-and-pluginSelection.golden index 822046bb5..568a9399d 100644 --- a/pkg/client/testdata/plugins-and-pluginSelection.golden +++ b/pkg/client/testdata/plugins-and-pluginSelection.golden @@ -16,7 +16,7 @@ metadata: apiVersion: v1 data: config.json: | - {"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":[{"name":"a"}],"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"gcr.io/heptio-images/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","ProgressUpdatesPort":"8099"} + {"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":[{"name":"a"}],"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"sonobuoy/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","ProgressUpdatesPort":"8099"} kind: ConfigMap metadata: labels: @@ -67,7 +67,7 @@ spec: valueFrom: fieldRef: fieldPath: status.podIP - image: gcr.io/heptio-images/sonobuoy:static-version-for-testing + image: sonobuoy/sonobuoy:static-version-for-testing imagePullPolicy: IfNotPresent name: kube-sonobuoy volumeMounts: diff --git a/pkg/client/testdata/systemd-logs-default.golden b/pkg/client/testdata/systemd-logs-default.golden index 8f3bbb0f3..9c342054a 100644 --- a/pkg/client/testdata/systemd-logs-default.golden +++ b/pkg/client/testdata/systemd-logs-default.golden @@ -16,7 +16,7 @@ metadata: apiVersion: v1 data: config.json: | - {"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":[{"name":"systemd-logs"}],"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"gcr.io/heptio-images/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","ProgressUpdatesPort":"8099"} + {"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy","Resources":["apiservices","certificatesigningrequests","clusterrolebindings","clusterroles","componentstatuses","configmaps","controllerrevisions","cronjobs","customresourcedefinitions","daemonsets","deployments","endpoints","ingresses","jobs","leases","limitranges","mutatingwebhookconfigurations","namespaces","networkpolicies","nodes","persistentvolumeclaims","persistentvolumes","poddisruptionbudgets","pods","podlogs","podsecuritypolicies","podtemplates","priorityclasses","replicasets","replicationcontrollers","resourcequotas","rolebindings","roles","servergroups","serverversion","serviceaccounts","services","statefulsets","storageclasses","validatingwebhookconfigurations","volumeattachments"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null,"LimitSize":"","LimitTime":""}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":[{"name":"systemd-logs"}],"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"sonobuoy/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","ProgressUpdatesPort":"8099"} kind: ConfigMap metadata: labels: @@ -82,7 +82,7 @@ spec: valueFrom: fieldRef: fieldPath: status.podIP - image: gcr.io/heptio-images/sonobuoy:static-version-for-testing + image: sonobuoy/sonobuoy:static-version-for-testing imagePullPolicy: IfNotPresent name: kube-sonobuoy volumeMounts: diff --git a/pkg/config/config.go b/pkg/config/config.go index f7f3f2da0..9dc489f82 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -21,9 +21,9 @@ import ( "time" "github.com/c2h5oh/datasize" + uuid "github.com/satori/go.uuid" "github.com/vmware-tanzu/sonobuoy/pkg/buildinfo" "github.com/vmware-tanzu/sonobuoy/pkg/plugin" - uuid "github.com/satori/go.uuid" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -64,7 +64,7 @@ var ( // DefaultKubeConformanceImage is the URL and tag of the docker image to run for the kube conformance tests. DefaultKubeConformanceImage = DefaultKubeConformanceImageURL + ":" + DefaultKubeConformanceImageTag // DefaultImage is the URL of the docker image to run for the aggregator and workers - DefaultImage = "gcr.io/heptio-images/sonobuoy:" + buildinfo.Version + DefaultImage = "sonobuoy/sonobuoy:" + buildinfo.Version // DefaultResources is the default set of resources which are queried for after plugins run. The strings // are compared against the resource.Name given by the client-go discovery client. The non-standard values // that are included here are: podlogs, servergroups, serverversion. The value 'nodes', although a crawlable diff --git a/site/docs/master/release.md b/site/docs/master/release.md index c03e78a31..a1a469b10 100644 --- a/site/docs/master/release.md +++ b/site/docs/master/release.md @@ -5,6 +5,14 @@ 1. Update the version defined in the code to the new version number. As of the time of writing, the version is defined in `pkg/buildinfo/version.go`. 1. Generate a new set of [versioned docs][gendocs] for this release. +1. If there an a Kubernetes release coming soon, do the following to ensure the upstream conformance script is +working appropriately: + * Build the kind images for this new version. + * Checkout K8s locally at the tag in question + * Run `make check-kind-env` to ensure the repo/tag are correct + * Run `make kind_images` + * Run `make push_kind_images` + * Update our CI build our kind cluster with the new image. 1. If the new release corresponds to a new Kubernetes release, the following steps must be performed: * Add the new list of E2E test images. For an example of the outcome of this process, see the [change corresponding to the Kubernetes v1.14 release](https://github.com/vmware-tanzu/sonobuoy/commit/68f15a260e60a288f91bc40347c817b382a3d45c).