Skip to content

Commit 3bbe1c5

Browse files
authored
[Feature] Migrate Storage V1 to CE (#1790)
1 parent 5b68fde commit 3bbe1c5

File tree

27 files changed

+2265
-149
lines changed

27 files changed

+2265
-149
lines changed

.golangci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ linters-settings:
5757
pkg: github.com/arangodb/kube-arangodb/integrations/shutdown/v1
5858
- alias: pbShutdownV1
5959
pkg: github.com/arangodb/kube-arangodb/integrations/shutdown/v1/definition
60+
- alias: pbImplStorageV1
61+
pkg: github.com/arangodb/kube-arangodb/integrations/storage/v1
62+
- alias: pbImplStorageV1Shared
63+
pkg: github.com/arangodb/kube-arangodb/integrations/storage/v1/shared
64+
- alias: pbImplStorageV1SharedS3
65+
pkg: github.com/arangodb/kube-arangodb/integrations/storage/v1/shared/s3
66+
- alias: pbStorageV1
67+
pkg: github.com/arangodb/kube-arangodb/integrations/storage/v1/definition
6068
- alias: pbImplStorageV2
6169
pkg: github.com/arangodb/kube-arangodb/integrations/storage/v2
6270
- alias: pbImplStorageV2Shared

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
- (Maintenance) PropagationMode Enum docs
4242
- (Feature) Deprecate AF Mode
4343
- (Maintenance) Switch License to 2025
44+
- (Feature) Migrate Storage V1 to CE
4445

4546
## [1.2.43](https://github.com/arangodb/kube-arangodb/tree/1.2.43) (2024-10-14)
4647
- (Feature) ArangoRoute CRD

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Flags:
197197
--kubernetes.max-batch-size int Size of batch during objects read (default 256)
198198
--kubernetes.qps float32 Number of queries per second for k8s API (default 15)
199199
--log.format string Set log format. Allowed values: 'pretty', 'JSON'. If empty, default format is used (default "pretty")
200-
--log.level stringArray Set log levels in format <level> or <logger>=<level>. Possible loggers: action, agency, api-server, assertion, backup-operator, chaos-monkey, crd, deployment, deployment-ci, deployment-reconcile, deployment-replication, deployment-resilience, deployment-resources, deployment-storage, deployment-storage-pc, deployment-storage-service, generic-parent-operator, helm, http, inspector, integration-config-v1, integration-envoy-auth-v3, integration-scheduler-v2, integration-storage-v2, integrations, k8s-client, kubernetes-informer, monitor, networking-route-operator, operator, operator-arangojob-handler, operator-v2, operator-v2-event, operator-v2-worker, panics, platform-chart-operator, platform-pod-shutdown, platform-storage-operator, pod_compare, root, root-event-recorder, scheduler-batchjob-operator, scheduler-cronjob-operator, scheduler-deployment-operator, scheduler-pod-operator, scheduler-profile-operator, server, server-authentication, webhook (default [info])
200+
--log.level stringArray Set log levels in format <level> or <logger>=<level>. Possible loggers: action, agency, api-server, assertion, backup-operator, chaos-monkey, crd, deployment, deployment-ci, deployment-reconcile, deployment-replication, deployment-resilience, deployment-resources, deployment-storage, deployment-storage-pc, deployment-storage-service, generic-parent-operator, helm, http, inspector, integration-config-v1, integration-envoy-auth-v3, integration-scheduler-v2, integration-storage-v1-s3, integration-storage-v2, integrations, k8s-client, kubernetes-informer, monitor, networking-route-operator, operator, operator-arangojob-handler, operator-v2, operator-v2-event, operator-v2-worker, panics, platform-chart-operator, platform-pod-shutdown, platform-storage-operator, pod_compare, root, root-event-recorder, scheduler-batchjob-operator, scheduler-cronjob-operator, scheduler-deployment-operator, scheduler-pod-operator, scheduler-profile-operator, server, server-authentication, webhook (default [info])
201201
--log.sampling If true, operator will try to minimize duplication of logging events (default true)
202202
--memory-limit uint Define memory limit for hard shutdown and the dump of goroutines. Used for testing
203203
--metrics.excluded-prefixes stringArray List of the excluded metrics prefixes

docs/cli/arangodb_operator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Flags:
8282
--kubernetes.max-batch-size int Size of batch during objects read (default 256)
8383
--kubernetes.qps float32 Number of queries per second for k8s API (default 15)
8484
--log.format string Set log format. Allowed values: 'pretty', 'JSON'. If empty, default format is used (default "pretty")
85-
--log.level stringArray Set log levels in format <level> or <logger>=<level>. Possible loggers: action, agency, api-server, assertion, backup-operator, chaos-monkey, crd, deployment, deployment-ci, deployment-reconcile, deployment-replication, deployment-resilience, deployment-resources, deployment-storage, deployment-storage-pc, deployment-storage-service, generic-parent-operator, helm, http, inspector, integration-config-v1, integration-envoy-auth-v3, integration-scheduler-v2, integration-storage-v2, integrations, k8s-client, kubernetes-informer, monitor, networking-route-operator, operator, operator-arangojob-handler, operator-v2, operator-v2-event, operator-v2-worker, panics, platform-chart-operator, platform-pod-shutdown, platform-storage-operator, pod_compare, root, root-event-recorder, scheduler-batchjob-operator, scheduler-cronjob-operator, scheduler-deployment-operator, scheduler-pod-operator, scheduler-profile-operator, server, server-authentication, webhook (default [info])
85+
--log.level stringArray Set log levels in format <level> or <logger>=<level>. Possible loggers: action, agency, api-server, assertion, backup-operator, chaos-monkey, crd, deployment, deployment-ci, deployment-reconcile, deployment-replication, deployment-resilience, deployment-resources, deployment-storage, deployment-storage-pc, deployment-storage-service, generic-parent-operator, helm, http, inspector, integration-config-v1, integration-envoy-auth-v3, integration-scheduler-v2, integration-storage-v1-s3, integration-storage-v2, integrations, k8s-client, kubernetes-informer, monitor, networking-route-operator, operator, operator-arangojob-handler, operator-v2, operator-v2-event, operator-v2-worker, panics, platform-chart-operator, platform-pod-shutdown, platform-storage-operator, pod_compare, root, root-event-recorder, scheduler-batchjob-operator, scheduler-cronjob-operator, scheduler-deployment-operator, scheduler-pod-operator, scheduler-profile-operator, server, server-authentication, webhook (default [info])
8686
--log.sampling If true, operator will try to minimize duplication of logging events (default true)
8787
--memory-limit uint Define memory limit for hard shutdown and the dump of goroutines. Used for testing
8888
--metrics.excluded-prefixes stringArray List of the excluded metrics prefixes

go.mod

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/arangodb/kube-arangodb
22

3-
go 1.22.0
4-
5-
toolchain go1.22.7
3+
go 1.22.7
64

75
replace (
86
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring => github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.71.2
@@ -55,14 +53,14 @@ require (
5553
github.com/rs/zerolog v1.19.0
5654
github.com/spf13/cobra v1.8.1
5755
github.com/spf13/pflag v1.0.5
58-
github.com/stretchr/testify v1.9.0
56+
github.com/stretchr/testify v1.10.0
5957
golang.org/x/sync v0.10.0
6058
golang.org/x/sys v0.28.0
6159
golang.org/x/text v0.21.0
6260
golang.org/x/time v0.5.0
63-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094
64-
google.golang.org/grpc v1.65.0
65-
google.golang.org/protobuf v1.34.2
61+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241113202542-65e8d215514f
62+
google.golang.org/grpc v1.68.0
63+
google.golang.org/protobuf v1.35.2
6664
gopkg.in/yaml.v3 v3.0.1
6765
k8s.io/api v0.31.2
6866
k8s.io/apiextensions-apiserver v0.31.2
@@ -74,13 +72,15 @@ require (
7472

7573
require (
7674
github.com/Masterminds/semver/v3 v3.3.0
75+
github.com/arangodb-managed/apis v0.89.1
76+
github.com/arangodb-managed/integration-apis v0.2.1
7777
github.com/aws/aws-sdk-go v1.55.5
7878
github.com/jedib0t/go-pretty/v6 v6.6.5
7979
helm.sh/helm/v3 v3.16.2
8080
)
8181

8282
require (
83-
cel.dev/expr v0.15.0 // indirect
83+
cel.dev/expr v0.16.1 // indirect
8484
dario.cat/mergo v1.0.1 // indirect
8585
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
8686
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
@@ -100,7 +100,7 @@ require (
100100
github.com/cespare/xxhash/v2 v2.3.0 // indirect
101101
github.com/chai2010/gettext-go v1.0.2 // indirect
102102
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
103-
github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b // indirect
103+
github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 // indirect
104104
github.com/containerd/containerd v1.7.12 // indirect
105105
github.com/containerd/log v0.1.0 // indirect
106106
github.com/cyphar/filepath-securejoin v0.3.1 // indirect
@@ -208,10 +208,10 @@ require (
208208
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
209209
golang.org/x/arch v0.3.0 // indirect
210210
golang.org/x/crypto v0.31.0 // indirect
211-
golang.org/x/net v0.26.0 // indirect
212-
golang.org/x/oauth2 v0.21.0 // indirect
211+
golang.org/x/net v0.31.0 // indirect
212+
golang.org/x/oauth2 v0.23.0 // indirect
213213
golang.org/x/term v0.27.0 // indirect
214-
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
214+
google.golang.org/genproto/googleapis/api v0.0.0-20241113202542-65e8d215514f // indirect
215215
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
216216
gopkg.in/inf.v0 v0.9.1 // indirect
217217
gopkg.in/yaml.v2 v2.4.0 // indirect

go.sum

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
cel.dev/expr v0.15.0 h1:O1jzfJCQBfL5BFoYktaxwIhuttaQPsVWerH9/EEKx0w=
22
cel.dev/expr v0.15.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg=
3+
cel.dev/expr v0.16.1 h1:NR0+oFYzR1CqLFhTAqg3ql59G9VfN8fKq1TCHJ6gq1g=
4+
cel.dev/expr v0.16.1/go.mod h1:AsGA5zb3WruAEQeQng1RZdGEXmBj0jvMWh6l5SnNuC8=
35
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
46
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
57
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
@@ -813,8 +815,12 @@ github.com/arangodb-helper/go-helper v0.4.2/go.mod h1:RHgEwQTFWdJ9wFDGUCgUZzaz9N
813815
github.com/arangodb-managed/apis v0.83.3/go.mod h1:ZlvA803MmUI3m6ijvaAYKKaWgLJq8bBZZuq8uyZo2PY=
814816
github.com/arangodb-managed/apis v0.85.0 h1:kttOyVZ8nTlEn7zkaUsKuPoFu3KcBPvoTx9TT8EsjIo=
815817
github.com/arangodb-managed/apis v0.85.0/go.mod h1:ZlvA803MmUI3m6ijvaAYKKaWgLJq8bBZZuq8uyZo2PY=
818+
github.com/arangodb-managed/apis v0.89.1 h1:qFzMhkV7Di5VfR2tZmWKMYAViCKho52Y5XCXH/iML9o=
819+
github.com/arangodb-managed/apis v0.89.1/go.mod h1:NqGYEs2tPU9ZEC+2N1kYR8mvkeA3oQ2FAxgvX6rJLIw=
816820
github.com/arangodb-managed/integration-apis v0.1.1 h1:M/+STV2XCjCSc7BtVY+c8fyIKrjLCvPAFknFyuRQxac=
817821
github.com/arangodb-managed/integration-apis v0.1.1/go.mod h1:U+dREXyJPDt6gEOLlHbA+yqZJMVYs7I6uKAdOb1lT6c=
822+
github.com/arangodb-managed/integration-apis v0.2.1 h1:/crCuhBCIIvx+r+RC3cMJ7Mo5FHDjclcwf5ENqUpTcY=
823+
github.com/arangodb-managed/integration-apis v0.2.1/go.mod h1:yMK28s6LsYk7j0NfmuutYRSJI47iCcTTNWXmYGmi1h8=
818824
github.com/arangodb/arangosync-client v0.9.0 h1:XhY+5gGGpl9Gk8Prqmdv0SpK3HydFUXvN2CmTIKUxKI=
819825
github.com/arangodb/arangosync-client v0.9.0/go.mod h1:kU2UaOkv2AeHLAFMEo4Ug3qLbUQVKOuRtkfr6pZqmuk=
820826
github.com/arangodb/go-agency-helper v0.4.1 h1:p/lbjz0ludEw30ig/Dv+lueZAIHIsTmXp/HQm5t5F94=
@@ -899,6 +905,8 @@ github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWH
899905
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
900906
github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b h1:ga8SEFjZ60pxLcmhnThWgvH2wg8376yUJmPhEH4H3kw=
901907
github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8=
908+
github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 h1:QVw89YDxXxEe+l8gU8ETbOasdwEV+avkR75ZzsVV9WI=
909+
github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8=
902910
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
903911
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=
904912
github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0=
@@ -1740,6 +1748,8 @@ golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
17401748
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
17411749
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
17421750
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
1751+
golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo=
1752+
golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM=
17431753
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
17441754
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
17451755
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1774,6 +1784,8 @@ golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE
17741784
golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk=
17751785
golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
17761786
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
1787+
golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
1788+
golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
17771789
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
17781790
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
17791791
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -2248,6 +2260,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.
22482260
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=
22492261
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw=
22502262
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU=
2263+
google.golang.org/genproto/googleapis/api v0.0.0-20241113202542-65e8d215514f h1:M65LEviCfuZTfrfzwwEoxVtgvfkFkBUbFnRbxCXuXhU=
2264+
google.golang.org/genproto/googleapis/api v0.0.0-20241113202542-65e8d215514f/go.mod h1:Yo94eF2nj7igQt+TiJ49KxjIH8ndLYPZMIRSiRcEbg0=
22512265
google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA=
22522266
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc=
22532267
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA=
@@ -2260,6 +2274,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.
22602274
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
22612275
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA=
22622276
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
2277+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241113202542-65e8d215514f h1:C1QccEa9kUwvMgEUORqQD9S17QesQijxjZ84sO82mfo=
2278+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241113202542-65e8d215514f/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
22632279
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
22642280
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
22652281
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -2307,6 +2323,8 @@ google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt
23072323
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
23082324
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
23092325
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
2326+
google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0=
2327+
google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA=
23102328
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
23112329
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
23122330
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
@@ -2328,6 +2346,8 @@ google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
23282346
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
23292347
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
23302348
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
2349+
google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io=
2350+
google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
23312351
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
23322352
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
23332353
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// DISCLAIMER
33
//
4-
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
4+
// Copyright 2025 ArangoDB GmbH, Cologne, Germany
55
//
66
// Licensed under the Apache License, Version 2.0 (the "License");
77
// you may not use this file except in compliance with the License.
@@ -18,31 +18,42 @@
1818
// Copyright holder is ArangoDB GmbH, Cologne, Germany
1919
//
2020

21-
package s3
21+
package v1
2222

23-
import "github.com/arangodb/kube-arangodb/pkg/util/errors"
23+
import (
24+
pbImplStorageV1SharedS3 "github.com/arangodb/kube-arangodb/integrations/storage/v1/shared/s3"
25+
)
26+
27+
type Mod func(c Configuration) Configuration
28+
29+
type ConfigurationType string
30+
31+
const (
32+
ConfigurationTypeS3 ConfigurationType = "s3"
33+
)
34+
35+
func NewConfiguration(mods ...Mod) Configuration {
36+
var cfg Configuration
37+
38+
return cfg.With(mods...)
39+
}
2440

2541
type Configuration struct {
26-
Endpoint string
27-
AllowInsecure bool
28-
CACrtFile string
29-
CAKeyFile string
30-
DisableSSL bool
31-
Region string
32-
BucketName string
33-
AccessKeyFile string // path to file containing S3 AccessKey
34-
SecretKeyFile string // path to file containing S3 SecretKey
42+
Type ConfigurationType
43+
44+
S3 pbImplStorageV1SharedS3.Configuration
3545
}
3646

3747
func (c Configuration) Validate() error {
38-
if c.AccessKeyFile == "" {
39-
return errors.Errorf("AccessKeyFile is not defined")
40-
}
41-
if c.SecretKeyFile == "" {
42-
return errors.Errorf("SecretKeyFile is not defined")
43-
}
44-
if c.Endpoint == "" {
45-
return errors.Errorf("Endpoint is not defined")
46-
}
4748
return nil
4849
}
50+
51+
func (c Configuration) With(mods ...Mod) Configuration {
52+
n := c
53+
54+
for _, mod := range mods {
55+
n = mod(n)
56+
}
57+
58+
return n
59+
}

pkg/ml/storage/consts.go renamed to integrations/storage/v1/definition/consts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// DISCLAIMER
33
//
4-
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
4+
// Copyright 2025 ArangoDB GmbH, Cologne, Germany
55
//
66
// Licensed under the Apache License, Version 2.0 (the "License");
77
// you may not use this file except in compliance with the License.
@@ -18,6 +18,6 @@
1818
// Copyright holder is ArangoDB GmbH, Cologne, Germany
1919
//
2020

21-
package storage
21+
package definition
2222

2323
const Name = "storage.v1"

0 commit comments

Comments
 (0)