Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/go118 dependency update #1811

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

lint:
docker:
- image: kudobuilder/golang:1.15
- image: kudobuilder/golang:1.18
working_directory: /go/src/github.com/kudobuilder/kudo
steps:
- checkout
Expand Down
16 changes: 8 additions & 8 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ builds:
- linux
- darwin
goarch:
- 386
- "386"
- amd64
- arm
- arm64
ignore:
- goos: darwin
goarch: 386
goarch: "386"
- id: "kubectl-kudo"
binary: kubectl-kudo
main: cmd/kubectl-kudo/main.go
Expand All @@ -35,25 +35,25 @@ builds:
- linux
- darwin
goarch:
- 386
- "386"
- amd64
- arm
- arm64
ignore:
- goos: darwin
goarch: 386
goarch: "386"
dockers:
# always push a docker image on release for the .Tag version
- dockerfile: Dockerfile.goreleaser
binaries:
ids:
- manager
goos: linux
goarch: amd64
image_templates:
- "kudobuilder/controller:{{ .Tag }}"
# only update the docker :latest for a full release (not RC)
- dockerfile: Dockerfile.goreleaser
binaries:
ids:
- manager
goos: linux
goarch: amd64
Expand All @@ -62,15 +62,15 @@ dockers:
skip_push: auto
# always push a docker image on release for the .Tag version
- dockerfile: Dockerfile.goreleaser
binaries:
ids:
- manager
goos: linux
goarch: arm64
image_templates:
- "kudobuilder/controller-arm64:{{ .Tag }}"
# only update the docker :latest for a full release (not RC)
- dockerfile: Dockerfile.goreleaser
binaries:
ids:
- manager
goos: linux
goarch: arm64
Expand Down
2 changes: 1 addition & 1 deletion Dispatchfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ task("lint", inputs=["git"], steps=[k8s.corev1.Container(

task("integration-test", inputs=["git"], steps=[k8s.corev1.Container(
name="integration-test",
image="kudobuilder/golang:1.15",
image="kudobuilder/golang:1.18",
command=[ "make", "integration-test" ],
env=[
k8s.corev1.EnvVar(name="INTEGRATION_OUTPUT_JUNIT", value="true"),
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.15 as builder
FROM golang:1.18 as builder

# Setting arguments
ARG ldflags_arg
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BUILD_DATE_PATH := github.com/kudobuilder/kudo/pkg/version.buildDate
DATE_FMT := "%Y-%m-%dT%H:%M:%SZ"
BUILD_DATE := $(shell date -u -d "@$SOURCE_DATE_EPOCH" "+${DATE_FMT}" 2>/dev/null || date -u -r "${SOURCE_DATE_EPOCH}" "+${DATE_FMT}" 2>/dev/null || date -u "+${DATE_FMT}")
LDFLAGS := -X ${GIT_VERSION_PATH}=${GIT_VERSION:v%=%} -X ${GIT_COMMIT_PATH}=${GIT_COMMIT} -X ${BUILD_DATE_PATH}=${BUILD_DATE}
GOLANGCI_LINT_VER = "v1.32.2"
GOLANGCI_LINT_VER = "v1.45.2"
SUPPORTED_PLATFORMS = amd64 arm64

export GO111MODULE=on
Expand Down Expand Up @@ -170,11 +170,11 @@ dev-ready: ## Installs KUDO manifests and updates webhook to work with ngrok
generate: ## (Re)Generates CRDs and go-bindata
ifneq ($(shell go list -f '{{.Version}}' -m sigs.k8s.io/controller-tools), $(shell controller-gen --version 2>/dev/null | cut -b 10-))
@echo "(Re-)installing controller-gen. Current version: $(controller-gen --version 2>/dev/null | cut -b 10-). Need $(go list -f '{{.Version}}' -m sigs.k8s.io/controller-tools)"
go get sigs.k8s.io/controller-tools/cmd/controller-gen@$$(go list -f '{{.Version}}' -m sigs.k8s.io/controller-tools)
go install sigs.k8s.io/controller-tools/cmd/controller-gen@$$(go list -f '{{.Version}}' -m sigs.k8s.io/controller-tools)
endif
controller-gen crd paths=./pkg/apis/... output:crd:dir=config/crds output:stdout
ifeq (, $(shell which go-bindata))
go get github.com/go-bindata/go-bindata/v3/go-bindata@$$(go list -f '{{.Version}}' -m github.com/go-bindata/go-bindata/v3)
go install github.com/go-bindata/go-bindata/v3/go-bindata@$$(go list -f '{{.Version}}' -m github.com/go-bindata/go-bindata/v3)
endif
go-bindata -pkg crd -o pkg/kudoctl/kudoinit/crd/bindata.go -ignore README.md -nometadata config/crds
./hack/update_codegen.sh
Expand Down
4 changes: 2 additions & 2 deletions build/test-images.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

docker build --build-arg GOLANG_VERSION=1.15 -t kudobuilder/golang:1.15 .
docker push kudobuilder/golang:1.15
docker build --build-arg GOLANG_VERSION=1.18 -t kudobuilder/golang:1.18 .
docker push kudobuilder/golang:1.18

docker build --build-arg GOLANG_VERSION=latest -t kudobuilder/golang:latest .
docker push kudobuilder/golang:latest
4 changes: 3 additions & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/discovery/cached/memory"
_ "k8s.io/client-go/plugin/pkg/client/auth/azure"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
Expand Down Expand Up @@ -163,7 +164,8 @@ func main() {
// Add more webhooks below using the above registerWebhook method

// Start the KUDO manager
log.Print("Done! Everything is setup, starting KUDO manager now")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a large enough change and specific to 1.18 it seems like a bad idea to inject unrelated updates.. even if small

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the ngrok one the controller runtime changed ports and it wasn't immediately obvious what the problem was. So I had added the port into the startup message to make it clearer where it was running.

I'm happy to back this change out though if you'd prefer.


log.Printf("Done! Everything is setup, starting KUDO manager now on port: %d", mgr.GetWebhookServer().Port)
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
log.Printf("Unable to run the manager: %v", err)
os.Exit(1)
Expand Down
2 changes: 1 addition & 1 deletion config/crds/kudo.dev_instances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.4.2-0.20210129215148-557da250b856
creationTimestamp: null
name: instances.kudo.dev
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crds/kudo.dev_operators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.4.2-0.20210129215148-557da250b856
creationTimestamp: null
name: operators.kudo.dev
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crds/kudo.dev_operatorversions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.4.2-0.20210129215148-557da250b856
creationTimestamp: null
name: operatorversions.kudo.dev
spec:
Expand Down
2 changes: 1 addition & 1 deletion development.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ These instructions assume you haven't already initialized the cluster with previ
Steps to run the KUDO manager outside the local cluster:

1. `make generate-manifests`
1. (separate term) `ngrok http 443`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this specific to your env? or is there a reason to updates the dev docs?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not specific to my environment (or at least I don't think so). It's been a few weeks but I'm pretty sure this change was induced because the controller runtime changed from defaulting to 443 to 9443.

1. (separate term) `ngrok http https://localhost:9443`
1. `make dev-ready`
1. `make run`

Expand Down
162 changes: 134 additions & 28 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,43 +1,149 @@
module github.com/kudobuilder/kudo

go 1.16
go 1.18

require (
github.com/Masterminds/goutils v1.1.0 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/semver/v3 v3.1.0
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/go-bindata/go-bindata/v3 v3.1.3
github.com/google/go-cmp v0.5.2
github.com/google/go-cmp v0.5.6
github.com/gosuri/uitable v0.0.4
github.com/huandu/xstrings v1.3.2 // indirect
github.com/kudobuilder/kuttl v0.8.1
github.com/kudobuilder/kuttl v0.12.1
github.com/manifoldco/promptui v0.8.0
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2 // indirect
github.com/onsi/ginkgo v1.14.1
github.com/onsi/gomega v1.10.2
github.com/spf13/afero v1.4.0
github.com/spf13/cobra v1.0.0
github.com/onsi/ginkgo/v2 v2.1.4
github.com/onsi/gomega v1.19.0
github.com/spf13/afero v1.6.0
github.com/spf13/cobra v1.4.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.6.1
github.com/stretchr/testify v1.7.0
github.com/thoas/go-funk v0.7.0
github.com/xlab/treeprint v1.0.0
github.com/yourbasic/graph v0.0.0-20170921192928-40eb135c0b26
golang.org/x/net v0.0.0-20200904194848-62affa334b73 // indirect
golang.org/x/sync v0.0.0-20200930132711-30421366ff76
golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.20.2
k8s.io/apiextensions-apiserver v0.20.2
k8s.io/apimachinery v0.20.2
k8s.io/cli-runtime v0.20.2
k8s.io/client-go v0.20.2
k8s.io/code-generator v0.20.2
k8s.io/component-base v0.20.2
k8s.io/kubectl v0.20.2
sigs.k8s.io/controller-runtime v0.8.2
sigs.k8s.io/controller-tools v0.4.2-0.20210129215148-557da250b856
sigs.k8s.io/yaml v1.3.0
)

require (
cloud.google.com/go v0.99.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.1 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.5 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.0 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/BurntSushi/toml v1.0.0 // indirect
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
github.com/Masterminds/goutils v1.1.0 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Microsoft/go-winio v0.4.14 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
github.com/containerd/containerd v1.4.8 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v20.10.14+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0 // indirect
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
github.com/evanphx/json-patch v4.9.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-logr/logr v0.3.0 // indirect
github.com/go-openapi/jsonpointer v0.19.3 // indirect
github.com/go-openapi/jsonreference v0.19.3 // indirect
github.com/go-openapi/spec v0.19.3 // indirect
github.com/go-openapi/swag v0.19.5 // indirect
github.com/gobuffalo/flect v0.2.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/googleapis/gnostic v0.5.1 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.10 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
github.com/kisielk/errcheck v1.5.0 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
github.com/mailru/easyjson v0.7.0 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.2 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/reflectwalk v1.0.0 // indirect
github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.7.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.10.0 // indirect
github.com/prometheus/procfs v0.2.0 // indirect
github.com/russross/blackfriday v1.5.2 // indirect
github.com/sirupsen/logrus v1.6.0 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
golang.org/x/tools v0.1.10 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/yaml.v2 v2.3.0
k8s.io/api v0.19.2
k8s.io/apiextensions-apiserver v0.19.2
k8s.io/apimachinery v0.19.2
k8s.io/cli-runtime v0.19.2
k8s.io/client-go v0.19.2
k8s.io/code-generator v0.19.2
k8s.io/component-base v0.19.2
k8s.io/kubectl v0.19.2
sigs.k8s.io/controller-runtime v0.6.3
sigs.k8s.io/controller-tools v0.4.1
sigs.k8s.io/yaml v1.2.0
gomodules.xyz/jsonpatch/v2 v2.1.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/grpc v1.42.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/gengo v0.0.0-20201113003025-83324d819ded // indirect
k8s.io/klog/v2 v2.4.0 // indirect
k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd // indirect
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 // indirect
sigs.k8s.io/kind v0.12.0 // indirect
sigs.k8s.io/kustomize v2.0.3+incompatible // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.0.2 // indirect
)
Loading