Skip to content

Commit 3e41ba0

Browse files
authored
[Feature] [Platform] MetaV1 Integration Service (#1912)
1 parent 92d44f8 commit 3e41ba0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1857
-268
lines changed

.golangci.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ linters-settings:
3333
importas:
3434
no-unaliased: true
3535
alias:
36+
- alias: pbImplMetaV1
37+
pkg: github.com/arangodb/kube-arangodb/integrations/meta/v1
38+
- alias: pbMetaV1
39+
pkg: github.com/arangodb/kube-arangodb/integrations/meta/v1/definition
3640
- alias: pbImplAuthenticationV1
3741
pkg: github.com/arangodb/kube-arangodb/integrations/authentication/v1
3842
- alias: pbAuthenticationV1
@@ -133,6 +137,14 @@ linters-settings:
133137
pkg: github.com/arangodb/kube-arangodb/pkg/apis/shared
134138
- alias: sharedApi
135139
pkg: github.com/arangodb/kube-arangodb/pkg/apis/shared/v1
140+
- alias: integrationsShared
141+
pkg: github.com/arangodb/kube-arangodb/pkg/integrations/shared
142+
- alias: integrationsClients
143+
pkg: github.com/arangodb/kube-arangodb/pkg/integrations/clients
144+
- alias: integrationsSidecar
145+
pkg: github.com/arangodb/kube-arangodb/pkg/integrations/sidecar
146+
- alias: integrations
147+
pkg: github.com/arangodb/kube-arangodb/pkg/integrations
136148
- alias: sharedReconcile
137149
pkg: github.com/arangodb/kube-arangodb/pkg/deployment/reconcile/shared
138150
- alias: analyticsShared

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Change Log
22

33
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
4+
- (Feature) (Platform) MetaV1 Integration Service
45

56
## [1.2.49](https://github.com/arangodb/kube-arangodb/tree/1.2.49) (2025-06-17)
67
- (Maintenance) Optimize go.mod

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,4 +1056,8 @@ sync: sync-charts
10561056
ci-check:
10571057
@$(MAKE) tidy vendor generate update-generated synchronize-v2alpha1-with-v1 sync fmt yamlfmt license protolint
10581058
@git checkout -- go.sum # ignore changes in go.sum
1059-
@if [ ! -z "$$(git status --porcelain)" ]; then echo "There are uncommited changes!"; git status; exit 1; fi
1059+
@if [ ! -z "$$(git status --porcelain)" ]; then echo "There are uncommited changes!"; git status; exit 1; fi
1060+
1061+
.PHONY: reset
1062+
reset:
1063+
@git checkout origin/master -- go.mod go.sum

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,12 @@ Flags:
199199
--image.discovery.status Discover Operator Image from Pod Status by default. When disabled Pod Spec is used. (default true)
200200
--image.discovery.timeout duration Timeout for image discovery process (default 1m0s)
201201
--internal.scaling-integration Enable Scaling Integration
202-
--kubernetes.burst int Burst for the k8s API (default 64)
202+
--kubernetes.burst int Burst for the k8s API (default 256)
203203
--kubernetes.max-batch-size int Size of batch during objects read (default 256)
204204
--kubernetes.qps float32 Number of queries per second for k8s API (default 32)
205205
--leader.label.skip Skips Leader Label for the Pod
206206
--log.format string Set log format. Allowed values: 'pretty', 'JSON'. If empty, default format is used (default "pretty")
207-
--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-authn-v1, integration-config-v1, integration-envoy-auth-v3, integration-envoy-auth-v3-impl-auth-bearer, integration-envoy-auth-v3-impl-auth-cookie, integration-envoy-auth-v3-impl-custom-openid, integration-envoy-auth-v3-impl-pass-mode, integration-scheduler-v2, integration-storage-v1-s3, integration-storage-v2, integrations, k8s-client, kubernetes, kubernetes-access, kubernetes-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])
207+
--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-authn-v1, integration-config-v1, integration-envoy-auth-v3, integration-envoy-auth-v3-impl-auth-bearer, integration-envoy-auth-v3-impl-auth-cookie, integration-envoy-auth-v3-impl-custom-openid, integration-envoy-auth-v3-impl-pass-mode, integration-meta-v1, integration-scheduler-v2, integration-storage-v1-s3, integration-storage-v2, integrations, k8s-client, kubernetes, kubernetes-access, kubernetes-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])
208208
--log.sampling If true, operator will try to minimize duplication of logging events (default true)
209209
--log.stdout If true, operator will log to the stdout (default true)
210210
--memory-limit uint Define memory limit for hard shutdown and the dump of goroutines. Used for testing

cmd/integration.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 2024-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.
@@ -23,7 +23,7 @@ package cmd
2323
import (
2424
"github.com/spf13/cobra"
2525

26-
"github.com/arangodb/kube-arangodb/pkg/integrations"
26+
integrations "github.com/arangodb/kube-arangodb/pkg/integrations"
2727
)
2828

