Skip to content

Commit

Permalink
Merge pull request #478 from tesshuflower/golang1.18
Browse files Browse the repository at this point in the history
Golang1.18 for release-0.4
  • Loading branch information
openshift-merge-robot authored Oct 26, 2022
2 parents 69501e3 + b7dacfa commit c634572
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 145 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on: # yamllint disable-line rule:truthy
workflow_dispatch:

env:
GO_VERSION: "1.17"
GO_VERSION: "1.18"
KIND_VERSION: "0.11.1"
GO111MODULE: "on"
OPERATOR_IMAGE: "quay.io/backube/volsync"
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM registry.access.redhat.com/ubi8/go-toolset as builder
FROM golang:1.18 as builder
USER root

WORKDIR /workspace
Expand All @@ -22,7 +22,8 @@ ARG version_arg="(unknown)"
RUN GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager -ldflags "-X=main.volsyncVersion=${version_arg}" main.go

# Verify that FIPS crypto libs are accessible
RUN nm manager | grep -q goboringcrypto
# Check removed since official images don't support boring crypto
#RUN nm manager | grep -q goboringcrypto

# Final container
FROM registry.access.redhat.com/ubi8-minimal
Expand Down
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
include ./version.mk

# Helper software versions
GOLANGCI_VERSION := v1.43.0
GOLANGCI_VERSION := v1.46.1
HELM_VERSION := v3.7.1
OPERATOR_SDK_VERSION := v1.15.0
KUTTL_VERSION := 0.11.1
Expand Down Expand Up @@ -181,11 +181,15 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
undeploy-openshift: manifests kustomize ## Undeploy controller to the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/openshift | kubectl delete -f -

## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
$(LOCALBIN):
mkdir -p $(LOCALBIN)

.PHONY: controller-gen
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0

.PHONY: kustomize
KUSTOMIZE = $(shell pwd)/bin/kustomize
Expand All @@ -195,12 +199,12 @@ kustomize: ## Download kustomize locally if necessary.
.PHONY: envtest
ENVTEST = $(shell pwd)/bin/setup-envtest
envtest: ## Download envtest-setup locally if necessary.
$(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

.PHONY: yq
YQ = $(shell pwd)/bin/yq
yq: ## Download yq locally if necessary.
$(call go-get-tool,$(YQ),github.com/mikefarah/yq/v4@latest)
GOBIN=$(LOCALBIN) go install github.com/mikefarah/yq/v4@latest


# go-get-tool will 'go get' any package $2 and install it to $1.
Expand Down Expand Up @@ -293,7 +297,7 @@ endef
.PHONY: ginkgo
GINKGO := $(PROJECT_DIR)/bin/ginkgo
ginkgo: ## Download ginkgo
$(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/ginkgo)
GOBIN=$(LOCALBIN) go install github.com/onsi/ginkgo/ginkgo@v1.16.4

.PHONY: golangci-lint
GOLANGCILINT := $(PROJECT_DIR)/bin/golangci-lint
Expand Down
2 changes: 1 addition & 1 deletion controllers/mover/rclone/rclone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var _ = Describe("Rclone properly registers", func() {
It("is added to the mover catalog", func() {
found := false
for _, v := range mover.Catalog {
if v.(*Builder) != nil {
if _, ok := v.(*Builder); ok {
found = true
}
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/mover/restic/restic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ var _ = Describe("Restic properly registers", func() {
It("is added to the mover catalog", func() {
found := false
for _, v := range mover.Catalog {
if v.(*Builder) != nil {
if _, ok := v.(*Builder); ok {
found = true
}
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/mover/rsync/rsync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var _ = Describe("Rsync properly registers", func() {
It("is added to the mover catalog", func() {
found := false
for _, v := range mover.Catalog {
if v.(*Builder) != nil {
if _, ok := v.(*Builder); ok {
found = true
}
}
Expand Down
24 changes: 1 addition & 23 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/backube/volsync

go 1.17
go 1.18

require (
github.com/go-logr/logr v0.4.0
Expand All @@ -16,7 +16,6 @@ require (
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.22.1
k8s.io/apimachinery v0.22.1
k8s.io/cli-runtime v0.22.1
k8s.io/client-go v0.22.1
k8s.io/component-base v0.22.1
k8s.io/klog/v2 v2.9.0
Expand All @@ -35,62 +34,43 @@ require (
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-errors/errors v1.0.1 // indirect
github.com/go-logr/zapr v0.4.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/nxadm/tail v1.4.8 // 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_model v0.2.0 // indirect
github.com/prometheus/common v0.26.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/russross/blackfriday v1.5.2 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/stretchr/testify v1.7.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.19.0 // indirect
Expand All @@ -110,8 +90,6 @@ require (
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/apiextensions-apiserver v0.22.1 // indirect
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect
sigs.k8s.io/kustomize/api v0.8.11 // indirect
sigs.k8s.io/kustomize/kyaml v0.11.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)
Loading

0 comments on commit c634572

Please sign in to comment.