From 0d2cb3d9aaaf4675248b9f5a3ee9b6504a69087c Mon Sep 17 00:00:00 2001 From: Timo Riski Date: Fri, 30 Aug 2024 15:29:48 +0300 Subject: [PATCH] feat: add `include_secrets` to `ServiceGet` calls --- controllers/common.go | 2 +- controllers/kafkatopic_controller.go | 2 +- go.mod | 4 ++-- go.sum | 8 ++++---- ...registryaacl_test.go => kafkschemaregistryacl_test.go} | 0 5 files changed, 8 insertions(+), 8 deletions(-) rename tests/{kafkschemaregistryaacl_test.go => kafkschemaregistryacl_test.go} (100%) diff --git a/controllers/common.go b/controllers/common.go index 6d2c50ea..b0052ef5 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -49,7 +49,7 @@ const ( var errTerminationProtectionOn = errors.New("termination protection is on") func checkServiceIsOperational(ctx context.Context, avnGen avngen.Client, project, serviceName string) (bool, error) { - s, err := avnGen.ServiceGet(ctx, project, serviceName) + s, err := avnGen.ServiceGet(ctx, project, serviceName, service.ServiceGetIncludeSecrets(true)) if err != nil { // if service is not found, it is not running if isNotFound(err) { diff --git a/controllers/kafkatopic_controller.go b/controllers/kafkatopic_controller.go index 4284ec34..17ad2da3 100644 --- a/controllers/kafkatopic_controller.go +++ b/controllers/kafkatopic_controller.go @@ -175,7 +175,7 @@ func (h KafkaTopicHandler) checkPreconditions(ctx context.Context, avn *aiven.Cl meta.SetStatusCondition(&topic.Status.Conditions, getInitializedCondition("Preconditions", "Checking preconditions")) - s, err := avnGen.ServiceGet(ctx, topic.Spec.Project, topic.Spec.ServiceName) + s, err := avnGen.ServiceGet(ctx, topic.Spec.Project, topic.Spec.ServiceName, service.ServiceGetIncludeSecrets(true)) if isNotFound(err) { return false, nil } diff --git a/go.mod b/go.mod index 02a52558..60fd268d 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/ClickHouse/clickhouse-go/v2 v2.27.1 github.com/aiven/aiven-go-client/v2 v2.26.0 github.com/aiven/go-api-schemas v1.83.0 - github.com/aiven/go-client-codegen v0.20.0 + github.com/aiven/go-client-codegen v0.24.0 github.com/dave/jennifer v1.7.0 github.com/docker/go-units v0.5.0 github.com/ghodss/yaml v1.0.0 @@ -88,7 +88,7 @@ require ( golang.org/x/mod v0.20.0 // indirect golang.org/x/net v0.28.0 // indirect golang.org/x/oauth2 v0.7.0 // indirect - golang.org/x/sys v0.23.0 // indirect + golang.org/x/sys v0.24.0 // indirect golang.org/x/term v0.23.0 // indirect golang.org/x/text v0.17.0 // indirect golang.org/x/time v0.3.0 // indirect diff --git a/go.sum b/go.sum index 6cd72267..d9b0914c 100644 --- a/go.sum +++ b/go.sum @@ -41,8 +41,8 @@ github.com/aiven/aiven-go-client/v2 v2.26.0 h1:1dBlF0BULbPsRXEEmcKs71AE3VZ+AYt5z github.com/aiven/aiven-go-client/v2 v2.26.0/go.mod h1:KdHfLIlIRZIfCSEBd39j1Q81jlSb6Nd+oCQKqERfnuA= github.com/aiven/go-api-schemas v1.83.0 h1:qqJgCfd2bAbAN7CJr+oBKLYggn0+0bDsBzitFCNlvzg= github.com/aiven/go-api-schemas v1.83.0/go.mod h1:/F7Rr8UVErsRxhgGN7CSo+Ac/uAg/OiAVCEKCfm3VAo= -github.com/aiven/go-client-codegen v0.20.0 h1:vFGogf+YvnsNSWalCcYOQSCFYIHNc6kXLPzWUIAXeas= -github.com/aiven/go-client-codegen v0.20.0/go.mod h1:Sajbdpjn1/m5g2D6EDfiSnxl9pj9hxe8+hpG1CkCkhs= +github.com/aiven/go-client-codegen v0.24.0 h1:qWw7F1aNDZnvb28jECv8MkrH+a8aaI6fZRcar5lVt/A= +github.com/aiven/go-client-codegen v0.24.0/go.mod h1:snetvsq1F5P49/rGofmdBGYBk19LpdNV6NWoupCAJ4s= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -529,8 +529,8 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= diff --git a/tests/kafkschemaregistryaacl_test.go b/tests/kafkschemaregistryacl_test.go similarity index 100% rename from tests/kafkschemaregistryaacl_test.go rename to tests/kafkschemaregistryacl_test.go