Skip to content

Commit 548fa54

Browse files
chore: cherry pick dependabot bumps and fix linting issues (#1416)
* chore(deps): bump the all group across 1 directory with 13 updates Bumps the all group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [cloud.google.com/go/compute](https://github.com/googleapis/google-cloud-go) | `1.28.1` | `1.31.1` | | [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) | `2.22.0` | `2.22.2` | | [github.com/stretchr/testify](https://github.com/stretchr/testify) | `1.9.0` | `1.10.0` | | [golang.org/x/crypto](https://github.com/golang/crypto) | `0.31.0` | `0.32.0` | | [golang.org/x/net](https://github.com/golang/net) | `0.33.0` | `0.34.0` | Updates `cloud.google.com/go/compute` from 1.28.1 to 1.31.1 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/documentai/CHANGES.md) - [Commits](googleapis/google-cloud-go@compute/v1.28.1...compute/v1.31.1) Updates `cloud.google.com/go/container` from 1.40.0 to 1.42.0 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md) - [Commits](googleapis/google-cloud-go@pubsub/v1.40.0...pubsub/v1.42.0) Updates `cloud.google.com/go/iam` from 1.2.1 to 1.2.2 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md) - [Commits](googleapis/google-cloud-go@iam/v1.2.1...iam/v1.2.2) Updates `cloud.google.com/go/resourcemanager` from 1.10.1 to 1.10.2 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md) - [Commits](googleapis/google-cloud-go@kms/v1.10.1...dlp/v1.10.2) Updates `github.com/googleapis/gax-go/v2` from 2.13.0 to 2.14.0 - [Release notes](https://github.com/googleapis/gax-go/releases) - [Commits](googleapis/gax-go@v2.13.0...v2.14.0) Updates `github.com/onsi/ginkgo/v2` from 2.22.0 to 2.22.2 - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](onsi/ginkgo@v2.22.0...v2.22.2) Updates `github.com/onsi/gomega` from 1.36.0 to 1.36.2 - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](onsi/gomega@v1.36.0...v1.36.2) Updates `github.com/stretchr/testify` from 1.9.0 to 1.10.0 - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](stretchr/testify@v1.9.0...v1.10.0) Updates `golang.org/x/crypto` from 0.31.0 to 0.32.0 - [Commits](golang/crypto@v0.31.0...v0.32.0) Updates `golang.org/x/mod` from 0.21.0 to 0.22.0 - [Commits](golang/mod@v0.21.0...v0.22.0) Updates `golang.org/x/net` from 0.33.0 to 0.34.0 - [Commits](golang/net@v0.33.0...v0.34.0) Updates `google.golang.org/api` from 0.201.0 to 0.214.0 - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](googleapis/google-api-go-client@v0.201.0...v0.214.0) Updates `google.golang.org/grpc` from 1.67.1 to 1.67.3 - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.67.1...v1.67.3) --- updated-dependencies: - dependency-name: cloud.google.com/go/compute dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: cloud.google.com/go/container dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: cloud.google.com/go/iam dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all - dependency-name: cloud.google.com/go/resourcemanager dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all - dependency-name: github.com/googleapis/gax-go/v2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: golang.org/x/mod dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all ... Signed-off-by: dependabot[bot] <[email protected]> * fix: remove deprecated go sdk functions/fields Signed-off-by: Carlos Salas <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Carlos Salas <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent b83c3a5 commit 548fa54

File tree

3 files changed

+93
-155
lines changed

3 files changed

+93
-155
lines changed

cloud/services/container/clusters/reconcile.go

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,11 @@ func (s *Service) createCluster(ctx context.Context, log *logr.Logger) error {
265265
ReleaseChannel: &containerpb.ReleaseChannel{
266266
Channel: convertToSdkReleaseChannel(s.scope.GCPManagedControlPlane.Spec.ReleaseChannel),
267267
},
268-
MasterAuthorizedNetworksConfig: convertToSdkMasterAuthorizedNetworksConfig(s.scope.GCPManagedControlPlane.Spec.MasterAuthorizedNetworksConfig),
268+
ControlPlaneEndpointsConfig: &containerpb.ControlPlaneEndpointsConfig{
269+
IpEndpointsConfig: &containerpb.ControlPlaneEndpointsConfig_IPEndpointsConfig{
270+
AuthorizedNetworksConfig: convertToSdkMasterAuthorizedNetworksConfig(s.scope.GCPManagedControlPlane.Spec.MasterAuthorizedNetworksConfig),
271+
},
272+
},
269273
}
270274
if s.scope.GCPManagedControlPlane.Spec.ControlPlaneVersion != nil {
271275
cluster.InitialClusterVersion = convertToSdkMasterVersion(*s.scope.GCPManagedControlPlane.Spec.ControlPlaneVersion)
@@ -278,18 +282,18 @@ func (s *Service) createCluster(ctx context.Context, log *logr.Logger) error {
278282
}
279283
if cn.PrivateCluster != nil {
280284
cluster.PrivateClusterConfig = &containerpb.PrivateClusterConfig{}
281-
cluster.PrivateClusterConfig.EnablePrivateEndpoint = cn.PrivateCluster.EnablePrivateEndpoint
285+
286+
enablePublicEndpoint := !cn.PrivateCluster.EnablePrivateEndpoint
287+
cluster.ControlPlaneEndpointsConfig.IpEndpointsConfig.EnablePublicEndpoint = &enablePublicEndpoint
282288
if cn.PrivateCluster.EnablePrivateEndpoint {
283-
cluster.MasterAuthorizedNetworksConfig = &containerpb.MasterAuthorizedNetworksConfig{
289+
cluster.ControlPlaneEndpointsConfig.IpEndpointsConfig.AuthorizedNetworksConfig = &containerpb.MasterAuthorizedNetworksConfig{
284290
Enabled: true,
285291
}
286292
}
287-
cluster.PrivateClusterConfig.EnablePrivateNodes = cn.PrivateCluster.EnablePrivateNodes
293+
cluster.NetworkConfig.DefaultEnablePrivateNodes = &cn.PrivateCluster.EnablePrivateNodes
288294

289295
cluster.PrivateClusterConfig.MasterIpv4CidrBlock = cn.PrivateCluster.ControlPlaneCidrBlock
290-
cluster.PrivateClusterConfig.MasterGlobalAccessConfig = &containerpb.PrivateClusterMasterGlobalAccessConfig{
291-
Enabled: cn.PrivateCluster.ControlPlaneGlobalAccess,
292-
}
296+
cluster.ControlPlaneEndpointsConfig.IpEndpointsConfig.GlobalAccess = &cn.PrivateCluster.ControlPlaneGlobalAccess
293297

294298
cluster.NetworkConfig = &containerpb.NetworkConfig{
295299
DefaultSnatStatus: &containerpb.DefaultSnatStatus{
@@ -457,12 +461,12 @@ func (s *Service) checkDiffAndPrepareUpdate(existingCluster *containerpb.Cluster
457461
// DesiredMasterAuthorizedNetworksConfig
458462
// When desiredMasterAuthorizedNetworksConfig is nil, it means that the user wants to disable the feature.
459463
desiredMasterAuthorizedNetworksConfig := convertToSdkMasterAuthorizedNetworksConfig(s.scope.GCPManagedControlPlane.Spec.MasterAuthorizedNetworksConfig)
460-
if !compareMasterAuthorizedNetworksConfig(desiredMasterAuthorizedNetworksConfig, existingCluster.GetMasterAuthorizedNetworksConfig()) {
464+
if !compareMasterAuthorizedNetworksConfig(desiredMasterAuthorizedNetworksConfig, existingCluster.GetControlPlaneEndpointsConfig().GetIpEndpointsConfig().GetAuthorizedNetworksConfig()) {
461465
needUpdate = true
462-
clusterUpdate.DesiredMasterAuthorizedNetworksConfig = desiredMasterAuthorizedNetworksConfig
463-
log.V(2).Info("Master authorized networks config update required", "current", existingCluster.GetMasterAuthorizedNetworksConfig(), "desired", desiredMasterAuthorizedNetworksConfig)
466+
clusterUpdate.DesiredControlPlaneEndpointsConfig.IpEndpointsConfig.AuthorizedNetworksConfig = desiredMasterAuthorizedNetworksConfig
467+
log.V(2).Info("Master authorized networks config update required", "current", existingCluster.GetControlPlaneEndpointsConfig().GetIpEndpointsConfig().GetAuthorizedNetworksConfig(), "desired", desiredMasterAuthorizedNetworksConfig)
464468
}
465-
log.V(4).Info("Master authorized networks config update check", "current", existingCluster.GetMasterAuthorizedNetworksConfig())
469+
log.V(4).Info("Master authorized networks config update check", "current", existingCluster.GetControlPlaneEndpointsConfig().GetIpEndpointsConfig().GetAuthorizedNetworksConfig())
466470
if desiredMasterAuthorizedNetworksConfig != nil {
467471
log.V(4).Info("Master authorized networks config update check", "desired", desiredMasterAuthorizedNetworksConfig)
468472
}

go.mod

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ replace (
1313
)
1414

1515
require (
16-
cloud.google.com/go/compute v1.28.1
17-
cloud.google.com/go/container v1.40.0
18-
cloud.google.com/go/iam v1.2.1
19-
cloud.google.com/go/resourcemanager v1.10.1
16+
cloud.google.com/go/compute v1.31.1
17+
cloud.google.com/go/container v1.42.0
18+
cloud.google.com/go/iam v1.2.2
19+
cloud.google.com/go/resourcemanager v1.10.2
2020
github.com/GoogleCloudPlatform/k8s-cloud-provider v1.33.0
2121
github.com/go-logr/logr v1.4.2
2222
github.com/google/go-cmp v0.6.0
23-
github.com/googleapis/gax-go/v2 v2.13.0
24-
github.com/onsi/ginkgo/v2 v2.22.0
25-
github.com/onsi/gomega v1.36.0
23+
github.com/googleapis/gax-go/v2 v2.14.0
24+
github.com/onsi/ginkgo/v2 v2.22.2
25+
github.com/onsi/gomega v1.36.2
2626
github.com/pkg/errors v0.9.1
2727
github.com/spf13/pflag v1.0.5
28-
github.com/stretchr/testify v1.9.0
29-
golang.org/x/crypto v0.31.0
30-
golang.org/x/mod v0.21.0
31-
golang.org/x/net v0.33.0
32-
google.golang.org/api v0.201.0
33-
google.golang.org/grpc v1.67.1
28+
github.com/stretchr/testify v1.10.0
29+
golang.org/x/crypto v0.32.0
30+
golang.org/x/mod v0.22.0
31+
golang.org/x/net v0.34.0
32+
google.golang.org/api v0.214.0
33+
google.golang.org/grpc v1.67.3
3434
k8s.io/api v0.31.3
3535
k8s.io/apimachinery v0.31.3
3636
k8s.io/client-go v0.31.3
@@ -44,9 +44,9 @@ require (
4444

4545
require (
4646
cloud.google.com/go v0.116.0 // indirect
47-
cloud.google.com/go/auth v0.9.8 // indirect
48-
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect
49-
cloud.google.com/go/longrunning v0.6.1 // indirect
47+
cloud.google.com/go/auth v0.13.0 // indirect
48+
cloud.google.com/go/auth/oauth2adapt v0.2.6 // indirect
49+
cloud.google.com/go/longrunning v0.6.2 // indirect
5050
dario.cat/mergo v1.0.1 // indirect
5151
github.com/NYTimes/gziphandler v1.1.1 // indirect
5252
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
@@ -84,7 +84,7 @@ require (
8484
)
8585

8686
require (
87-
cloud.google.com/go/compute/metadata v0.5.2 // indirect
87+
cloud.google.com/go/compute/metadata v0.6.0 // indirect
8888
github.com/BurntSushi/toml v1.4.0 // indirect
8989
github.com/MakeNowJust/heredoc v1.0.0 // indirect
9090
github.com/Masterminds/goutils v1.1.1 // indirect
@@ -116,7 +116,7 @@ require (
116116
github.com/google/cel-go v0.20.1 // indirect
117117
github.com/google/go-querystring v1.1.0 // indirect
118118
github.com/google/gofuzz v1.2.0 // indirect
119-
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
119+
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
120120
github.com/google/s2a-go v0.1.8 // indirect
121121
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
122122
github.com/google/uuid v1.6.0 // indirect
@@ -153,20 +153,19 @@ require (
153153
github.com/stoewer/go-strcase v1.2.0 // indirect
154154
github.com/subosito/gotenv v1.6.0 // indirect
155155
github.com/valyala/fastjson v1.6.4 // indirect
156-
go.opencensus.io v0.24.0 // indirect
157156
go.uber.org/multierr v1.11.0 // indirect
158157
go.uber.org/zap v1.27.0 // indirect; indirect// indirect
159158
golang.org/x/oauth2 v0.24.0 // indirect
160-
golang.org/x/sys v0.28.0 // indirect
161-
golang.org/x/term v0.27.0 // indirect
159+
golang.org/x/sys v0.29.0 // indirect
160+
golang.org/x/term v0.28.0 // indirect
162161
golang.org/x/text v0.21.0 // indirect
163-
golang.org/x/time v0.7.0 // indirect
164-
golang.org/x/tools v0.26.0 // indirect
162+
golang.org/x/time v0.8.0 // indirect
163+
golang.org/x/tools v0.28.0 // indirect
165164
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
166-
google.golang.org/genproto v0.0.0-20241007155032-5fefd90f89a9 // indirect
167-
google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f // indirect
168-
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
169-
google.golang.org/protobuf v1.35.1 // indirect
165+
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect
166+
google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 // indirect
167+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect
168+
google.golang.org/protobuf v1.36.1 // indirect
170169
gopkg.in/inf.v0 v0.9.1 // indirect
171170
gopkg.in/ini.v1 v1.67.0 // indirect
172171
gopkg.in/yaml.v2 v2.4.0 // indirect

0 commit comments

Comments
 (0)