Skip to content

Commit e4b8ae8

Browse files
committed
Move to Go 1.18 and upgrade dependencies.
1 parent b3eb847 commit e4b8ae8

File tree

8 files changed

+512
-247
lines changed

8 files changed

+512
-247
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Setup Go environment
2626
uses: actions/[email protected]
2727
with:
28-
go-version: ~1.15
28+
go-version: ~1.18
2929

3030
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3131
- uses: actions/checkout@v2

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.15 as builder
2+
FROM golang:1.18 as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ vet: ## Run go vet against code.
8888
ENVTEST_ASSETS_DIR=$(shell pwd)/testbin
8989
test: manifests generate fmt vet ## Run tests.
9090
mkdir -p ${ENVTEST_ASSETS_DIR}
91-
test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.8.3/hack/setup-envtest.sh
91+
test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.11.1/hack/setup-envtest.sh
9292
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile cover.out
9393

9494
##@ Build
@@ -123,11 +123,11 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
123123

124124
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
125125
controller-gen: ## Download controller-gen locally if necessary.
126-
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1)
126+
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0)
127127

128128
KUSTOMIZE = $(shell pwd)/bin/kustomize
129129
kustomize: ## Download kustomize locally if necessary.
130-
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.8.7)
130+
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.10.0)
131131

132132
# go-get-tool will 'go get' any package $2 and install it to $1.
133133
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
@@ -167,7 +167,7 @@ ifeq (,$(shell which opm 2>/dev/null))
167167
set -e ;\
168168
mkdir -p $(dir $(OPM)) ;\
169169
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
170-
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.15.1/$${OS}-$${ARCH}-opm ;\
170+
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.21.0/$${OS}-$${ARCH}-opm ;\
171171
chmod +x $(OPM) ;\
172172
}
173173
else

controllers/postgresconfig_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type PostgresConfigReconciler struct {
6262
// move the current state of the cluster closer to the desired state.
6363
//
6464
// For more details, check Reconcile and its Result here:
65-
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
65+
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.1/pkg/reconcile
6666
func (r *PostgresConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
6767
logger := r.Log.WithValues("postgresconfig", req.NamespacedName)
6868
ctx = utils.WithRequestLogger(ctx, req, "postgresconfig", r.Log)

controllers/postgresgrant_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ type PostgresGrantReconciler struct {
5454
// the user.
5555
//
5656
// For more details, check Reconcile and its Result here:
57-
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
57+
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.1/pkg/reconcile
5858
func (r *PostgresGrantReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
5959
_ = log.FromContext(ctx)
6060
ctx = utils.WithRequestLogger(ctx, req, "postgresgrant", r.Log)

controllers/postgrespublication_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ type PostgresPublicationReconciler struct {
6060
// move the current state of the cluster closer to the desired state.
6161
//
6262
// For more details, check Reconcile and its Result here:
63-
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
63+
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.1/pkg/reconcile
6464
func (r *PostgresPublicationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
6565
ctx = utils.WithRequestLogger(ctx, req, "postgrespublication", r.Log)
6666

go.mod

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ module github.com/glints-dev/postgres-config-operator
33
go 1.15
44

55
require (
6-
github.com/go-logr/logr v0.3.0
7-
github.com/jackc/pgconn v1.8.1
6+
github.com/go-logr/logr v1.2.3
7+
github.com/jackc/pgconn v1.11.0
88
github.com/jackc/pgerrcode v0.0.0-20201024163028-a0d42d470451
9-
github.com/jackc/pgx/v4 v4.11.0
10-
github.com/onsi/ginkgo v1.14.1
11-
github.com/onsi/gomega v1.10.2
12-
github.com/testcontainers/testcontainers-go v0.10.0
13-
k8s.io/api v0.20.2
14-
k8s.io/apimachinery v0.20.2
15-
k8s.io/client-go v0.20.2
16-
sigs.k8s.io/controller-runtime v0.8.3
9+
github.com/jackc/pgx/v4 v4.15.0
10+
github.com/onsi/ginkgo v1.16.5
11+
github.com/onsi/gomega v1.18.1
12+
github.com/testcontainers/testcontainers-go v0.12.0
13+
k8s.io/api v0.23.5
14+
k8s.io/apimachinery v0.23.5
15+
k8s.io/client-go v0.23.5
16+
sigs.k8s.io/controller-runtime v0.11.1
1717
)

0 commit comments

Comments
 (0)