mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Feature] Integration PongV1 Service (#1709)
This commit is contained in:
parent
91793bce16
commit
88c5df2078
25 changed files with 1227 additions and 118 deletions
|
@ -103,6 +103,10 @@ linters-settings:
|
|||
alias: pbConfigV1
|
||||
- pkg: github.com/arangodb/kube-arangodb/integrations/config/v1
|
||||
alias: pbImplConfigV1
|
||||
- pkg: github.com/arangodb/kube-arangodb/integrations/pong/v1/definition
|
||||
alias: pbPongV1
|
||||
- pkg: github.com/arangodb/kube-arangodb/integrations/pong/v1
|
||||
alias: pbImplPongV1
|
||||
- pkg: github.com/arangodb/kube-arangodb/integrations/shared/v1/definition
|
||||
alias: pbSharedV1
|
||||
- pkg: github.com/arangodb/kube-arangodb/integrations/shared/v1
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
- (Feature) ConfigV1 Integration Service
|
||||
- (Feature) Integration Service Authentication
|
||||
- (Improvement) Better panic handling
|
||||
- (Feature) PongV1 Integration Service
|
||||
|
||||
## [1.2.42](https://github.com/arangodb/kube-arangodb/tree/1.2.42) (2024-07-23)
|
||||
- (Maintenance) Go 1.22.4 & Kubernetes 1.29.6 libraries
|
||||
|
|
2
Makefile
2
Makefile
|
@ -917,6 +917,6 @@ sync-charts:
|
|||
sync: sync-charts
|
||||
|
||||
ci-check:
|
||||
@$(MAKE) tidy vendor update-generated synchronize-v2alpha1-with-v1 generate-internal sync fmt yamlfmt license
|
||||
@$(MAKE) tidy vendor generate update-generated synchronize-v2alpha1-with-v1 sync fmt yamlfmt license
|
||||
@git checkout -- go.sum # ignore changes in go.sum
|
||||
@if [ ! -z "$(git status --porcelain)" ]; then echo "There are uncommited changes!"; git status; exit 1; fi
|
|
@ -182,7 +182,7 @@ Flags:
|
|||
--kubernetes.max-batch-size int Size of batch during objects read (default 256)
|
||||
--kubernetes.qps float32 Number of queries per second for k8s API (default 15)
|
||||
--log.format string Set log format. Allowed values: 'pretty', 'JSON'. If empty, default format is used (default "pretty")
|
||||
--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, http, inspector, integration-config-v1, integrations, k8s-client, monitor, networking-route-operator, operator, operator-arangojob-handler, operator-v2, operator-v2-event, operator-v2-worker, panics, pod_compare, root, root-event-recorder, server, server-authentication (default [info])
|
||||
--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, http, inspector, integration-config-v1, integrations, k8s-client, kubernetes-informer, monitor, networking-route-operator, operator, operator-arangojob-handler, operator-v2, operator-v2-event, operator-v2-worker, panics, pod_compare, root, root-event-recorder, server, server-authentication (default [info])
|
||||
--log.sampling If true, operator will try to minimize duplication of logging events (default true)
|
||||
--memory-limit uint Define memory limit for hard shutdown and the dump of goroutines. Used for testing
|
||||
--metrics.excluded-prefixes stringArray List of the excluded metrics prefixes
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany
|
||||
// Copyright 2016-2024 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -29,11 +29,15 @@ import (
|
|||
|
||||
var (
|
||||
cmdOps = cobra.Command{
|
||||
Use: "arangodb_ops",
|
||||
Use: "arangodb_operator_ops",
|
||||
Run: executeUsage,
|
||||
}
|
||||
)
|
||||
|
||||
func CommandOps() *cobra.Command {
|
||||
return &cmdOps
|
||||
}
|
||||
|
||||
func ExecuteOps() int {
|
||||
flag.CommandLine.AddGoFlagSet(goflag.CommandLine)
|
||||
|
||||
|
|
60
cmd/integration/init.go
Normal file
60
cmd/integration/init.go
Normal file
|
@ -0,0 +1,60 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package integration
|
||||
|
||||
import (
|
||||
goflag "flag"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
flag "github.com/spf13/pflag"
|
||||
|
||||
"github.com/arangodb/kube-arangodb/pkg/integrations"
|
||||
)
|
||||
|
||||
var (
|
||||
cmd = cobra.Command{
|
||||
Use: "arangodb_operator_integration",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return cmd.Usage()
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
if err := integrations.Register(&cmd); err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
flag.CommandLine.AddGoFlagSet(goflag.CommandLine)
|
||||
}
|
||||
|
||||
func Command() *cobra.Command {
|
||||
return &cmd
|
||||
}
|
||||
|
||||
func Execute() int {
|
||||
flag.CommandLine.AddGoFlagSet(goflag.CommandLine)
|
||||
|
||||
if err := cmd.Execute(); err != nil {
|
||||
return 1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
|
@ -21,40 +21,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
goflag "flag"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
flag "github.com/spf13/pflag"
|
||||
|
||||
"github.com/arangodb/kube-arangodb/pkg/integrations"
|
||||
"github.com/arangodb/kube-arangodb/cmd/integration"
|
||||
)
|
||||
|
||||
var (
|
||||
cmd = cobra.Command{
|
||||
Use: "arangodb_int",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return cmd.Usage()
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
if err := integrations.Register(&cmd); err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
func Execute() int {
|
||||
flag.CommandLine.AddGoFlagSet(goflag.CommandLine)
|
||||
|
||||
if err := cmd.Execute(); err != nil {
|
||||
return 1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func main() {
|
||||
os.Exit(Execute())
|
||||
os.Exit(integration.Execute())
|
||||
}
|
||||
|
|
|
@ -3043,9 +3043,15 @@ Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.
|
|||
|
||||
***
|
||||
|
||||
### .spec.gateway.enabled
|
||||
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/deployment_spec_gateway.go#L24)</sup>
|
||||
|
||||
***
|
||||
|
||||
### .spec.gateways.affinity
|
||||
|
||||
Type: `core.PodAffinity` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L185)</sup>
|
||||
Type: `core.PodAffinity` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L156)</sup>
|
||||
|
||||
Affinity specified additional affinity settings in ArangoDB Pod definitions
|
||||
|
||||
|
@ -3056,7 +3062,7 @@ Links:
|
|||
|
||||
### .spec.gateways.allowMemberRecreation
|
||||
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L227)</sup>
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L198)</sup>
|
||||
|
||||
AllowMemberRecreation allows to recreate member.
|
||||
This setting changes the member recreation logic based on group:
|
||||
|
@ -3067,7 +3073,7 @@ This setting changes the member recreation logic based on group:
|
|||
|
||||
### .spec.gateways.annotations
|
||||
|
||||
Type: `object` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L128)</sup>
|
||||
Type: `object` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L99)</sup>
|
||||
|
||||
Annotations specified the annotations added to Pods in this group.
|
||||
Annotations are merged with `spec.annotations`.
|
||||
|
@ -3076,7 +3082,7 @@ Annotations are merged with `spec.annotations`.
|
|||
|
||||
### .spec.gateways.annotationsIgnoreList
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L130)</sup>
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L101)</sup>
|
||||
|
||||
AnnotationsIgnoreList list regexp or plain definitions which annotations should be ignored
|
||||
|
||||
|
@ -3084,7 +3090,7 @@ AnnotationsIgnoreList list regexp or plain definitions which annotations should
|
|||
|
||||
### .spec.gateways.annotationsMode
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L132)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L103)</sup>
|
||||
|
||||
AnnotationsMode Define annotations mode which should be use while overriding annotations
|
||||
|
||||
|
@ -3092,7 +3098,7 @@ AnnotationsMode Define annotations mode which should be use while overriding ann
|
|||
|
||||
### .spec.gateways.antiAffinity
|
||||
|
||||
Type: `core.PodAntiAffinity` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L181)</sup>
|
||||
Type: `core.PodAntiAffinity` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L152)</sup>
|
||||
|
||||
AntiAffinity specified additional antiAffinity settings in ArangoDB Pod definitions
|
||||
|
||||
|
@ -3103,7 +3109,7 @@ Links:
|
|||
|
||||
### .spec.gateways.args
|
||||
|
||||
Type: `[]string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L86)</sup>
|
||||
Type: `[]string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L57)</sup>
|
||||
|
||||
Args setting specifies additional command-line arguments passed to all servers of this group.
|
||||
|
||||
|
@ -3113,7 +3119,7 @@ Default Value: `[]`
|
|||
|
||||
### .spec.gateways.count
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L78)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L49)</sup>
|
||||
|
||||
Count setting specifies the number of servers to start for the given group.
|
||||
For the Agent group, this value must be a positive, odd number.
|
||||
|
@ -3126,7 +3132,7 @@ as for the `dbservers` group.
|
|||
|
||||
### .spec.gateways.entrypoint
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L88)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L59)</sup>
|
||||
|
||||
Entrypoint overrides container executable
|
||||
|
||||
|
@ -3168,7 +3174,7 @@ Links:
|
|||
|
||||
### .spec.gateways.exporterPort
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L240)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L211)</sup>
|
||||
|
||||
ExporterPort define Port used by exporter
|
||||
|
||||
|
@ -3176,7 +3182,7 @@ ExporterPort define Port used by exporter
|
|||
|
||||
### .spec.gateways.extendedRotationCheck
|
||||
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L210)</sup>
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L181)</sup>
|
||||
|
||||
ExtendedRotationCheck extend checks for rotation
|
||||
|
||||
|
@ -3184,7 +3190,7 @@ ExtendedRotationCheck extend checks for rotation
|
|||
|
||||
### .spec.gateways.externalPortEnabled
|
||||
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L222)</sup>
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L193)</sup>
|
||||
|
||||
ExternalPortEnabled if external port should be enabled. If is set to false, ports needs to be exposed via sidecar. Only for ArangoD members
|
||||
|
||||
|
@ -3192,7 +3198,7 @@ ExternalPortEnabled if external port should be enabled. If is set to false, port
|
|||
|
||||
### .spec.gateways.indexMethod
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L233)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L204)</sup>
|
||||
|
||||
IndexMethod define group Indexing method
|
||||
|
||||
|
@ -3223,7 +3229,7 @@ Mode keep container replace mode
|
|||
|
||||
### .spec.gateways.internalPort
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L218)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L189)</sup>
|
||||
|
||||
InternalPort define port used in internal communication, can be accessed over localhost via sidecar. Only for ArangoD members
|
||||
|
||||
|
@ -3231,7 +3237,7 @@ InternalPort define port used in internal communication, can be accessed over lo
|
|||
|
||||
### .spec.gateways.internalPortProtocol
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L220)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L191)</sup>
|
||||
|
||||
InternalPortProtocol define protocol of port used in internal communication, can be accessed over localhost via sidecar. Only for ArangoD members
|
||||
|
||||
|
@ -3239,7 +3245,7 @@ InternalPortProtocol define protocol of port used in internal communication, can
|
|||
|
||||
### .spec.gateways.labels
|
||||
|
||||
Type: `object` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L134)</sup>
|
||||
Type: `object` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L105)</sup>
|
||||
|
||||
Labels specified the labels added to Pods in this group.
|
||||
|
||||
|
@ -3247,7 +3253,7 @@ Labels specified the labels added to Pods in this group.
|
|||
|
||||
### .spec.gateways.labelsIgnoreList
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L136)</sup>
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L107)</sup>
|
||||
|
||||
LabelsIgnoreList list regexp or plain definitions which labels should be ignored
|
||||
|
||||
|
@ -3255,7 +3261,7 @@ LabelsIgnoreList list regexp or plain definitions which labels should be ignored
|
|||
|
||||
### .spec.gateways.labelsMode
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L138)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L109)</sup>
|
||||
|
||||
LabelsMode Define labels mode which should be use while overriding labels
|
||||
|
||||
|
@ -3263,7 +3269,7 @@ LabelsMode Define labels mode which should be use while overriding labels
|
|||
|
||||
### .spec.gateways.maxCount
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L82)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L53)</sup>
|
||||
|
||||
MaxCount specifies a maximum for the count of servers. If set, a specification is invalid if `count > maxCount`.
|
||||
|
||||
|
@ -3271,7 +3277,7 @@ MaxCount specifies a maximum for the count of servers. If set, a specification i
|
|||
|
||||
### .spec.gateways.memoryReservation
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L110)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L81)</sup>
|
||||
|
||||
MemoryReservation determines the system reservation of memory while calculating `ARANGODB_OVERRIDE_DETECTED_TOTAL_MEMORY` value.
|
||||
If this field is set, `ARANGODB_OVERRIDE_DETECTED_TOTAL_MEMORY` is reduced by a specified value in percent.
|
||||
|
@ -3286,7 +3292,7 @@ Default Value: `0`
|
|||
|
||||
### .spec.gateways.minCount
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L80)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L51)</sup>
|
||||
|
||||
MinCount specifies a minimum for the count of servers. If set, a specification is invalid if `count < minCount`.
|
||||
|
||||
|
@ -3294,7 +3300,7 @@ MinCount specifies a minimum for the count of servers. If set, a specification i
|
|||
|
||||
### .spec.gateways.nodeAffinity
|
||||
|
||||
Type: `core.NodeAffinity` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L189)</sup>
|
||||
Type: `core.NodeAffinity` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L160)</sup>
|
||||
|
||||
NodeAffinity specified additional nodeAffinity settings in ArangoDB Pod definitions
|
||||
|
||||
|
@ -3305,7 +3311,7 @@ Links:
|
|||
|
||||
### .spec.gateways.nodeSelector
|
||||
|
||||
Type: `map[string]string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L153)</sup>
|
||||
Type: `map[string]string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L124)</sup>
|
||||
|
||||
NodeSelector setting specifies a set of labels to be used as `nodeSelector` for Pods of this node.
|
||||
|
||||
|
@ -3346,7 +3352,7 @@ Default Value: `/usr/bin/numactl`
|
|||
|
||||
### .spec.gateways.overrideDetectedNumberOfCores
|
||||
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L116)</sup>
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L87)</sup>
|
||||
|
||||
> [!IMPORTANT]
|
||||
> **Values set by this feature override user-provided `ARANGODB_OVERRIDE_DETECTED_NUMBER_OF_CORES` Container Environment Variable**
|
||||
|
@ -3363,7 +3369,7 @@ Default Value: `true`
|
|||
|
||||
### .spec.gateways.overrideDetectedTotalMemory
|
||||
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L104)</sup>
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L75)</sup>
|
||||
|
||||
> [!IMPORTANT]
|
||||
> **Values set by this feature override user-provided `ARANGODB_OVERRIDE_DETECTED_TOTAL_MEMORY` Container Environment Variable**
|
||||
|
@ -3392,7 +3398,7 @@ Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2
|
|||
|
||||
### .spec.gateways.port
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L238)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L209)</sup>
|
||||
|
||||
Port define Port used by member
|
||||
|
||||
|
@ -3400,7 +3406,7 @@ Port define Port used by member
|
|||
|
||||
### .spec.gateways.priorityClassName
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L159)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L130)</sup>
|
||||
|
||||
PriorityClassName specifies a priority class name
|
||||
Will be forwarded to the pod spec.
|
||||
|
@ -3412,7 +3418,7 @@ Links:
|
|||
|
||||
### .spec.gateways.probes.livenessProbeDisabled
|
||||
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L250)</sup>
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L27)</sup>
|
||||
|
||||
LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
|
||||
|
||||
|
@ -3422,7 +3428,7 @@ Default Value: `false`
|
|||
|
||||
### .spec.gateways.probes.livenessProbeSpec.failureThreshold
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L300)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L77)</sup>
|
||||
|
||||
FailureThreshold when a Pod starts and the probe fails, Kubernetes will try failureThreshold times before giving up.
|
||||
Giving up means restarting the container.
|
||||
|
@ -3434,7 +3440,7 @@ Default Value: `3`
|
|||
|
||||
### .spec.gateways.probes.livenessProbeSpec.initialDelaySeconds
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L283)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L60)</sup>
|
||||
|
||||
InitialDelaySeconds specifies number of seconds after the container has started before liveness or readiness probes are initiated.
|
||||
Minimum value is 0.
|
||||
|
@ -3445,7 +3451,7 @@ Default Value: `2`
|
|||
|
||||
### .spec.gateways.probes.livenessProbeSpec.periodSeconds
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L287)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L64)</sup>
|
||||
|
||||
PeriodSeconds How often (in seconds) to perform the probe.
|
||||
Minimum value is 1.
|
||||
|
@ -3456,7 +3462,7 @@ Default Value: `10`
|
|||
|
||||
### .spec.gateways.probes.livenessProbeSpec.successThreshold
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L295)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L72)</sup>
|
||||
|
||||
SuccessThreshold Minimum consecutive successes for the probe to be considered successful after having failed.
|
||||
Minimum value is 1.
|
||||
|
@ -3467,7 +3473,7 @@ Default Value: `1`
|
|||
|
||||
### .spec.gateways.probes.livenessProbeSpec.timeoutSeconds
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L291)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L68)</sup>
|
||||
|
||||
TimeoutSeconds specifies number of seconds after which the probe times out
|
||||
Minimum value is 1.
|
||||
|
@ -3478,7 +3484,7 @@ Default Value: `2`
|
|||
|
||||
### .spec.gateways.probes.ReadinessProbeDisabled
|
||||
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L257)</sup>
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L34)</sup>
|
||||
|
||||
> [!WARNING]
|
||||
> ***DEPRECATED***
|
||||
|
@ -3491,7 +3497,7 @@ OldReadinessProbeDisabled if true readinessProbes are disabled
|
|||
|
||||
### .spec.gateways.probes.readinessProbeDisabled
|
||||
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L259)</sup>
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L36)</sup>
|
||||
|
||||
ReadinessProbeDisabled override flag for probe disabled in good manner (lowercase) with backward compatibility
|
||||
|
||||
|
@ -3499,7 +3505,7 @@ ReadinessProbeDisabled override flag for probe disabled in good manner (lowercas
|
|||
|
||||
### .spec.gateways.probes.readinessProbeSpec.failureThreshold
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L300)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L77)</sup>
|
||||
|
||||
FailureThreshold when a Pod starts and the probe fails, Kubernetes will try failureThreshold times before giving up.
|
||||
Giving up means restarting the container.
|
||||
|
@ -3511,7 +3517,7 @@ Default Value: `3`
|
|||
|
||||
### .spec.gateways.probes.readinessProbeSpec.initialDelaySeconds
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L283)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L60)</sup>
|
||||
|
||||
InitialDelaySeconds specifies number of seconds after the container has started before liveness or readiness probes are initiated.
|
||||
Minimum value is 0.
|
||||
|
@ -3522,7 +3528,7 @@ Default Value: `2`
|
|||
|
||||
### .spec.gateways.probes.readinessProbeSpec.periodSeconds
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L287)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L64)</sup>
|
||||
|
||||
PeriodSeconds How often (in seconds) to perform the probe.
|
||||
Minimum value is 1.
|
||||
|
@ -3533,7 +3539,7 @@ Default Value: `10`
|
|||
|
||||
### .spec.gateways.probes.readinessProbeSpec.successThreshold
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L295)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L72)</sup>
|
||||
|
||||
SuccessThreshold Minimum consecutive successes for the probe to be considered successful after having failed.
|
||||
Minimum value is 1.
|
||||
|
@ -3544,7 +3550,7 @@ Default Value: `1`
|
|||
|
||||
### .spec.gateways.probes.readinessProbeSpec.timeoutSeconds
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L291)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L68)</sup>
|
||||
|
||||
TimeoutSeconds specifies number of seconds after which the probe times out
|
||||
Minimum value is 1.
|
||||
|
@ -3555,7 +3561,7 @@ Default Value: `2`
|
|||
|
||||
### .spec.gateways.probes.startupProbeDisabled
|
||||
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L264)</sup>
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L41)</sup>
|
||||
|
||||
StartupProbeDisabled if true startupProbes are disabled
|
||||
|
||||
|
@ -3563,7 +3569,7 @@ StartupProbeDisabled if true startupProbes are disabled
|
|||
|
||||
### .spec.gateways.probes.startupProbeSpec.failureThreshold
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L300)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L77)</sup>
|
||||
|
||||
FailureThreshold when a Pod starts and the probe fails, Kubernetes will try failureThreshold times before giving up.
|
||||
Giving up means restarting the container.
|
||||
|
@ -3575,7 +3581,7 @@ Default Value: `3`
|
|||
|
||||
### .spec.gateways.probes.startupProbeSpec.initialDelaySeconds
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L283)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L60)</sup>
|
||||
|
||||
InitialDelaySeconds specifies number of seconds after the container has started before liveness or readiness probes are initiated.
|
||||
Minimum value is 0.
|
||||
|
@ -3586,7 +3592,7 @@ Default Value: `2`
|
|||
|
||||
### .spec.gateways.probes.startupProbeSpec.periodSeconds
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L287)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L64)</sup>
|
||||
|
||||
PeriodSeconds How often (in seconds) to perform the probe.
|
||||
Minimum value is 1.
|
||||
|
@ -3597,7 +3603,7 @@ Default Value: `10`
|
|||
|
||||
### .spec.gateways.probes.startupProbeSpec.successThreshold
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L295)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L72)</sup>
|
||||
|
||||
SuccessThreshold Minimum consecutive successes for the probe to be considered successful after having failed.
|
||||
Minimum value is 1.
|
||||
|
@ -3608,7 +3614,7 @@ Default Value: `1`
|
|||
|
||||
### .spec.gateways.probes.startupProbeSpec.timeoutSeconds
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L291)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec_probe.go#L68)</sup>
|
||||
|
||||
TimeoutSeconds specifies number of seconds after which the probe times out
|
||||
Minimum value is 1.
|
||||
|
@ -3619,7 +3625,7 @@ Default Value: `2`
|
|||
|
||||
### .spec.gateways.pvcResizeMode
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L173)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L144)</sup>
|
||||
|
||||
VolumeResizeMode specified resize mode for PVCs and PVs
|
||||
|
||||
|
@ -3631,7 +3637,7 @@ Possible Values:
|
|||
|
||||
### .spec.gateways.resources
|
||||
|
||||
Type: `core.ResourceRequirements` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L98)</sup>
|
||||
Type: `core.ResourceRequirements` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L69)</sup>
|
||||
|
||||
Resources holds resource requests & limits
|
||||
|
||||
|
@ -3642,7 +3648,7 @@ Links:
|
|||
|
||||
### .spec.gateways.schedulerName
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L90)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L61)</sup>
|
||||
|
||||
SchedulerName define scheduler name used for group
|
||||
|
||||
|
@ -3780,7 +3786,7 @@ sysctls:
|
|||
|
||||
### .spec.gateways.serviceAccountName
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L149)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L120)</sup>
|
||||
|
||||
ServiceAccountName setting specifies the `serviceAccountName` for the `Pods` created
|
||||
for each server of this group. If empty, it defaults to using the
|
||||
|
@ -3795,7 +3801,7 @@ to that service account.
|
|||
|
||||
### .spec.gateways.shutdownDelay
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L216)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L187)</sup>
|
||||
|
||||
ShutdownDelay define how long operator should delay finalizer removal after shutdown
|
||||
|
||||
|
@ -3803,7 +3809,7 @@ ShutdownDelay define how long operator should delay finalizer removal after shut
|
|||
|
||||
### .spec.gateways.shutdownMethod
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L214)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L185)</sup>
|
||||
|
||||
ShutdownMethod describe procedure of member shutdown taken by Operator
|
||||
|
||||
|
@ -3811,7 +3817,7 @@ ShutdownMethod describe procedure of member shutdown taken by Operator
|
|||
|
||||
### .spec.gateways.sidecarCoreNames
|
||||
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L192)</sup>
|
||||
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L163)</sup>
|
||||
|
||||
SidecarCoreNames is a list of sidecar containers which must run in the pod.
|
||||
Some names (e.g.: "server", "worker") are reserved, and they don't have any impact.
|
||||
|
@ -3820,7 +3826,7 @@ Some names (e.g.: "server", "worker") are reserved, and they don't have any impa
|
|||
|
||||
### .spec.gateways.sidecars
|
||||
|
||||
Type: `[]core.Container` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L196)</sup>
|
||||
Type: `[]core.Container` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L167)</sup>
|
||||
|
||||
Sidecars specifies a list of additional containers to be started
|
||||
|
||||
|
@ -3831,7 +3837,7 @@ Links:
|
|||
|
||||
### .spec.gateways.storageClassName
|
||||
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L94)</sup>
|
||||
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L65)</sup>
|
||||
|
||||
> [!WARNING]
|
||||
> ***DEPRECATED***
|
||||
|
@ -3844,7 +3850,7 @@ StorageClassName specifies the classname for storage of the servers.
|
|||
|
||||
### .spec.gateways.terminationGracePeriodSeconds
|
||||
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L229)</sup>
|
||||
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L200)</sup>
|
||||
|
||||
TerminationGracePeriodSeconds override default TerminationGracePeriodSeconds for pods - via silent rotation
|
||||
|
||||
|
@ -3852,7 +3858,7 @@ TerminationGracePeriodSeconds override default TerminationGracePeriodSeconds for
|
|||
|
||||
### .spec.gateways.tolerations
|
||||
|
||||
Type: `[]core.Toleration` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L125)</sup>
|
||||
Type: `[]core.Toleration` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L96)</sup>
|
||||
|
||||
Tolerations specifies the tolerations added to Pods in this group.
|
||||
By default, suitable tolerations are set for the following keys with the `NoExecute` effect:
|
||||
|
@ -3868,7 +3874,7 @@ Links:
|
|||
|
||||
### .spec.gateways.volumeAllowShrink
|
||||
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L177)</sup>
|
||||
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L148)</sup>
|
||||
|
||||
> [!WARNING]
|
||||
> ***DEPRECATED***
|
||||
|
@ -3881,7 +3887,7 @@ VolumeAllowShrink allows shrinking of the volume
|
|||
|
||||
### .spec.gateways.volumeClaimTemplate
|
||||
|
||||
Type: `core.PersistentVolumeClaim` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L168)</sup>
|
||||
Type: `core.PersistentVolumeClaim` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L139)</sup>
|
||||
|
||||
VolumeClaimTemplate specifies a volumeClaimTemplate used by operator to create to volume claims for pods of this group.
|
||||
This setting is not available for group `coordinators`, `syncmasters` & `syncworkers`.
|
||||
|
@ -3897,7 +3903,7 @@ Links:
|
|||
|
||||
### .spec.gateways.volumeMounts
|
||||
|
||||
Type: `[]ServerGroupSpecVolumeMount` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L206)</sup>
|
||||
Type: `[]ServerGroupSpecVolumeMount` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.42/pkg/apis/deployment/v1/server_group_spec.go#L177)</sup>
|
||||
|
||||
VolumeMounts define list of volume mounts mounted into server container
|
||||
|
||||
|
|
6
docs/cli.md
Normal file
6
docs/cli.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: page
|
||||
has_children: true
|
||||
title: Binaries
|
||||
has_toc: false
|
||||
---
|
122
docs/cli/arangodb_operator.md
Normal file
122
docs/cli/arangodb_operator.md
Normal file
|
@ -0,0 +1,122 @@
|
|||
---
|
||||
layout: page
|
||||
parent: Binaries
|
||||
title: arangodb_operator
|
||||
---
|
||||
|
||||
# ArangoDB Operator Command
|
||||
|
||||
[START_INJECT]: # (arangodb_operator_cmd)
|
||||
```
|
||||
Usage:
|
||||
arangodb_operator [flags]
|
||||
arangodb_operator [command]
|
||||
|
||||
Available Commands:
|
||||
admin Administration operations
|
||||
completion Generate the autocompletion script for the specified shell
|
||||
crd CRD operations
|
||||
debug-package Generate debug package for debugging
|
||||
exporter
|
||||
features Describe all operator features
|
||||
help Help about any command
|
||||
integration
|
||||
storage
|
||||
task
|
||||
version
|
||||
|
||||
Flags:
|
||||
--action.PVCResize.concurrency int Define limit of concurrent PVC Resizes on the cluster (default 32)
|
||||
--agency.refresh-delay duration The Agency refresh delay (0 = no delay) (default 500ms)
|
||||
--agency.refresh-interval duration The Agency refresh interval (0 = do not refresh)
|
||||
--agency.retries int The Agency retries (0 = no retries) (default 1)
|
||||
--api.enabled Enable operator HTTP and gRPC API (default true)
|
||||
--api.grpc-port int gRPC API port to listen on (default 8728)
|
||||
--api.http-port int HTTP API port to listen on (default 8628)
|
||||
--api.jwt-key-secret-name string Name of secret containing key used to sign JWT. If there is no such secret present, value will be saved here (default "arangodb-operator-api-jwt-key")
|
||||
--api.jwt-secret-name string Name of secret which will contain JWT to authenticate API requests. (default "arangodb-operator-api-jwt")
|
||||
--api.tls-secret-name string Name of secret containing tls.crt & tls.key for HTTPS API (if empty, self-signed certificate is used)
|
||||
--backup-concurrent-uploads int Number of concurrent uploads per deployment (default 4)
|
||||
--chaos.allowed Set to allow chaos in deployments. Only activated when allowed and enabled in deployment
|
||||
--crd.install Install missing CRD if access is possible (default true)
|
||||
--crd.preserve-unknown-fields stringArray Controls which CRD should have enabled preserve unknown fields in validation schema <crd-name>=<true/false>. To apply for all, use crd-name 'all'.
|
||||
--crd.validation-schema stringArray Overrides default set of CRDs which should have validation schema enabled <crd-name>=<true/false>. To apply for all, use crd-name 'all'.
|
||||
--deployment.feature.agency-poll Enable Agency Poll for Enterprise deployments - Required ArangoDB 3.8.0 or higher (default true)
|
||||
--deployment.feature.all Enable ALL Features
|
||||
--deployment.feature.async-backup-creation Create backups asynchronously to avoid blocking the operator and reaching the timeout - Required ArangoDB 3.8.0 or higher (default true)
|
||||
--deployment.feature.backup-cleanup Cleanup imported backups if required - Required ArangoDB 3.8.0 or higher
|
||||
--deployment.feature.deployment-spec-defaults-restore Restore defaults from last accepted state of deployment - Required ArangoDB 3.8.0 or higher (default true)
|
||||
--deployment.feature.enforced-resign-leadership Enforce ResignLeadership and ensure that Leaders are moved from restarted DBServer - Required ArangoDB 3.8.0 or higher (default true)
|
||||
--deployment.feature.ephemeral-volumes Enables ephemeral volumes for apps and tmp directory - Required ArangoDB 3.8.0 or higher
|
||||
--deployment.feature.failover-leadership Support for leadership in fail-over mode - Required ArangoDB 3.8.0 or higher
|
||||
--deployment.feature.init-containers-copy-resources Copy resources spec to built-in init containers if they are not specified - Required ArangoDB 3.8.0 or higher (default true)
|
||||
--deployment.feature.init-containers-upscale-resources Copy resources spec to built-in init containers if they are not specified or lower - Required ArangoDB 3.8.0 or higher (default true)
|
||||
--deployment.feature.local-storage.pass-reclaim-policy [LocalStorage] Pass ReclaimPolicy from StorageClass instead of using hardcoded Retain - Required ArangoDB 3.8.0 or higher
|
||||
--deployment.feature.local-volume-replacement-check Replace volume for local-storage if volume is unschedulable (ex. node is gone) - Required ArangoDB 3.8.0 or higher
|
||||
--deployment.feature.random-pod-names Enables generating random pod names - Required ArangoDB 3.8.0 or higher
|
||||
--deployment.feature.rebalancer-v2 Rebalancer V2 feature - Required ArangoDB 3.10.0 or higher
|
||||
--deployment.feature.restart-policy-always Allow to restart containers with always restart policy - Required ArangoDB 3.8.0 or higher
|
||||
--deployment.feature.secured-containers Create server's containers with non root privileges. It enables 'ephemeral-volumes' feature implicitly - Required ArangoDB 3.8.0 or higher
|
||||
--deployment.feature.sensitive-information-protection Hide sensitive information from metrics and logs - Required ArangoDB 3.8.0 or higher
|
||||
--deployment.feature.short-pod-names Enable Short Pod Names - Required ArangoDB 3.8.0 or higher
|
||||
--deployment.feature.timezone-management Enable timezone management for pods - Required ArangoDB 3.8.0 or higher
|
||||
--deployment.feature.tls-sni TLS SNI Support - Required ArangoDB EE 3.8.0 or higher (default true)
|
||||
--deployment.feature.upgrade-version-check Enable initContainer with pre version check - Required ArangoDB 3.8.0 or higher (default true)
|
||||
--deployment.feature.upgrade-version-check-v2 Enable initContainer with pre version check based by Operator - Required ArangoDB 3.8.0 or higher
|
||||
--features-config-map-name string Name of the Feature Map ConfigMap (default "arangodb-operator-feature-config-map")
|
||||
-h, --help help for arangodb_operator
|
||||
--http1.keep-alive If false, disables HTTP keep-alives and will only use the connection to the server for a single HTTP request (default true)
|
||||
--http1.transport.dial-timeout duration Maximum amount of time a dial will wait for a connect to complete (default 30s)
|
||||
--http1.transport.idle-conn-timeout duration Maximum amount of time an idle (keep-alive) connection will remain idle before closing itself. Zero means no limit (default 1m30s)
|
||||
--http1.transport.idle-conn-timeout-short duration Maximum amount of time an idle (keep-alive) connection will remain idle before closing itself. Zero means no limit (default 100ms)
|
||||
--http1.transport.keep-alive-timeout duration Interval between keep-alive probes for an active network connection (default 1m30s)
|
||||
--http1.transport.keep-alive-timeout-short duration Interval between keep-alive probes for an active network connection (default 100ms)
|
||||
--http1.transport.max-idle-conns int Maximum number of idle (keep-alive) connections across all hosts. Zero means no limit (default 100)
|
||||
--http1.transport.tls-handshake-timeout duration Maximum amount of time to wait for a TLS handshake. Zero means no timeout (default 10s)
|
||||
--image.discovery.status Discover Operator Image from Pod Status by default. When disabled Pod Spec is used. (default true)
|
||||
--image.discovery.timeout duration Timeout for image discovery process (default 1m0s)
|
||||
--internal.scaling-integration Enable Scaling Integration
|
||||
--kubernetes.burst int Burst for the k8s API (default 30)
|
||||
--kubernetes.max-batch-size int Size of batch during objects read (default 256)
|
||||
--kubernetes.qps float32 Number of queries per second for k8s API (default 15)
|
||||
--log.format string Set log format. Allowed values: 'pretty', 'JSON'. If empty, default format is used (default "pretty")
|
||||
--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, http, inspector, integration-config-v1, integrations, k8s-client, kubernetes-informer, monitor, networking-route-operator, operator, operator-arangojob-handler, operator-v2, operator-v2-event, operator-v2-worker, panics, pod_compare, root, root-event-recorder, server, server-authentication (default [info])
|
||||
--log.sampling If true, operator will try to minimize duplication of logging events (default true)
|
||||
--memory-limit uint Define memory limit for hard shutdown and the dump of goroutines. Used for testing
|
||||
--metrics.excluded-prefixes stringArray List of the excluded metrics prefixes
|
||||
--mode.single Enable single mode in Operator. WARNING: There should be only one replica of Operator, otherwise Operator can take unexpected actions
|
||||
--operator.analytics Enable to run the Analytics operator
|
||||
--operator.apps Enable to run the ArangoApps operator
|
||||
--operator.backup Enable to run the ArangoBackup operator
|
||||
--operator.deployment Enable to run the ArangoDeployment operator
|
||||
--operator.deployment-replication Enable to run the ArangoDeploymentReplication operator
|
||||
--operator.ml Enable to run the ArangoML operator
|
||||
--operator.networking Enable to run the Networking operator
|
||||
--operator.reconciliation.retry.count int Count of retries during Object Update operations in the Reconciliation loop (default 25)
|
||||
--operator.reconciliation.retry.delay duration Delay between Object Update operations in the Reconciliation loop (default 1s)
|
||||
--operator.storage Enable to run the ArangoLocalStorage operator
|
||||
--operator.version Enable only version endpoint in Operator
|
||||
--reconciliation.delay duration Delay between reconciliation loops (<= 0 -> Disabled)
|
||||
--scope string Define scope on which Operator works. Legacy - pre 1.1.0 scope with limited cluster access (default "legacy")
|
||||
--server.admin-secret-name string Name of secret containing username + password for login to the dashboard (default "arangodb-operator-dashboard")
|
||||
--server.allow-anonymous-access Allow anonymous access to the dashboard
|
||||
--server.host string Host to listen on (default "0.0.0.0")
|
||||
--server.port int Port to listen on (default 8528)
|
||||
--server.tls-secret-name string Name of secret containing tls.crt & tls.key for HTTPS server (if empty, self-signed certificate is used)
|
||||
--shutdown.delay duration The delay before running shutdown handlers (default 2s)
|
||||
--shutdown.timeout duration Timeout for shutdown handlers (default 30s)
|
||||
--timeout.agency duration The Agency read timeout (default 10s)
|
||||
--timeout.arangod duration The request timeout to the ArangoDB (default 5s)
|
||||
--timeout.arangod-check duration The version check request timeout to the ArangoDB (default 2s)
|
||||
--timeout.backup-arangod duration The request timeout to the ArangoDB during backup calls (default 30s)
|
||||
--timeout.backup-upload duration The request timeout to the ArangoDB during uploading files (default 5m0s)
|
||||
--timeout.force-delete-pod-grace-period duration Default period when ArangoDB Pod should be forcefully removed after all containers were stopped - set to 0 to disable forceful removals (default 15m0s)
|
||||
--timeout.k8s duration The request timeout to the kubernetes (default 2s)
|
||||
--timeout.pod-scheduling-grace-period duration Default period when ArangoDB Pod should be deleted in case of scheduling info change - set to 0 to disable (default 15s)
|
||||
--timeout.reconciliation duration The reconciliation timeout to the ArangoDB CR (default 1m0s)
|
||||
--timeout.shard-rebuild duration Timeout after which particular out-synced shard is considered as failed and rebuild is triggered (default 1h0m0s)
|
||||
--timeout.shard-rebuild-retry duration Timeout after which rebuild shards retry flow is triggered (default 4h0m0s)
|
||||
|
||||
Use "arangodb_operator [command] --help" for more information about a command.
|
||||
```
|
||||
[END_INJECT]: # (arangodb_operator_cmd)
|
101
docs/cli/arangodb_operator_integration.md
Normal file
101
docs/cli/arangodb_operator_integration.md
Normal file
|
@ -0,0 +1,101 @@
|
|||
---
|
||||
layout: page
|
||||
parent: Binaries
|
||||
title: arangodb_operator_integration
|
||||
---
|
||||
|
||||
# ArangoDB Operator Integration Command
|
||||
|
||||
[START_INJECT]: # (arangodb_operator_integration_cmd)
|
||||
```
|
||||
Usage:
|
||||
arangodb_operator_integration [flags]
|
||||
arangodb_operator_integration [command]
|
||||
|
||||
Available Commands:
|
||||
client
|
||||
completion Generate the autocompletion script for the specified shell
|
||||
help Help about any command
|
||||
|
||||
Flags:
|
||||
--health.address string Address to expose health service (default "0.0.0.0:9091")
|
||||
--health.auth.token string Token for health service (when auth service is token)
|
||||
--health.auth.type string Auth type for health service (default "None")
|
||||
--health.shutdown.enabled Determines if shutdown service should be enabled and exposed (default true)
|
||||
-h, --help help for arangodb_operator_integration
|
||||
--integration.authentication.v1 Enable AuthenticationV1 Integration Service
|
||||
--integration.authentication.v1.enabled Defines if Authentication is enabled (default true)
|
||||
--integration.authentication.v1.external Defones if External access to service authentication.v1 is enabled
|
||||
--integration.authentication.v1.internal Defones if Internal access to service authentication.v1 is enabled (default true)
|
||||
--integration.authentication.v1.path string Path to the JWT Folder
|
||||
--integration.authentication.v1.token.allowed strings Allowed users for the Token
|
||||
--integration.authentication.v1.token.max-size uint16 Max Token max size in bytes (default 64)
|
||||
--integration.authentication.v1.token.ttl.default duration Default Token TTL (default 1h0m0s)
|
||||
--integration.authentication.v1.token.ttl.max duration Max Token TTL (default 1h0m0s)
|
||||
--integration.authentication.v1.token.ttl.min duration Min Token TTL (default 1m0s)
|
||||
--integration.authentication.v1.token.user string Default user of the Token (default "root")
|
||||
--integration.authentication.v1.ttl duration TTL of the JWT cache (default 15s)
|
||||
--integration.authorization.v0 Enable AuthorizationV0 Integration Service
|
||||
--integration.authorization.v0.external Defones if External access to service authorization.v0 is enabled
|
||||
--integration.authorization.v0.internal Defones if Internal access to service authorization.v0 is enabled (default true)
|
||||
--integration.config.v1 Enable ConfigV1 Integration Service
|
||||
--integration.config.v1.external Defones if External access to service config.v1 is enabled
|
||||
--integration.config.v1.internal Defones if Internal access to service config.v1 is enabled (default true)
|
||||
--integration.config.v1.module strings Module in the reference <name>=<abs path>
|
||||
--integration.envoy.auth.v3 Enable EnvoyAuthV3 Integration Service
|
||||
--integration.envoy.auth.v3.external Defones if External access to service envoy.auth.v3 is enabled
|
||||
--integration.envoy.auth.v3.internal Defones if Internal access to service envoy.auth.v3 is enabled (default true)
|
||||
--integration.scheduler.v1 SchedulerV1 Integration
|
||||
--integration.scheduler.v1.external Defones if External access to service scheduler.v1 is enabled
|
||||
--integration.scheduler.v1.internal Defones if Internal access to service scheduler.v1 is enabled (default true)
|
||||
--integration.scheduler.v1.namespace string Kubernetes Namespace (default "default")
|
||||
--integration.scheduler.v1.verify-access Verify the CRD Access (default true)
|
||||
--integration.shutdown.v1 ShutdownV1 Handler
|
||||
--integration.shutdown.v1.external Defones if External access to service shutdown.v1 is enabled
|
||||
--integration.shutdown.v1.internal Defones if Internal access to service shutdown.v1 is enabled (default true)
|
||||
--integration.storage.v1 StorageBucket Integration
|
||||
--integration.storage.v1.external Defones if External access to service storage.v1 is enabled
|
||||
--integration.storage.v1.internal Defones if Internal access to service storage.v1 is enabled (default true)
|
||||
--integration.storage.v1.s3.access-key string Path to file containing S3 AccessKey
|
||||
--integration.storage.v1.s3.allow-insecure If set to true, the Endpoint certificates won't be checked
|
||||
--integration.storage.v1.s3.bucket string Bucket name
|
||||
--integration.storage.v1.s3.ca-crt string Path to file containing CA certificate to validate endpoint connection
|
||||
--integration.storage.v1.s3.ca-key string Path to file containing keyfile to validate endpoint connection
|
||||
--integration.storage.v1.s3.disable-ssl If set to true, the SSL won't be used when connecting to Endpoint
|
||||
--integration.storage.v1.s3.endpoint string Endpoint of S3 API implementation
|
||||
--integration.storage.v1.s3.region string Region
|
||||
--integration.storage.v1.s3.secret-key string Path to file containing S3 SecretKey
|
||||
--integration.storage.v1.type string Type of the Storage Integration (default "s3")
|
||||
--services.address string Address to expose internal services (default "127.0.0.1:9092")
|
||||
--services.auth.token string Token for internal service (when auth service is token)
|
||||
--services.auth.type string Auth type for internal service (default "None")
|
||||
--services.enabled Defines if internal access is enabled (default true)
|
||||
--services.external.address string Address to expose external services (default "0.0.0.0:9093")
|
||||
--services.external.auth.token string Token for external service (when auth service is token)
|
||||
--services.external.auth.type string Auth type for external service (default "None")
|
||||
--services.external.enabled Defines if external access is enabled
|
||||
|
||||
Use "arangodb_operator_integration [command] --help" for more information about a command.
|
||||
```
|
||||
[END_INJECT]: # (arangodb_operator_integration_cmd)
|
||||
|
||||
# ArangoDB Operator Integration Client Subcommand
|
||||
|
||||
[START_INJECT]: # (arangodb_operator_integration_cmd_client)
|
||||
```
|
||||
Usage:
|
||||
arangodb_operator_integration client [command]
|
||||
|
||||
Available Commands:
|
||||
health
|
||||
pong
|
||||
shutdown
|
||||
|
||||
Flags:
|
||||
--address string GRPC Service Address (default "127.0.0.1:8080")
|
||||
-h, --help help for client
|
||||
--token string GRPC Token
|
||||
|
||||
Use "arangodb_operator_integration client [command] --help" for more information about a command.
|
||||
```
|
||||
[END_INJECT]: # (arangodb_operator_integration_cmd_client)
|
88
docs/cli/arangodb_operator_ops.md
Normal file
88
docs/cli/arangodb_operator_ops.md
Normal file
|
@ -0,0 +1,88 @@
|
|||
---
|
||||
layout: page
|
||||
parent: Binaries
|
||||
title: arangodb_operator_ops
|
||||
---
|
||||
|
||||
# ArangoDB Operator Ops Command
|
||||
|
||||
[START_INJECT]: # (arangodb_operator_ops_cmd)
|
||||
```
|
||||
Usage:
|
||||
arangodb_operator_ops [flags]
|
||||
arangodb_operator_ops [command]
|
||||
|
||||
Available Commands:
|
||||
completion Generate the autocompletion script for the specified shell
|
||||
crd CRD operations
|
||||
help Help about any command
|
||||
task
|
||||
|
||||
Flags:
|
||||
-h, --help help for arangodb_operator_ops
|
||||
|
||||
Use "arangodb_operator_ops [command] --help" for more information about a command.
|
||||
```
|
||||
[END_INJECT]: # (arangodb_operator_ops_cmd)
|
||||
|
||||
# ArangoDB Operator Ops CRD Subcommand
|
||||
|
||||
[START_INJECT]: # (arangodb_operator_ops_cmd_crd)
|
||||
```
|
||||
CRD operations
|
||||
|
||||
Usage:
|
||||
arangodb_operator_ops crd [flags]
|
||||
arangodb_operator_ops crd [command]
|
||||
|
||||
Available Commands:
|
||||
generate Generates YAML of all required CRDs
|
||||
install Install and update all required CRDs
|
||||
|
||||
Flags:
|
||||
--crd.force-update Enforce CRD Schema update
|
||||
--crd.preserve-unknown-fields stringArray Controls which CRD should have enabled preserve unknown fields in validation schema <crd-name>=<true/false>.
|
||||
--crd.validation-schema stringArray Controls which CRD should have validation schema <crd-name>=<true/false>.
|
||||
-h, --help help for crd
|
||||
|
||||
Use "arangodb_operator_ops crd [command] --help" for more information about a command.
|
||||
```
|
||||
[END_INJECT]: # (arangodb_operator_ops_cmd_crd)
|
||||
|
||||
# ArangoDB Operator Ops CRD Install Subcommand
|
||||
|
||||
[START_INJECT]: # (arangodb_operator_ops_cmd_crd_install)
|
||||
```
|
||||
Install and update all required CRDs
|
||||
|
||||
Usage:
|
||||
arangodb_operator_ops crd install [flags]
|
||||
|
||||
Flags:
|
||||
-h, --help help for install
|
||||
|
||||
Global Flags:
|
||||
--crd.force-update Enforce CRD Schema update
|
||||
--crd.preserve-unknown-fields stringArray Controls which CRD should have enabled preserve unknown fields in validation schema <crd-name>=<true/false>.
|
||||
--crd.validation-schema stringArray Controls which CRD should have validation schema <crd-name>=<true/false>.
|
||||
```
|
||||
[END_INJECT]: # (arangodb_operator_ops_cmd_crd_install)
|
||||
|
||||
# ArangoDB Operator Ops CRD Generate Subcommand
|
||||
|
||||
[START_INJECT]: # (arangodb_operator_ops_cmd_crd_generate)
|
||||
```
|
||||
Generates YAML of all required CRDs
|
||||
|
||||
Usage:
|
||||
arangodb_operator_ops crd generate [flags]
|
||||
|
||||
Flags:
|
||||
-h, --help help for generate
|
||||
|
||||
Global Flags:
|
||||
--crd.force-update Enforce CRD Schema update
|
||||
--crd.preserve-unknown-fields stringArray Controls which CRD should have enabled preserve unknown fields in validation schema <crd-name>=<true/false>.
|
||||
--crd.validation-schema stringArray Controls which CRD should have validation schema <crd-name>=<true/false>.
|
||||
```
|
||||
[END_INJECT]: # (arangodb_operator_ops_cmd_crd_generate)
|
25
integrations/pong/v1/definition/consts.go
Normal file
25
integrations/pong/v1/definition/consts.go
Normal file
|
@ -0,0 +1,25 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package definition
|
||||
|
||||
const (
|
||||
Name = "pong.v1"
|
||||
)
|
186
integrations/pong/v1/definition/pong.pb.go
Normal file
186
integrations/pong/v1/definition/pong.pb.go
Normal file
|
@ -0,0 +1,186 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.21.1
|
||||
// source: integrations/pong/v1/definition/pong.proto
|
||||
|
||||
package definition
|
||||
|
||||
import (
|
||||
definition "github.com/arangodb/kube-arangodb/integrations/shared/v1/definition"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// PongV1 Ping Call Response
|
||||
type PongV1PingResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Current time in UTC
|
||||
Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PongV1PingResponse) Reset() {
|
||||
*x = PongV1PingResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_integrations_pong_v1_definition_pong_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PongV1PingResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PongV1PingResponse) ProtoMessage() {}
|
||||
|
||||
func (x *PongV1PingResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_integrations_pong_v1_definition_pong_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PongV1PingResponse.ProtoReflect.Descriptor instead.
|
||||
func (*PongV1PingResponse) Descriptor() ([]byte, []int) {
|
||||
return file_integrations_pong_v1_definition_pong_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *PongV1PingResponse) GetTime() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Time
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_integrations_pong_v1_definition_pong_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_integrations_pong_v1_definition_pong_proto_rawDesc = []byte{
|
||||
0x0a, 0x2a, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x70,
|
||||
0x6f, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x2f, 0x70, 0x6f, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x70, 0x6f,
|
||||
0x6e, 0x67, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x66, 0x69,
|
||||
0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x22, 0x44, 0x0a, 0x12, 0x50, 0x6f, 0x6e, 0x67, 0x56, 0x31, 0x50, 0x69, 0x6e, 0x67,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
||||
0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x32, 0x39, 0x0a, 0x06, 0x50, 0x6f, 0x6e, 0x67,
|
||||
0x56, 0x31, 0x12, 0x2f, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x0d, 0x2e, 0x73, 0x68, 0x61,
|
||||
0x72, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x70, 0x6f, 0x6e, 0x67,
|
||||
0x2e, 0x50, 0x6f, 0x6e, 0x67, 0x56, 0x31, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x2d,
|
||||
0x61, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x70, 0x6f, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65,
|
||||
0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_integrations_pong_v1_definition_pong_proto_rawDescOnce sync.Once
|
||||
file_integrations_pong_v1_definition_pong_proto_rawDescData = file_integrations_pong_v1_definition_pong_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_integrations_pong_v1_definition_pong_proto_rawDescGZIP() []byte {
|
||||
file_integrations_pong_v1_definition_pong_proto_rawDescOnce.Do(func() {
|
||||
file_integrations_pong_v1_definition_pong_proto_rawDescData = protoimpl.X.CompressGZIP(file_integrations_pong_v1_definition_pong_proto_rawDescData)
|
||||
})
|
||||
return file_integrations_pong_v1_definition_pong_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_integrations_pong_v1_definition_pong_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_integrations_pong_v1_definition_pong_proto_goTypes = []interface{}{
|
||||
(*PongV1PingResponse)(nil), // 0: pong.PongV1PingResponse
|
||||
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
|
||||
(*definition.Empty)(nil), // 2: shared.Empty
|
||||
}
|
||||
var file_integrations_pong_v1_definition_pong_proto_depIdxs = []int32{
|
||||
1, // 0: pong.PongV1PingResponse.time:type_name -> google.protobuf.Timestamp
|
||||
2, // 1: pong.PongV1.Ping:input_type -> shared.Empty
|
||||
0, // 2: pong.PongV1.Ping:output_type -> pong.PongV1PingResponse
|
||||
2, // [2:3] is the sub-list for method output_type
|
||||
1, // [1:2] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_integrations_pong_v1_definition_pong_proto_init() }
|
||||
func file_integrations_pong_v1_definition_pong_proto_init() {
|
||||
if File_integrations_pong_v1_definition_pong_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_integrations_pong_v1_definition_pong_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PongV1PingResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_integrations_pong_v1_definition_pong_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_integrations_pong_v1_definition_pong_proto_goTypes,
|
||||
DependencyIndexes: file_integrations_pong_v1_definition_pong_proto_depIdxs,
|
||||
MessageInfos: file_integrations_pong_v1_definition_pong_proto_msgTypes,
|
||||
}.Build()
|
||||
File_integrations_pong_v1_definition_pong_proto = out.File
|
||||
file_integrations_pong_v1_definition_pong_proto_rawDesc = nil
|
||||
file_integrations_pong_v1_definition_pong_proto_goTypes = nil
|
||||
file_integrations_pong_v1_definition_pong_proto_depIdxs = nil
|
||||
}
|
43
integrations/pong/v1/definition/pong.proto
Normal file
43
integrations/pong/v1/definition/pong.proto
Normal file
|
@ -0,0 +1,43 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package pong;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
import "integrations/shared/v1/definition/empty.proto";
|
||||
|
||||
option go_package = "github.com/arangodb/kube-arangodb/integrations/pong/v1/definition";
|
||||
|
||||
// PongV1 Service implementation
|
||||
service PongV1 {
|
||||
rpc Ping(shared.Empty) returns (PongV1PingResponse);
|
||||
}
|
||||
|
||||
// Responses
|
||||
|
||||
|
||||
// PongV1 Ping Call Response
|
||||
message PongV1PingResponse {
|
||||
// Current time in UTC
|
||||
google.protobuf.Timestamp time = 1;
|
||||
}
|
106
integrations/pong/v1/definition/pong_grpc.pb.go
Normal file
106
integrations/pong/v1/definition/pong_grpc.pb.go
Normal file
|
@ -0,0 +1,106 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.1
|
||||
// source: integrations/pong/v1/definition/pong.proto
|
||||
|
||||
package definition
|
||||
|
||||
import (
|
||||
context "context"
|
||||
definition "github.com/arangodb/kube-arangodb/integrations/shared/v1/definition"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// PongV1Client is the client API for PongV1 service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type PongV1Client interface {
|
||||
Ping(ctx context.Context, in *definition.Empty, opts ...grpc.CallOption) (*PongV1PingResponse, error)
|
||||
}
|
||||
|
||||
type pongV1Client struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPongV1Client(cc grpc.ClientConnInterface) PongV1Client {
|
||||
return &pongV1Client{cc}
|
||||
}
|
||||
|
||||
func (c *pongV1Client) Ping(ctx context.Context, in *definition.Empty, opts ...grpc.CallOption) (*PongV1PingResponse, error) {
|
||||
out := new(PongV1PingResponse)
|
||||
err := c.cc.Invoke(ctx, "/pong.PongV1/Ping", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PongV1Server is the server API for PongV1 service.
|
||||
// All implementations must embed UnimplementedPongV1Server
|
||||
// for forward compatibility
|
||||
type PongV1Server interface {
|
||||
Ping(context.Context, *definition.Empty) (*PongV1PingResponse, error)
|
||||
mustEmbedUnimplementedPongV1Server()
|
||||
}
|
||||
|
||||
// UnimplementedPongV1Server must be embedded to have forward compatible implementations.
|
||||
type UnimplementedPongV1Server struct {
|
||||
}
|
||||
|
||||
func (UnimplementedPongV1Server) Ping(context.Context, *definition.Empty) (*PongV1PingResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
|
||||
}
|
||||
func (UnimplementedPongV1Server) mustEmbedUnimplementedPongV1Server() {}
|
||||
|
||||
// UnsafePongV1Server may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PongV1Server will
|
||||
// result in compilation errors.
|
||||
type UnsafePongV1Server interface {
|
||||
mustEmbedUnimplementedPongV1Server()
|
||||
}
|
||||
|
||||
func RegisterPongV1Server(s grpc.ServiceRegistrar, srv PongV1Server) {
|
||||
s.RegisterService(&PongV1_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PongV1_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(definition.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PongV1Server).Ping(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pong.PongV1/Ping",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PongV1Server).Ping(ctx, req.(*definition.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PongV1_ServiceDesc is the grpc.ServiceDesc for PongV1 service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PongV1_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pong.PongV1",
|
||||
HandlerType: (*PongV1Server)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Ping",
|
||||
Handler: _PongV1_Ping_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "integrations/pong/v1/definition/pong.proto",
|
||||
}
|
60
integrations/pong/v1/impl.go
Normal file
60
integrations/pong/v1/impl.go
Normal file
|
@ -0,0 +1,60 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2023-2024 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
pbPongV1 "github.com/arangodb/kube-arangodb/integrations/pong/v1/definition"
|
||||
pbSharedV1 "github.com/arangodb/kube-arangodb/integrations/shared/v1/definition"
|
||||
pbShutdownV1 "github.com/arangodb/kube-arangodb/integrations/shutdown/v1/definition"
|
||||
"github.com/arangodb/kube-arangodb/pkg/util/svc"
|
||||
)
|
||||
|
||||
func New() svc.Handler {
|
||||
return &impl{}
|
||||
}
|
||||
|
||||
var _ pbPongV1.PongV1Server = &impl{}
|
||||
var _ svc.Handler = &impl{}
|
||||
|
||||
type impl struct {
|
||||
pbPongV1.UnimplementedPongV1Server
|
||||
}
|
||||
|
||||
func (i *impl) Name() string {
|
||||
return pbShutdownV1.Name
|
||||
}
|
||||
|
||||
func (i *impl) Health() svc.HealthState {
|
||||
return svc.Healthy
|
||||
}
|
||||
|
||||
func (i *impl) Register(registrar *grpc.Server) {
|
||||
pbPongV1.RegisterPongV1Server(registrar, i)
|
||||
}
|
||||
func (i *impl) Ping(context.Context, *pbSharedV1.Empty) (*pbPongV1.PongV1PingResponse, error) {
|
||||
return &pbPongV1.PongV1PingResponse{Time: timestamppb.New(time.Now().UTC())}, nil
|
||||
}
|
63
integrations/pong/v1/service_test.go
Normal file
63
integrations/pong/v1/service_test.go
Normal file
|
@ -0,0 +1,63 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
pbPongV1 "github.com/arangodb/kube-arangodb/integrations/pong/v1/definition"
|
||||
pbSharedV1 "github.com/arangodb/kube-arangodb/integrations/shared/v1/definition"
|
||||
"github.com/arangodb/kube-arangodb/pkg/util/svc"
|
||||
"github.com/arangodb/kube-arangodb/pkg/util/tests/tgrpc"
|
||||
)
|
||||
|
||||
func Client(t *testing.T, ctx context.Context) pbPongV1.PongV1Client {
|
||||
local := svc.NewService(svc.Configuration{
|
||||
Address: "127.0.0.1:0",
|
||||
}, New())
|
||||
|
||||
start := local.Start(ctx)
|
||||
|
||||
client := tgrpc.NewGRPCClient(t, ctx, pbPongV1.NewPongV1Client, start.Address())
|
||||
|
||||
return client
|
||||
}
|
||||
|
||||
func Test_Ping(t *testing.T) {
|
||||
ctx, c := context.WithCancel(context.Background())
|
||||
defer c()
|
||||
|
||||
client := Client(t, ctx)
|
||||
|
||||
r1, err := client.Ping(ctx, &pbSharedV1.Empty{})
|
||||
require.NoError(t, err)
|
||||
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
r2, err := client.Ping(ctx, &pbSharedV1.Empty{})
|
||||
require.NoError(t, err)
|
||||
|
||||
require.True(t, r2.GetTime().AsTime().After(r1.GetTime().AsTime()))
|
||||
}
|
|
@ -81,16 +81,10 @@ func ReplaceSection(in, replace, section string) (string, error) {
|
|||
return "", errors.Errorf("END_INJECT sections is missing for section %s. Note that newline is required at the end and before tag", section)
|
||||
}
|
||||
|
||||
if strings.HasSuffix(replace, "\n\n") {
|
||||
// if section ends with empty line, we don't need to write newline for END marker
|
||||
end = strings.TrimLeft(end, "\n")
|
||||
} else {
|
||||
end = "\n" + end
|
||||
}
|
||||
in = moveString(in, endID+len(end))
|
||||
|
||||
b.WriteString(end)
|
||||
|
||||
in = moveString(in, endID+len(end))
|
||||
}
|
||||
|
||||
return b.String(), nil
|
||||
|
|
|
@ -144,23 +144,16 @@ func GenerateReadme(root string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func GenerateHelp(cmd *cobra.Command) (string, error) {
|
||||
func GenerateHelp(cmd *cobra.Command, args ...string) (string, error) {
|
||||
var lines []string
|
||||
|
||||
lines = append(lines, "```", "Flags:")
|
||||
|
||||
buff := bytes.NewBuffer(nil)
|
||||
|
||||
cmd.SetOut(buff)
|
||||
|
||||
cmd.SetArgs([]string{"--help"})
|
||||
|
||||
if err := cmd.Execute(); err != nil {
|
||||
help, err := GenerateHelpRaw(cmd, args...)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
help := buff.String()
|
||||
|
||||
for _, line := range strings.Split(help, "\n") {
|
||||
if strings.HasPrefix(line, " --") {
|
||||
lines = append(lines, line)
|
||||
|
@ -172,6 +165,29 @@ func GenerateHelp(cmd *cobra.Command) (string, error) {
|
|||
return md.WrapWithNewLines(md.WrapWithNewLines(strings.Join(lines, "\n"))), nil
|
||||
}
|
||||
|
||||
func GenerateHelpQuoted(cmd *cobra.Command, args ...string) (string, error) {
|
||||
h, err := GenerateHelpRaw(cmd, args...)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return fmt.Sprintf("```\n%s```\n", h), nil
|
||||
}
|
||||
|
||||
func GenerateHelpRaw(cmd *cobra.Command, args ...string) (string, error) {
|
||||
buff := bytes.NewBuffer(nil)
|
||||
|
||||
cmd.SetOut(buff)
|
||||
|
||||
cmd.SetArgs(append(args, "--help"))
|
||||
|
||||
if err := cmd.Execute(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return buff.String(), nil
|
||||
}
|
||||
|
||||
func GenerateReadmeFeatures(root, basePath string, eeOnly bool) (string, error) {
|
||||
feature := md.NewColumn("Feature", md.ColumnLeftAlign)
|
||||
introduced := md.NewColumn("Introduced", md.ColumnLeftAlign)
|
||||
|
|
101
internal/readme_cli.go
Normal file
101
internal/readme_cli.go
Normal file
|
@ -0,0 +1,101 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"path"
|
||||
|
||||
"github.com/arangodb/kube-arangodb/cmd"
|
||||
"github.com/arangodb/kube-arangodb/cmd/integration"
|
||||
"github.com/arangodb/kube-arangodb/internal/md"
|
||||
)
|
||||
|
||||
func GenerateCLIArangoDBOperatorReadme(root string) error {
|
||||
readmeSections := map[string]string{}
|
||||
|
||||
if section, err := GenerateHelpQuoted(cmd.Command()); err != nil {
|
||||
return err
|
||||
} else {
|
||||
readmeSections["arangodb_operator_cmd"] = section
|
||||
}
|
||||
|
||||
if err := md.ReplaceSectionsInFile(path.Join(root, "docs", "cli", "arangodb_operator.md"), readmeSections); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func GenerateCLIArangoDBOperatorOpsReadme(root string) error {
|
||||
readmeSections := map[string]string{}
|
||||
|
||||
if section, err := GenerateHelpQuoted(cmd.CommandOps()); err != nil {
|
||||
return err
|
||||
} else {
|
||||
readmeSections["arangodb_operator_ops_cmd"] = section
|
||||
}
|
||||
|
||||
if section, err := GenerateHelpQuoted(cmd.CommandOps(), "crd"); err != nil {
|
||||
return err
|
||||
} else {
|
||||
readmeSections["arangodb_operator_ops_cmd_crd"] = section
|
||||
}
|
||||
|
||||
if section, err := GenerateHelpQuoted(cmd.CommandOps(), "crd", "install"); err != nil {
|
||||
return err
|
||||
} else {
|
||||
readmeSections["arangodb_operator_ops_cmd_crd_install"] = section
|
||||
}
|
||||
|
||||
if section, err := GenerateHelpQuoted(cmd.CommandOps(), "crd", "generate"); err != nil {
|
||||
return err
|
||||
} else {
|
||||
readmeSections["arangodb_operator_ops_cmd_crd_generate"] = section
|
||||
}
|
||||
|
||||
if err := md.ReplaceSectionsInFile(path.Join(root, "docs", "cli", "arangodb_operator_ops.md"), readmeSections); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func GenerateCLIArangoDBOperatorIntegrationReadme(root string) error {
|
||||
readmeSections := map[string]string{}
|
||||
|
||||
if section, err := GenerateHelpQuoted(integration.Command()); err != nil {
|
||||
return err
|
||||
} else {
|
||||
readmeSections["arangodb_operator_integration_cmd"] = section
|
||||
}
|
||||
|
||||
if section, err := GenerateHelpQuoted(integration.Command(), "client"); err != nil {
|
||||
return err
|
||||
} else {
|
||||
readmeSections["arangodb_operator_integration_cmd_client"] = section
|
||||
}
|
||||
|
||||
if err := md.ReplaceSectionsInFile(path.Join(root, "docs", "cli", "arangodb_operator_integration.md"), readmeSections); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
|
||||
// Copyright 2016-2024 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -32,3 +32,21 @@ func Test_GenerateReadme(t *testing.T) {
|
|||
|
||||
require.NoError(t, GenerateReadme(root))
|
||||
}
|
||||
|
||||
func Test_GenerateCli_ArangoDBOperator(t *testing.T) {
|
||||
root := os.Getenv("ROOT")
|
||||
|
||||
require.NoError(t, GenerateCLIArangoDBOperatorReadme(root))
|
||||
}
|
||||
|
||||
func Test_GenerateCli_ArangoDBOperatorOps(t *testing.T) {
|
||||
root := os.Getenv("ROOT")
|
||||
|
||||
require.NoError(t, GenerateCLIArangoDBOperatorOpsReadme(root))
|
||||
}
|
||||
|
||||
func Test_GenerateCli_ArangoDBOperatorIntegration(t *testing.T) {
|
||||
root := os.Getenv("ROOT")
|
||||
|
||||
require.NoError(t, GenerateCLIArangoDBOperatorIntegrationReadme(root))
|
||||
}
|
||||
|
|
67
pkg/integrations/clients/pong_v1.go
Normal file
67
pkg/integrations/clients/pong_v1.go
Normal file
|
@ -0,0 +1,67 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package clients
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
pbPongV1 "github.com/arangodb/kube-arangodb/integrations/pong/v1/definition"
|
||||
pbSharedV1 "github.com/arangodb/kube-arangodb/integrations/shared/v1/definition"
|
||||
"github.com/arangodb/kube-arangodb/pkg/util/shutdown"
|
||||
)
|
||||
|
||||
func init() {
|
||||
registerer.MustRegister("pong/v1", func(cfg *Config) Client {
|
||||
return &pongV1{
|
||||
cfg: cfg,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
type pongV1 struct {
|
||||
cfg *Config
|
||||
}
|
||||
|
||||
func (s *pongV1) Name() string {
|
||||
return "pong"
|
||||
}
|
||||
|
||||
func (s *pongV1) Version() string {
|
||||
return "v1"
|
||||
}
|
||||
|
||||
func (s *pongV1) Register(cmd *cobra.Command) error {
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) error {
|
||||
client, c, err := client(shutdown.Context(), s.cfg, pbPongV1.NewPongV1Client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer c.Close()
|
||||
|
||||
_, err = client.Ping(shutdown.Context(), &pbSharedV1.Empty{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
62
pkg/integrations/pong_test.go
Normal file
62
pkg/integrations/pong_test.go
Normal file
|
@ -0,0 +1,62 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package integrations
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/arangodb/kube-arangodb/pkg/util/shutdown"
|
||||
)
|
||||
|
||||
func Test_Pong(t *testing.T) {
|
||||
c, health, internal, external := startService(t)
|
||||
defer c.Require(t)
|
||||
|
||||
t.Run("Pong", func(t *testing.T) {
|
||||
t.Run("health", func(t *testing.T) {
|
||||
require.NoError(t, executeSync(t, shutdown.Context(),
|
||||
fmt.Sprintf("--address=127.0.0.1:%d", health),
|
||||
"--token=",
|
||||
"client",
|
||||
"pong",
|
||||
"v1"))
|
||||
})
|
||||
t.Run("internal", func(t *testing.T) {
|
||||
require.NoError(t, executeSync(t, shutdown.Context(),
|
||||
fmt.Sprintf("--address=127.0.0.1:%d", internal),
|
||||
"--token=",
|
||||
"client",
|
||||
"pong",
|
||||
"v1"))
|
||||
})
|
||||
t.Run("external", func(t *testing.T) {
|
||||
require.NoError(t, executeSync(t, shutdown.Context(),
|
||||
fmt.Sprintf("--address=127.0.0.1:%d", external),
|
||||
"--token=",
|
||||
"client",
|
||||
"pong",
|
||||
"v1"))
|
||||
})
|
||||
})
|
||||
}
|
|
@ -30,6 +30,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
pbImplPongV1 "github.com/arangodb/kube-arangodb/integrations/pong/v1"
|
||||
pbImplShutdownV1 "github.com/arangodb/kube-arangodb/integrations/shutdown/v1"
|
||||
"github.com/arangodb/kube-arangodb/pkg/integrations/clients"
|
||||
"github.com/arangodb/kube-arangodb/pkg/util"
|
||||
|
@ -170,7 +171,13 @@ func (c *configuration) runWithContext(ctx context.Context, cancel context.Cance
|
|||
return errors.Wrapf(err, "Unable to parse external config")
|
||||
}
|
||||
|
||||
var internalHandlers, externalHandlers []svc.Handler
|
||||
var internalHandlers, externalHandlers, healthHandlers []svc.Handler
|
||||
|
||||
pong := pbImplPongV1.New()
|
||||
|
||||
internalHandlers = append(internalHandlers, pong)
|
||||
externalHandlers = append(externalHandlers, pong)
|
||||
healthHandlers = append(healthHandlers, pong)
|
||||
|
||||
for _, handler := range c.registered {
|
||||
if ok, err := cmd.Flags().GetBool(fmt.Sprintf("integration.%s", handler.Name())); err != nil {
|
||||
|
@ -209,13 +216,11 @@ func (c *configuration) runWithContext(ctx context.Context, cancel context.Cance
|
|||
}
|
||||
}
|
||||
|
||||
var healthServices []svc.Handler
|
||||
|
||||
if c.health.shutdownEnabled {
|
||||
healthServices = append(healthServices, pbImplShutdownV1.New(cancel))
|
||||
healthHandlers = append(healthHandlers, pbImplShutdownV1.New(cancel))
|
||||
}
|
||||
|
||||
health := svc.NewHealthService(healthConfig, svc.Readiness, healthServices...)
|
||||
health := svc.NewHealthService(healthConfig, svc.Readiness, healthHandlers...)
|
||||
|
||||
internalHandlers = append(internalHandlers, health)
|
||||
externalHandlers = append(externalHandlers, health)
|
||||
|
|
Loading…
Reference in a new issue