Skip to content

Commit

Permalink
Update golang for builder image and linter to 1.19 (#602)
Browse files Browse the repository at this point in the history
* update golang for builder image to 1.19

* fix test-defs

Co-authored-by: Konstantinos Angelopoulos <konstantinos.angelopoulos@sap.com>
  • Loading branch information
MartinWeindel and kon-angelo authored Oct 11, 2022
1 parent 09a896d commit 9d183ef
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 15 deletions.
3 changes: 0 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
run:
concurrency: 4
deadline: 10m
# some of the linters don't work correctly with 1.18, ref https://github.com/golangci/golangci-lint/issues/2649
# we are not using generics, so let's pin this to 1.17 until 1.18 is fully supported
go: "1.17"

linters:
disable:
Expand Down
2 changes: 1 addition & 1 deletion .test-defs/bastion-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ spec:
--secret-access-key=$SECRET_ACCESS_KEY
--region=$REGION
image: golang:1.17.5
image: golang:1.19.2
2 changes: 1 addition & 1 deletion .test-defs/dnsrecord-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ spec:
--access-key-id=$DNS_ACCESS_KEY_ID
--secret-access-key=$DNS_SECRET_ACCESS_KEY
image: golang:1.17.5
image: golang:1.19.2
2 changes: 1 addition & 1 deletion .test-defs/infrastructure-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ spec:
--secret-access-key=$SECRET_ACCESS_KEY
--region=$REGION
image: golang:1.17.5
image: golang:1.19.2
2 changes: 1 addition & 1 deletion .test-defs/provider-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ spec:
--network-worker-cidr=$NETWORK_WORKER_CIDR
--zone=$ZONE
image: golang:1.17.5
image: golang:1.19.2
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############# builder
FROM golang:1.18.3 AS builder
FROM golang:1.19.2 AS builder

WORKDIR /go/src/github.com/gardener/gardener-extension-provider-aws
COPY . .
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ SECRET_ACCESS_KEY_FILE := .kube-secrets/aws/secret_access_key.secret
#########################################

TOOLS_DIR := hack/tools
# temporarily until Gardener version has been revendored >= v1.54
GOLANGCI_LINT_VERSION := v1.49.0
include vendor/github.com/gardener/gardener/hack/tools.mk

#########################################
Expand Down
14 changes: 7 additions & 7 deletions pkg/controller/infrastructure/configvalidator.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ import (
"context"
"fmt"

"github.com/gardener/gardener-extension-provider-aws/pkg/apis/aws/helper"
"github.com/gardener/gardener-extension-provider-aws/pkg/aws"
awsclient "github.com/gardener/gardener-extension-provider-aws/pkg/aws/client"
"k8s.io/apimachinery/pkg/util/sets"

"github.com/gardener/gardener/extensions/pkg/controller/common"
"github.com/gardener/gardener/extensions/pkg/controller/infrastructure"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/validation/field"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/gardener/gardener-extension-provider-aws/pkg/apis/aws/helper"
"github.com/gardener/gardener-extension-provider-aws/pkg/aws"
awsclient "github.com/gardener/gardener-extension-provider-aws/pkg/aws/client"
)

// configValidator implements ConfigValidator for aws infrastructure resources.
Expand Down Expand Up @@ -130,8 +130,8 @@ func (c *configValidator) validateVPC(ctx context.Context, awsClient awsclient.I

// validateEIP validates if the given elastic IP exists and can be associated by the Shoot's NAT gateway
// An EIP can be associated with the Shoot when
// - it is not associated yet (new)
// - it is already associated to any Gardener-created NAT Gateway of the Shoot cluster (identified by tag `kubernetes.io/cluster/<shoot-name>`)
// - it is not associated yet (new)
// - it is already associated to any Gardener-created NAT Gateway of the Shoot cluster (identified by tag `kubernetes.io/cluster/<shoot-name>`)
func (c *configValidator) validateEIPS(ctx context.Context, awsClient awsclient.Interface, shootNamespace string, elasticIPAllocationIDs []string, elasticIPAllocationIDToZone map[string]string, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}

Expand Down

0 comments on commit 9d183ef

Please sign in to comment.