Skip to content

Commit b604f0f

Browse files
authored
feat: upgrade api-server to latest version to support rbac (#132)
### Motivation upgrade api-server to latest version and remove some removed api.
1 parent 214d054 commit b604f0f

File tree

4 files changed

+78
-82
lines changed

4 files changed

+78
-82
lines changed

cloud/pulsar_cluster_config.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ func flattenPulsarClusterConfig(in *cloudv1alpha1.Config) []interface{} {
3636
if in.AuditLog != nil {
3737
att["audit_log"] = flattenAuditLog(in.AuditLog)
3838
}
39-
if in.LakehouseStorage != nil {
40-
att["lakehouse_storage"] = flattenLakehouseStorage(in.LakehouseStorage)
41-
}
4239
if in.Custom != nil {
4340
att["custom"] = in.Custom
4441
}
@@ -84,17 +81,3 @@ func flattenCategories(in []string) []interface{} {
8481
}
8582
return att
8683
}
87-
88-
func flattenLakehouseStorage(in *cloudv1alpha1.LakehouseStorageConfig) map[string]interface{} {
89-
att := make(map[string]interface{})
90-
if in.LakehouseType != nil {
91-
att["lakehouse_type"] = *in.LakehouseType
92-
}
93-
if in.CatalogType != nil {
94-
att["catalog_type"] = *in.CatalogType
95-
}
96-
att["catalog_credentials"] = in.CatalogCredentials
97-
att["catalog_connection_url"] = in.CatalogConnectionUrl
98-
att["catalog_warehouse"] = in.CatalogWarehouse
99-
return att
100-
}

cloud/resource_pulsar_cluster.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -910,32 +910,6 @@ func getPulsarClusterChanged(ctx context.Context, pulsarCluster *cloudv1alpha1.P
910910
if d.HasChanges("audit_log") {
911911
changed = true
912912
}
913-
if configItemMap["lakehouse_storage"] != nil {
914-
lakehouseStorageItemMap := configItemMap["lakehouse_storage"].(map[string]interface{})
915-
tflog.Debug(ctx, "lakehouseStorageItemMap:", lakehouseStorageItemMap)
916-
pulsarClusterLakehouseStorage := &cloudv1alpha1.LakehouseStorageConfig{}
917-
if len(lakehouseStorageItemMap) > 0 {
918-
if _, ok := lakehouseStorageItemMap["lakehouse_type"]; ok {
919-
lakehouseType := lakehouseStorageItemMap["lakehouse_type"].(string)
920-
pulsarClusterLakehouseStorage.LakehouseType = &lakehouseType
921-
}
922-
if _, ok := lakehouseStorageItemMap["catalog_type"]; ok {
923-
catalogType := lakehouseStorageItemMap["catalog_type"].(string)
924-
pulsarClusterLakehouseStorage.CatalogType = &catalogType
925-
}
926-
if _, ok := lakehouseStorageItemMap["catalog_credentials"]; ok {
927-
pulsarClusterLakehouseStorage.CatalogCredentials = lakehouseStorageItemMap["catalog_credentials"].(string)
928-
}
929-
if _, ok := lakehouseStorageItemMap["catalog_connection_url"]; ok {
930-
pulsarClusterLakehouseStorage.CatalogConnectionUrl = lakehouseStorageItemMap["catalog_connection_url"].(string)
931-
}
932-
if _, ok := lakehouseStorageItemMap["catalog_warehouse"]; ok {
933-
pulsarClusterLakehouseStorage.CatalogWarehouse = lakehouseStorageItemMap["catalog_warehouse"].(string)
934-
}
935-
pulsarCluster.Spec.Config.LakehouseStorage = pulsarClusterLakehouseStorage
936-
changed = true
937-
}
938-
}
939913
if configItemMap["custom"] != nil {
940914
custom := configItemMap["custom"].(map[string]interface{})
941915
if len(custom) > 0 {

go.mod

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ module github.com/streamnative/terraform-provider-streamnative
33
go 1.23.8
44

55
require (
6-
github.com/99designs/keyring v1.2.1
6+
github.com/99designs/keyring v1.2.2
77
github.com/google/uuid v1.6.0
88
github.com/hashicorp/terraform-plugin-docs v0.16.0
99
github.com/hashicorp/terraform-plugin-log v0.9.0
1010
github.com/hashicorp/terraform-plugin-sdk/v2 v2.28.0
1111
github.com/lestrrat-go/jwx/v2 v2.0.21
12-
github.com/mitchellh/go-homedir v1.1.0
1312
github.com/pkg/errors v0.9.1
14-
github.com/streamnative/cloud-api-server v1.35.2
13+
github.com/streamnative/cloud-api-server v1.33.1-0.20250815224548-77ed42932280
1514
github.com/streamnative/cloud-cli v0.22.0-rc.1
1615
github.com/stretchr/testify v1.10.0
1716
github.com/xhit/go-str2duration/v2 v2.1.0
@@ -74,7 +73,7 @@ require (
7473
github.com/goccy/go-json v0.10.2 // indirect
7574
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
7675
github.com/gogo/protobuf v1.3.2 // indirect
77-
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
76+
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
7877
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
7978
github.com/golang/protobuf v1.5.4 // indirect
8079
github.com/google/btree v1.0.1 // indirect
@@ -128,6 +127,7 @@ require (
128127
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
129128
github.com/mitchellh/cli v1.1.5 // indirect
130129
github.com/mitchellh/copystructure v1.2.0 // indirect
130+
github.com/mitchellh/go-homedir v1.1.0 // indirect
131131
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
132132
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
133133
github.com/mitchellh/mapstructure v1.5.0 // indirect
@@ -162,9 +162,10 @@ require (
162162
github.com/spf13/pflag v1.0.5 // indirect
163163
github.com/stoewer/go-strcase v1.3.0 // indirect
164164
github.com/streamnative/function-mesh/api v0.0.0-20240802074023-ee53ec49a51d // indirect
165-
github.com/streamnative/sn-operator/api v0.10.0-rc.19 // indirect
166-
github.com/streamnative/sn-operator/api/commons v0.10.0-rc.19 // indirect
167-
github.com/streamnative/sn-operator/pkg/commons v0.10.0-rc.19 // indirect
165+
github.com/streamnative/sn-operator/api v0.13.0-rc.5 // indirect
166+
github.com/streamnative/sn-operator/api/commons v0.13.0-rc.5 // indirect
167+
github.com/streamnative/sn-operator/pkg/commons v0.13.0-rc.5 // indirect
168+
github.com/streamnative/unified-rbac/sdk/sdk-go v0.13.0 // indirect
168169
github.com/stripe/stripe-go/v74 v74.5.0 // indirect
169170
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
170171
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
@@ -187,22 +188,22 @@ require (
187188
go.uber.org/atomic v1.11.0 // indirect
188189
go.uber.org/multierr v1.11.0 // indirect
189190
go.uber.org/zap v1.27.0 // indirect
190-
golang.org/x/crypto v0.35.0 // indirect
191+
golang.org/x/crypto v0.36.0 // indirect
191192
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
192193
golang.org/x/mod v0.22.0 // indirect
193-
golang.org/x/net v0.36.0 // indirect
194-
golang.org/x/oauth2 v0.21.0 // indirect
195-
golang.org/x/sync v0.11.0 // indirect
196-
golang.org/x/sys v0.30.0 // indirect
197-
golang.org/x/term v0.29.0 // indirect
198-
golang.org/x/text v0.22.0 // indirect
194+
golang.org/x/net v0.38.0 // indirect
195+
golang.org/x/oauth2 v0.30.0 // indirect
196+
golang.org/x/sync v0.12.0 // indirect
197+
golang.org/x/sys v0.31.0 // indirect
198+
golang.org/x/term v0.30.0 // indirect
199+
golang.org/x/text v0.23.0 // indirect
199200
golang.org/x/time v0.7.0 // indirect
200201
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
201202
google.golang.org/appengine v1.6.8 // indirect
202203
google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect
203204
google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect
204205
google.golang.org/grpc v1.64.1 // indirect
205-
google.golang.org/protobuf v1.35.1 // indirect
206+
google.golang.org/protobuf v1.36.6 // indirect
206207
gopkg.in/inf.v0 v0.9.1 // indirect
207208
gopkg.in/yaml.v2 v2.4.0 // indirect
208209
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)