2929
func init() {

cmd/integration/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/spf13/cobra"
2727
flag "github.com/spf13/pflag"
2828

29-
"github.com/arangodb/kube-arangodb/pkg/integrations"
29+
integrations "github.com/arangodb/kube-arangodb/pkg/integrations"
3030
"github.com/arangodb/kube-arangodb/pkg/util/cli"
3131
)
3232

docs/cli/arangodb_operator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ Flags:
8181
--image.discovery.status Discover Operator Image from Pod Status by default. When disabled Pod Spec is used. (default true)
8282
--image.discovery.timeout duration Timeout for image discovery process (default 1m0s)
8383
--internal.scaling-integration Enable Scaling Integration
84-
--kubernetes.burst int Burst for the k8s API (default 64)
84+
--kubernetes.burst int Burst for the k8s API (default 256)
8585
--kubernetes.max-batch-size int Size of batch during objects read (default 256)
8686
--kubernetes.qps float32 Number of queries per second for k8s API (default 32)
8787
--leader.label.skip Skips Leader Label for the Pod
8888
--log.format string Set log format. Allowed values: 'pretty', 'JSON'. If empty, default format is used (default "pretty")
89-
--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-authn-v1, integration-config-v1, integration-envoy-auth-v3, integration-envoy-auth-v3-impl-auth-bearer, integration-envoy-auth-v3-impl-auth-cookie, integration-envoy-auth-v3-impl-custom-openid, integration-envoy-auth-v3-impl-pass-mode, integration-scheduler-v2, integration-storage-v1-s3, integration-storage-v2, integrations, k8s-client, kubernetes, kubernetes-access, kubernetes-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])
89+
--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-authn-v1, integration-config-v1, integration-envoy-auth-v3, integration-envoy-auth-v3-impl-auth-bearer, integration-envoy-auth-v3-impl-auth-cookie, integration-envoy-auth-v3-impl-custom-openid, integration-envoy-auth-v3-impl-pass-mode, integration-meta-v1, integration-scheduler-v2, integration-storage-v1-s3, integration-storage-v2, integrations, k8s-client, kubernetes, kubernetes-access, kubernetes-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])
9090
--log.sampling If true, operator will try to minimize duplication of logging events (default true)
9191
--log.stdout If true, operator will log to the stdout (default true)
9292
--memory-limit uint Define memory limit for hard shutdown and the dump of goroutines. Used for testing

docs/cli/arangodb_operator_integration.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Flags:
2121
--database.endpoint string Endpoint of ArangoDB (Env: DATABASE_ENDPOINT) (default "localhost")
2222
--database.port int Port of ArangoDB (Env: DATABASE_PORT) (default 8529)
2323
--database.proto string Proto of the ArangoDB endpoint (Env: DATABASE_PROTO) (default "http")
24+
--database.rf int ArangoDB ReplicationFactor (Env: DATABASE_RF) (default 1)
25+
--database.wc int ArangoDB WriteConcern (Env: DATABASE_WC) (default 1)
2426
--health.address string Address to expose health service (Env: HEALTH_ADDRESS) (default "0.0.0.0:9091")
2527
--health.auth.token string Token for health service (when auth service is token) (Env: HEALTH_AUTH_TOKEN)
2628
--health.auth.type string Auth type for health service (Env: HEALTH_AUTH_TYPE) (default "None")
@@ -55,6 +57,11 @@ Flags:
5557
--integration.envoy.auth.v3.extensions.users.create Defines if UserCreation extension is enabled (Env: INTEGRATION_ENVOY_AUTH_V3_EXTENSIONS_USERS_CREATE)
5658
--integration.envoy.auth.v3.external Defines if External access to service envoy.auth.v3 is enabled (Env: INTEGRATION_ENVOY_AUTH_V3_EXTERNAL)
5759
--integration.envoy.auth.v3.internal Defines if Internal access to service envoy.auth.v3 is enabled (Env: INTEGRATION_ENVOY_AUTH_V3_INTERNAL) (default true)
60+
--integration.meta.v1 Enable MetaV1 Integration Service (Env: INTEGRATION_META_V1)
61+
--integration.meta.v1.external Defines if External access to service meta.v1 is enabled (Env: INTEGRATION_META_V1_EXTERNAL)
62+
--integration.meta.v1.internal Defines if Internal access to service meta.v1 is enabled (Env: INTEGRATION_META_V1_INTERNAL) (default true)
63+
--integration.meta.v1.prefix string Meta Key Prefix (Env: INTEGRATION_META_V1_PREFIX)
64+
--integration.meta.v1.ttl duration Cache Object TTL (Env: INTEGRATION_META_V1_TTL)
5865
--integration.scheduler.v1 SchedulerV1 Integration (Env: INTEGRATION_SCHEDULER_V1)
5966
--integration.scheduler.v1.external Defines if External access to service scheduler.v1 is enabled (Env: INTEGRATION_SCHEDULER_V1_EXTERNAL)
6067
--integration.scheduler.v1.internal Defines if Internal access to service scheduler.v1 is enabled (Env: INTEGRATION_SCHEDULER_V1_INTERNAL) (default true)

