Skip to content

Commit

Permalink
feat: add include_secrets to ServiceGet calls
Browse files Browse the repository at this point in the history
  • Loading branch information
rriski committed Sep 2, 2024
1 parent 153e873 commit 0d2cb3d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion controllers/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion controllers/kafkatopic_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
File renamed without changes.

0 comments on commit 0d2cb3d

Please sign in to comment.