1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

[Update] Update Go to 1.17 (#877)

This commit is contained in:
Tomasz Mielech 2022-01-04 16:27:25 +01:00 committed by GitHub
parent 5846a3f8be
commit 143bc30faf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 93 additions and 27 deletions

View file

@ -1,7 +1,7 @@
language: go
go:
- "1.16"
- "1.17"
go_import_path: github.com/arangodb/kube-arangodb

View file

@ -11,6 +11,7 @@
- Add ArangoClusterSynchronization v1 API
- Add core containers names to follow their terminations
- Add ArangoJob and Apps Operator
- Use Go 1.17
## [1.2.6](https://github.com/arangodb/kube-arangodb/tree/1.2.6) (2021-12-15)
- Add ArangoBackup backoff functionality

View file

@ -1,11 +1,13 @@
FROM golang:1.16 as builder
ARG GOVERSION
ARG DISTRIBUTION
FROM golang:${GOVERSION} as builder
ARG TARGETARCH
RUN apt-get update && apt-get install -y build-essential
RUN apk add g++ make
RUN go install github.com/go-delve/delve/cmd/dlv@latest
FROM alpine:3.14 as artifact
FROM ${DISTRIBUTION} as artifact
ARG RELEASE_MODE
ARG TARGETARCH

View file

@ -102,3 +102,10 @@ Please add following to your `~/bashrc` or `~/.zshrc` file (it requires Homebrew
HOMEBREW_PREFIX=$(brew --prefix)
for d in ${HOMEBREW_PREFIX}/opt/*/libexec/gnubin; do export PATH=$d:$PATH; done
```
## Change Go version
#### Change file Makefile
* GOVERSION := e.g. 1.17-alpine3.15
* DISTRIBUTION := e.g. alpine:3.15
#### Change file .travis.yml
#### Change file go.mod

View file

@ -32,7 +32,8 @@ REPOPATH := $(ORGPATH)/$(REPONAME)
include $(ROOT)/$(RELEASE_MODE).mk
GOPATH := $(GOBUILDDIR)
GOVERSION := 1.10.0-alpine
GOVERSION := 1.17-alpine3.15
DISTRIBUTION := alpine:3.15
PULSAR := $(GOBUILDDIR)/bin/pulsar$(shell go env GOEXE)
GOASSETSBUILDER := $(GOBUILDDIR)/bin/go-assets-builder$(shell go env GOEXE)
@ -281,9 +282,13 @@ $(BIN): $(VBIN_LINUX_AMD64)
.PHONY: docker
docker: check-vars $(VBIN_LINUX_AMD64) $(VBIN_LINUX_ARM64)
ifdef PUSHIMAGES
docker buildx build --no-cache -f $(DOCKERFILE) --build-arg "VERSION=${VERSION_MAJOR_MINOR_PATCH}" --build-arg "RELEASE_MODE=$(RELEASE_MODE)" --platform linux/amd64,linux/arm64 --push -t $(OPERATORIMAGE) .
docker buildx build --no-cache -f $(DOCKERFILE) --build-arg GOVERSION=$(GOVERSION) --build-arg DISTRIBUTION=$(DISTRIBUTION) \
--build-arg "VERSION=${VERSION_MAJOR_MINOR_PATCH}" --build-arg "RELEASE_MODE=$(RELEASE_MODE)" \
--platform linux/amd64,linux/arm64 --push -t $(OPERATORIMAGE) .
else
docker buildx build --no-cache -f $(DOCKERFILE) --build-arg "VERSION=${VERSION_MAJOR_MINOR_PATCH}" --build-arg "RELEASE_MODE=$(RELEASE_MODE)" --platform linux/amd64,linux/arm64 -t $(OPERATORIMAGE) .
docker buildx build --no-cache -f $(DOCKERFILE) --build-arg GOVERSION=$(GOVERSION) --build-arg DISTRIBUTION=$(DISTRIBUTION) \
--build-arg "VERSION=${VERSION_MAJOR_MINOR_PATCH}" --build-arg "RELEASE_MODE=$(RELEASE_MODE)" \
--platform linux/amd64,linux/arm64 -t $(OPERATORIMAGE) .
endif
.PHONY: docker-ubi
@ -392,7 +397,7 @@ run-unit-tests: $(SOURCES)
$(REPOPATH)/pkg/deployment/... \
$(REPOPATH)/pkg/storage \
$(REPOPATH)/pkg/util/... \
$(REPOPATH)/pkg/backup/...
$(REPOPATH)/pkg/handlers/...
# Release building
@ -450,7 +455,7 @@ set-api-version/%:
"$(ROOT)/pkg/operator/" \
"$(ROOT)/pkg/server/" \
"$(ROOT)/pkg/util/" \
"$(ROOT)/pkg/backup/" \
"$(ROOT)/pkg/handlers/" \
"$(ROOT)/pkg/apis/backup/" \
| cut -d ':' -f 1 | sort | uniq \
| xargs -n 1 sed -i "s#github.com/arangodb/kube-arangodb/pkg/apis/$*/v[A-Za-z0-9]\+#github.com/arangodb/kube-arangodb/pkg/apis/$*/v$(API_VERSION)#g"
@ -460,7 +465,7 @@ set-api-version/%:
"$(ROOT)/pkg/operator/" \
"$(ROOT)/pkg/server/" \
"$(ROOT)/pkg/util/" \
"$(ROOT)/pkg/backup/" \
"$(ROOT)/pkg/handlers/" \
"$(ROOT)/pkg/apis/backup/" \
| cut -d ':' -f 1 | sort | uniq \
| xargs -n 1 sed -i "s#DatabaseV[A-Za-z0-9]\+()\.#DatabaseV$(API_VERSION)().#g"
@ -470,7 +475,7 @@ set-api-version/%:
"$(ROOT)/pkg/operator/" \
"$(ROOT)/pkg/server/" \
"$(ROOT)/pkg/util/" \
"$(ROOT)/pkg/backup/" \
"$(ROOT)/pkg/handlers" \
"$(ROOT)/pkg/apis/backup/" \
| cut -d ':' -f 1 | sort | uniq \
| xargs -n 1 sed -i "s#ReplicationV[A-Za-z0-9]\+()\.#ReplicationV$(API_VERSION)().#g"

72
go.mod
View file

@ -1,6 +1,6 @@
module github.com/arangodb/kube-arangodb
go 1.16
go 1.17
replace (
github.com/arangodb/go-driver => github.com/arangodb/go-driver v1.2.1
@ -31,22 +31,12 @@ require (
//github.com/arangodb/rebalancer v0.1.1
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9
github.com/evanphx/json-patch v4.9.0+incompatible // indirect
github.com/ghodss/yaml v1.0.0
github.com/gin-gonic/gin v1.7.2
github.com/go-playground/validator/v10 v10.8.0 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/addlicense v0.0.0-20210428195630-6d92264d7170 // indirect
github.com/hashicorp/golang-lru v0.5.3 // indirect
github.com/jessevdk/go-assets v0.0.0-20160921144138-4f4301a06e15
github.com/jessevdk/go-assets-builder v0.0.0-20130903091706-b8483521738f // indirect
github.com/jessevdk/go-flags v1.5.0 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/julienschmidt/httprouter v1.3.0
github.com/magiconair/properties v1.8.5
github.com/mattn/go-isatty v0.0.13 // indirect
github.com/onsi/gomega v1.7.1 // indirect
github.com/pkg/errors v0.9.1
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.44.1
github.com/prometheus-operator/prometheus-operator/pkg/client v0.0.0-00010101000000-000000000000
@ -57,15 +47,65 @@ require (
github.com/spf13/cobra v1.2.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.0
github.com/ugorji/go/codec v1.2.6 // indirect
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/api v0.19.8
k8s.io/apiextensions-apiserver v0.18.3
k8s.io/apimachinery v0.19.8
k8s.io/client-go v12.0.0+incompatible
k8s.io/klog v1.0.0
)
require (
github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/evanphx/json-patch v4.9.0+incompatible // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-logr/logr v0.2.0 // indirect
github.com/go-playground/locales v0.13.0 // indirect
github.com/go-playground/universal-translator v0.17.0 // indirect
github.com/go-playground/validator/v10 v10.8.0 // 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/addlicense v0.0.0-20210428195630-6d92264d7170 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/googleapis/gnostic v0.4.1 // indirect
github.com/hashicorp/golang-lru v0.5.3 // indirect
github.com/imdario/mergo v0.3.5 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jessevdk/go-assets-builder v0.0.0-20130903091706-b8483521738f // indirect
github.com/jessevdk/go-flags v1.5.0 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mattn/go-isatty v0.0.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/onsi/gomega v1.7.1 // indirect
github.com/pavel-v-chernykh/keystore-go v2.1.0+incompatible // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.10.0 // indirect
github.com/prometheus/procfs v0.1.3 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/ugorji/go/codec v1.2.6 // indirect
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602 // indirect
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.2.0 // indirect
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 // indirect
k8s.io/utils v0.0.0-20200729134348-d5654de09c73 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.0.1 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)

View file

@ -18,6 +18,7 @@
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
//go:build !enterprise
// +build !enterprise
package deployment

View file

@ -18,6 +18,7 @@
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
//go:build !enterprise
// +build !enterprise
package pod

View file

@ -18,6 +18,7 @@
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
//go:build !enterprise
// +build !enterprise
package reconcile

View file

@ -18,6 +18,7 @@
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
//go:build !enterprise
// +build !enterprise
package reconcile

View file

@ -18,6 +18,7 @@
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
//go:build !enterprise
// +build !enterprise
package reconcile

View file

@ -18,6 +18,7 @@
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
//go:build !enterprise
// +build !enterprise
package reconcile

View file

@ -18,6 +18,7 @@
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
//go:build !enterprise
// +build !enterprise
package reconcile

View file

@ -18,6 +18,7 @@
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
//go:build !enterprise
// +build !enterprise
package reconcile

View file

@ -18,6 +18,7 @@
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
//go:build !enterprise
// +build !enterprise
package topology

View file

@ -18,6 +18,7 @@
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
//go:build !enterprise
// +build !enterprise
package topology

View file

@ -18,6 +18,7 @@
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
//go:build !enterprise
// +build !enterprise
package version