docs/integration-sidecar.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ metadata:
123123
integration.profiles.arangodb.com/shutdown: v1
124124
```
125125
126+
#### [Meta V1](./integration/meta.v1.md)
127+
128+
Meta Integration Sidecar
129+
130+
To enable:
131+
132+
```yaml
133+
metadata:
134+
labels:
135+
integration.profiles.arangodb.com/meta: v1
136+
```
137+
126138
### Envs
127139
128140
#### INTEGRATION_API_ADDRESS

docs/integration/authentication.v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ parent: Integration Sidecars
99

1010
Definitions:
1111

12-
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.44/integrations/authentication/v1/definition/definition.proto)
12+
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.49/integrations/authentication/v1/definition/definition.proto)

docs/integration/authorization.v0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ parent: Integration Sidecars
99

1010
Definitions:
1111

12-
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.44/integrations/authorization/v0/definition/definition.proto)
12+
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.49/integrations/authorization/v0/definition/definition.proto)
1313

docs/integration/meta.v1.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
layout: page
3+
title: Integration Sidecar Meta V1
4+
grand_parent: ArangoDBPlatform
5+
parent: Integration Sidecars
6+
---
7+
8+
# Meta V1
9+
10+
Definitions:
11+
12+
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.49/integrations/meta/v1/definition/definition.proto)

docs/integration/scheduler.v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ parent: Integration Sidecars
99

1010
Definitions:
1111

12-
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.44/integrations/scheduler/v1/definition/definition.proto)
12+
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.49/integrations/scheduler/v1/definition/definition.proto)
1313

docs/integration/scheduler.v2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ parent: Integration Sidecars
99

1010
Definitions:
1111

12-
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.44/integrations/scheduler/v2/definition/definition.proto)
12+
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.49/integrations/scheduler/v2/definition/definition.proto)
1313

docs/integration/shutdown.v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ parent: Integration Sidecars
99

1010
Definitions:
1111

12-
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.44/integrations/shutdown/v1/definition/shutdown.proto)
12+
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.49/integrations/shutdown/v1/definition/shutdown.proto)
1313

1414
Operator will send shutdown request once all containers marked with annotation are stopped.
1515

docs/integration/storage.v2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ parent: Integration Sidecars
99

1010
Definitions:
1111

12-
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.44/integrations/storage/v2/definition/storage.proto)
12+
- [Service](https://github.com/arangodb/kube-arangodb/blob/1.2.49/integrations/storage/v2/definition/storage.proto)
1313

go.mod

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ require (
9999
github.com/Masterminds/goutils v1.1.1 // indirect
100100
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
101101
github.com/Masterminds/squirrel v1.5.4 // indirect
102-
github.com/arangodb/go-agency-helper v0.4.1 // indirect
103102
github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect
104-
// github.com/arangodb/rebalancer v0.1.1 // indirect
105103
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
106104
github.com/beorn7/perks v1.0.1 // indirect
107105
github.com/blang/semver/v4 v4.0.0 // indirect

integrations/authentication/v1/configuration.go

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ package v1
2323
import (
2424
"time"
2525

26+
integrationsShared "github.com/arangodb/kube-arangodb/pkg/integrations/shared"
27+
"github.com/arangodb/kube-arangodb/pkg/util"
2628
"github.com/arangodb/kube-arangodb/pkg/util/errors"
2729
"github.com/arangodb/kube-arangodb/pkg/util/strings"
2830
)
@@ -41,8 +43,6 @@ const (
4143
DefaultMaxTokenSize = 64
4244
)
4345

44-
type Mod func(c Configuration) Configuration
45-
4646
func NewConfiguration() Configuration {
4747
return Configuration{
4848
Enabled: true,
@@ -60,24 +60,17 @@ func NewConfiguration() Configuration {
6060
}
6161

6262
type Configuration struct {
63+
integrationsShared.Database
6364
Enabled bool
6465

6566
TTL time.Duration
6667

6768
Path string
6869

6970
Create Token
70-
71-
Database ConfigurationDatabase
72-
}
73-
74-
type ConfigurationDatabase struct {
75-
Proto string
76-
Endpoint string
77-
Port int
7871
}
7972

80-
func (c Configuration) With(mods ...Mod) Configuration {
73+
func (c Configuration) With(mods ...util.ModR[Configuration]) Configuration {
8174
n := c
8275

8376
for _, mod := range mods {

integrations/authentication/v1/definition/definition.pb.gw.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)