1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

[Documentation] Extract Important and Deprecated fields (#1605)

This commit is contained in:
Adam Janikowski 2024-02-29 16:04:06 +01:00 committed by GitHub
parent 25570fa8f1
commit 9459237da6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 685 additions and 564 deletions

View file

@ -727,7 +727,7 @@ init: vendor tools update-generated $(BIN)
.PHONY: tools-min
tools-min: update-vendor
@echo ">> Fetching golangci-lint linter"
@GOBIN=$(GOPATH)/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
@GOBIN=$(GOPATH)/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2
@echo ">> Fetching goimports"
@GOBIN=$(GOPATH)/bin go install golang.org/x/tools/cmd/goimports@0bb7e5c47b1a31f85d4f173edc878a8e049764a5
@echo ">> Fetching license check"

File diff suppressed because it is too large Load diff

View file

@ -74,7 +74,10 @@ Checksum keep the Pod Spec Checksum (with ignored fields).
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.38/pkg/apis/deployment/v1/arango_member_pod_template.go#L63)</sup>
Deprecated: Endpoint is not saved into the template
> [!WARNING]
> ***DEPRECATED***
>
> **Endpoint is not saved into the template**
***

View file

@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2023 ArangoDB GmbH, Cologne, Germany
// 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.
@ -36,6 +36,8 @@ type DocDefinition struct {
Docs []string
Deprecated []string
Links []string
Important *string

View file

@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2023 ArangoDB GmbH, Cologne, Germany
// 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.
@ -35,6 +35,7 @@ import (
openapi "k8s.io/kube-openapi/pkg/common"
"github.com/arangodb/kube-arangodb/pkg/util"
"github.com/arangodb/kube-arangodb/pkg/util/errors"
)
const (
@ -73,10 +74,13 @@ func parseDocDefinition(t *testing.T, root, path, typ string, field *ast.Field,
def.Important = util.NewType[string](important[0])
}
if docs, ok := extractNotTags(field); !ok {
if docs, dep, ok, err := extractNotTags(field); err != nil {
require.Fail(t, fmt.Sprintf("Error while getting tags for %s: %s", path, err.Error()))
} else if !ok {
println(def.Path, " is missing documentation!")
} else {
def.Docs = docs
def.Deprecated = dep
}
file := fs.File(field.Pos())
@ -246,22 +250,40 @@ func extract(n *ast.Field, tag string) ([]string, bool) {
return ret, len(ret) > 0
}
func extractNotTags(n *ast.Field) ([]string, bool) {
func extractNotTags(n *ast.Field) ([]string, []string, bool, error) {
if n.Doc == nil {
return nil, false
return nil, nil, false, nil
}
var ret []string
var ret, dep []string
var deprecated bool
for _, c := range n.Doc.List {
if strings.HasPrefix(c.Text, "// ") {
if strings.HasPrefix(c.Text, "// Deprecated") {
if !strings.HasPrefix(c.Text, "// Deprecated: ") {
return nil, nil, false, errors.Errorf("Invalid deprecated field")
}
}
if strings.HasPrefix(c.Text, "// Deprecated:") {
deprecated = true
dep = append(dep, strings.TrimSpace(strings.TrimPrefix(c.Text, "// Deprecated:")))
continue
}
if !strings.HasPrefix(c.Text, "// +doc/") {
ret = append(ret, strings.TrimPrefix(c.Text, "// "))
v := strings.TrimSpace(strings.TrimPrefix(c.Text, "// "))
if deprecated {
dep = append(dep, v)
} else {
ret = append(ret, v)
}
}
}
}
return ret, len(ret) > 0
return ret, dep, len(ret) > 0 || len(dep) > 0, nil
}
// isSimpleType returns the OpenAPI-compatible type name, type format and boolean indicating if this is simple type or not

View file

@ -61,8 +61,19 @@ func (d DocDefinitions) RenderMarkdown(t *testing.T, repositoryPath string) []by
write(t, out, "### %s\n\n", el.Path)
write(t, out, "Type: `%s` <sup>[\\[ref\\]](%s/%s#L%d)</sup>\n\n", el.Type, repositoryPath, el.File, el.Line)
if d := el.Deprecated; len(d) > 0 {
write(t, out, "> [!WARNING]\n")
write(t, out, "> ***DEPRECATED***\n")
write(t, out, "> \n")
for _, line := range d {
write(t, out, "> **%s**\n", line)
}
write(t, out, "\n")
}
if d := el.Important; d != nil {
write(t, out, "**Important**: %s\n\n", *d)
write(t, out, "> [!IMPORTANT]\n")
write(t, out, "> **%s**\n\n", *d)
}
if len(el.Docs) > 0 {

View file

@ -79,15 +79,23 @@ type MetricsSpec struct {
// +doc/default: false
// +doc/link: Metrics collection|../metrics.md
Enabled *bool `json:"enabled,omitempty"`
// deprecated
Image *string `json:"image,omitempty"`
// Image used for the Metrics Sidecar
//
// Deprecated: Image is now extracted from Operator Pod
Image *string `json:"image,omitempty"`
Authentication MetricsAuthenticationSpec `json:"authentication,omitempty"`
// Resources holds resource requests & limits
// +doc/type: core.ResourceRequirements
// +doc/link: Documentation of core.ResourceRequirements|https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#resourcerequirements-v1-core
Resources core.ResourceRequirements `json:"resources,omitempty"`
// deprecated
// Mode define metrics exported mode
//
// Deprecated: Not used anymore
Mode *MetricsMode `json:"mode,omitempty"`
// TLS defines if TLS should be enabled on Metrics exporter endpoint.
// This option will enable TLS only if TLS is enabled on ArangoDeployment,
// otherwise `true` value will not take any effect.

View file

@ -85,24 +85,24 @@ type MemberStatus struct {
// SecondaryPersistentVolumeClaim keeps information about PVC for SecondaryPod
SecondaryPersistentVolumeClaim *MemberPersistentVolumeClaimStatus `json:"secondaryPersistentVolumeClaim,omitempty"`
// deprecated
// Deprecated
// SideCarSpecs contains map of specifications specified for side cars
// +doc/type: map[string]core.Container
// +doc/link: Documentation of core.Container|https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#container-v1-core
SideCarSpecs map[string]core.Container `json:"sidecars-specs,omitempty"`
// deprecated
// Deprecated
// PodName holds the name of the Pod that currently runs this member
PodName string `json:"podName,omitempty"`
// deprecated
// Deprecated
// PodUID holds the UID of the Pod that currently runs this member
PodUID types.UID `json:"podUID,omitempty"`
// deprecated
// Deprecated
// PodSpecVersion holds the checksum of Pod spec that currently runs this member. Used to rotate pods
PodSpecVersion string `json:"podSpecVersion,omitempty"`
// deprecated
// Deprecated
// PersistentVolumeClaimName holds the name of the persistent volume claim used for this member (if any).
PersistentVolumeClaimName string `json:"persistentVolumeClaimName,omitempty"`
// deprecated
// Deprecated
// Endpoint definition how member should be reachable
Endpoint *string `json:"-"`
}
@ -156,7 +156,7 @@ func (s *MemberStatus) RemoveTerminationsBefore(timestamp time.Time) int {
}
}
// deprecated
// Deprecated
func (s *MemberStatus) GetEndpoint(defaultEndpoint string) string {
if s == nil || s.Endpoint == nil {
return defaultEndpoint

View file

@ -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.
@ -57,8 +57,9 @@ func (a *ArangoDeploymentRebalancerSpec) GetParallelMoves() int {
}
type ArangoDeploymentRebalancerReadersSpec struct {
// deprecated does not work in Rebalancer V2
// Count Enable Shard Count machanism
//
// Deprecated: does not work in Rebalancer V2
Count *bool `json:"count,omitempty"`
}

View file

@ -88,6 +88,8 @@ type ServerGroupSpec struct {
// SchedulerName define scheduler name used for group
SchedulerName *string `json:"schedulerName,omitempty"`
// StorageClassName specifies the classname for storage of the servers.
//
// Deprecated: Use VolumeClaimTemplate instead.
StorageClassName *string `json:"storageClassName,omitempty"`
// Resources holds resource requests & limits
// +doc/type: core.ResourceRequirements
@ -168,7 +170,9 @@ type ServerGroupSpec struct {
// +doc/enum: rotate|Pod will be shutdown and PVC will be resized (AKS)
// +doc/default: runtime
VolumeResizeMode *PVCResizeMode `json:"pvcResizeMode,omitempty"`
// Deprecated: VolumeAllowShrink allows shrink the volume
// VolumeAllowShrink allows shrinking of the volume
//
// Deprecated: Not used anymore
VolumeAllowShrink *bool `json:"volumeAllowShrink,omitempty"`
// AntiAffinity specified additional antiAffinity settings in ArangoDB Pod definitions
// +doc/type: core.PodAntiAffinity

View file

@ -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.
@ -31,7 +31,7 @@ type StorageEngine string
const (
// StorageEngineMMFiles yields a cluster using the mmfiles storage engine
// deprecated
// Deprecated
StorageEngineMMFiles StorageEngine = "MMFiles"
// StorageEngineRocksDB yields a cluster using the rocksdb storage engine
StorageEngineRocksDB StorageEngine = "RocksDB"

View file

@ -43,10 +43,10 @@ type Timeouts struct {
// +doc/example: AddMember: 30m
Actions ActionTimeouts `json:"actions,omitempty"`
// deprecated
// Deprecated
AddMember *Timeout `json:"-"`
// deprecated
// Deprecated
RuntimeContainerImageUpdate *Timeout `json:"-"`
}

View file

@ -79,15 +79,23 @@ type MetricsSpec struct {
// +doc/default: false
// +doc/link: Metrics collection|../metrics.md
Enabled *bool `json:"enabled,omitempty"`
// deprecated
Image *string `json:"image,omitempty"`
// Image used for the Metrics Sidecar
//
// Deprecated: Image is now extracted from Operator Pod
Image *string `json:"image,omitempty"`
Authentication MetricsAuthenticationSpec `json:"authentication,omitempty"`
// Resources holds resource requests & limits
// +doc/type: core.ResourceRequirements
// +doc/link: Documentation of core.ResourceRequirements|https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#resourcerequirements-v1-core
Resources core.ResourceRequirements `json:"resources,omitempty"`
// deprecated
// Mode define metrics exported mode
//
// Deprecated: Not used anymore
Mode *MetricsMode `json:"mode,omitempty"`
// TLS defines if TLS should be enabled on Metrics exporter endpoint.
// This option will enable TLS only if TLS is enabled on ArangoDeployment,
// otherwise `true` value will not take any effect.

View file

@ -85,24 +85,24 @@ type MemberStatus struct {
// SecondaryPersistentVolumeClaim keeps information about PVC for SecondaryPod
SecondaryPersistentVolumeClaim *MemberPersistentVolumeClaimStatus `json:"secondaryPersistentVolumeClaim,omitempty"`
// deprecated
// Deprecated
// SideCarSpecs contains map of specifications specified for side cars
// +doc/type: map[string]core.Container
// +doc/link: Documentation of core.Container|https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#container-v1-core
SideCarSpecs map[string]core.Container `json:"sidecars-specs,omitempty"`
// deprecated
// Deprecated
// PodName holds the name of the Pod that currently runs this member
PodName string `json:"podName,omitempty"`
// deprecated
// Deprecated
// PodUID holds the UID of the Pod that currently runs this member
PodUID types.UID `json:"podUID,omitempty"`
// deprecated
// Deprecated
// PodSpecVersion holds the checksum of Pod spec that currently runs this member. Used to rotate pods
PodSpecVersion string `json:"podSpecVersion,omitempty"`
// deprecated
// Deprecated
// PersistentVolumeClaimName holds the name of the persistent volume claim used for this member (if any).
PersistentVolumeClaimName string `json:"persistentVolumeClaimName,omitempty"`
// deprecated
// Deprecated
// Endpoint definition how member should be reachable
Endpoint *string `json:"-"`
}
@ -156,7 +156,7 @@ func (s *MemberStatus) RemoveTerminationsBefore(timestamp time.Time) int {
}
}
// deprecated
// Deprecated
func (s *MemberStatus) GetEndpoint(defaultEndpoint string) string {
if s == nil || s.Endpoint == nil {
return defaultEndpoint

View file

@ -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.
@ -57,8 +57,9 @@ func (a *ArangoDeploymentRebalancerSpec) GetParallelMoves() int {
}
type ArangoDeploymentRebalancerReadersSpec struct {
// deprecated does not work in Rebalancer V2
// Count Enable Shard Count machanism
//
// Deprecated: does not work in Rebalancer V2
Count *bool `json:"count,omitempty"`
}

View file

@ -88,6 +88,8 @@ type ServerGroupSpec struct {
// SchedulerName define scheduler name used for group
SchedulerName *string `json:"schedulerName,omitempty"`
// StorageClassName specifies the classname for storage of the servers.
//
// Deprecated: Use VolumeClaimTemplate instead.
StorageClassName *string `json:"storageClassName,omitempty"`
// Resources holds resource requests & limits
// +doc/type: core.ResourceRequirements
@ -168,7 +170,9 @@ type ServerGroupSpec struct {
// +doc/enum: rotate|Pod will be shutdown and PVC will be resized (AKS)
// +doc/default: runtime
VolumeResizeMode *PVCResizeMode `json:"pvcResizeMode,omitempty"`
// Deprecated: VolumeAllowShrink allows shrink the volume
// VolumeAllowShrink allows shrinking of the volume
//
// Deprecated: Not used anymore
VolumeAllowShrink *bool `json:"volumeAllowShrink,omitempty"`
// AntiAffinity specified additional antiAffinity settings in ArangoDB Pod definitions
// +doc/type: core.PodAntiAffinity

View file

@ -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.
@ -31,7 +31,7 @@ type StorageEngine string
const (
// StorageEngineMMFiles yields a cluster using the mmfiles storage engine
// deprecated
// Deprecated
StorageEngineMMFiles StorageEngine = "MMFiles"
// StorageEngineRocksDB yields a cluster using the rocksdb storage engine
StorageEngineRocksDB StorageEngine = "RocksDB"

View file

@ -43,10 +43,10 @@ type Timeouts struct {
// +doc/example: AddMember: 30m
Actions ActionTimeouts `json:"actions,omitempty"`
// deprecated
// Deprecated
AddMember *Timeout `json:"-"`
// deprecated
// Deprecated
RuntimeContainerImageUpdate *Timeout `json:"-"`
}

View file

@ -993,9 +993,7 @@ v1:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -1154,9 +1152,7 @@ v1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -1781,7 +1777,7 @@ v1:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -3156,9 +3152,7 @@ v1:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -3317,9 +3311,7 @@ v1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -3944,7 +3936,7 @@ v1:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -5237,9 +5229,7 @@ v1:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -5398,9 +5388,7 @@ v1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -6025,7 +6013,7 @@ v1:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -6745,9 +6733,7 @@ v1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -6932,10 +6918,10 @@ v1:
every Agent, DB-Server, Coordinator and Single server.
type: boolean
image:
description: deprecated
description: Image used for the Metrics Sidecar
type: string
mode:
description: deprecated
description: Mode define metrics exported mode
type: string
port:
format: int32
@ -7006,9 +6992,7 @@ v1:
readers:
properties:
count:
description: |-
deprecated does not work in Rebalancer V2
Count Enable Shard Count machanism
description: Count Enable Shard Count machanism
type: boolean
type: object
type: object
@ -8033,9 +8017,7 @@ v1:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -8194,9 +8176,7 @@ v1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -8821,7 +8801,7 @@ v1:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -10257,9 +10237,7 @@ v1:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -10418,9 +10396,7 @@ v1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -11045,7 +11021,7 @@ v1:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -12331,9 +12307,7 @@ v1:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -12492,9 +12466,7 @@ v1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -13119,7 +13091,7 @@ v1:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -14502,9 +14474,7 @@ v1alpha:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -14663,9 +14633,7 @@ v1alpha:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -15290,7 +15258,7 @@ v1alpha:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -16665,9 +16633,7 @@ v1alpha:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -16826,9 +16792,7 @@ v1alpha:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -17453,7 +17417,7 @@ v1alpha:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -18746,9 +18710,7 @@ v1alpha:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -18907,9 +18869,7 @@ v1alpha:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -19534,7 +19494,7 @@ v1alpha:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -20254,9 +20214,7 @@ v1alpha:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -20441,10 +20399,10 @@ v1alpha:
every Agent, DB-Server, Coordinator and Single server.
type: boolean
image:
description: deprecated
description: Image used for the Metrics Sidecar
type: string
mode:
description: deprecated
description: Mode define metrics exported mode
type: string
port:
format: int32
@ -20515,9 +20473,7 @@ v1alpha:
readers:
properties:
count:
description: |-
deprecated does not work in Rebalancer V2
Count Enable Shard Count machanism
description: Count Enable Shard Count machanism
type: boolean
type: object
type: object
@ -21542,9 +21498,7 @@ v1alpha:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -21703,9 +21657,7 @@ v1alpha:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -22330,7 +22282,7 @@ v1alpha:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -23766,9 +23718,7 @@ v1alpha:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -23927,9 +23877,7 @@ v1alpha:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -24554,7 +24502,7 @@ v1alpha:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -25840,9 +25788,7 @@ v1alpha:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -26001,9 +25947,7 @@ v1alpha:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -26628,7 +26572,7 @@ v1alpha:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -28011,9 +27955,7 @@ v2alpha1:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -28172,9 +28114,7 @@ v2alpha1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -28799,7 +28739,7 @@ v2alpha1:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -30174,9 +30114,7 @@ v2alpha1:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -30335,9 +30273,7 @@ v2alpha1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -30962,7 +30898,7 @@ v2alpha1:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -32255,9 +32191,7 @@ v2alpha1:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -32416,9 +32350,7 @@ v2alpha1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -33043,7 +32975,7 @@ v2alpha1:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -33763,9 +33695,7 @@ v2alpha1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -33950,10 +33880,10 @@ v2alpha1:
every Agent, DB-Server, Coordinator and Single server.
type: boolean
image:
description: deprecated
description: Image used for the Metrics Sidecar
type: string
mode:
description: deprecated
description: Mode define metrics exported mode
type: string
port:
format: int32
@ -34024,9 +33954,7 @@ v2alpha1:
readers:
properties:
count:
description: |-
deprecated does not work in Rebalancer V2
Count Enable Shard Count machanism
description: Count Enable Shard Count machanism
type: boolean
type: object
type: object
@ -35051,9 +34979,7 @@ v2alpha1:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -35212,9 +35138,7 @@ v2alpha1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -35839,7 +35763,7 @@ v2alpha1:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -37275,9 +37199,7 @@ v2alpha1:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -37436,9 +37358,7 @@ v2alpha1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -38063,7 +37983,7 @@ v2alpha1:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-
@ -39349,9 +39269,7 @@ v2alpha1:
description: Probes specifies additional behaviour for probes
properties:
ReadinessProbeDisabled:
description: |-
OldReadinessProbeDisabled if true readinessProbes are disabled
Deprecated: This field is deprecated, kept only for backward compatibility.
description: OldReadinessProbeDisabled if true readinessProbes are disabled
type: boolean
livenessProbeDisabled:
description: LivenessProbeDisabled if set to true, the operator does not generate a liveness probe for new pods belonging to this group
@ -39510,9 +39428,7 @@ v2alpha1:
description: AllowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process.
type: boolean
dropAllCapabilities:
description: |-
DropAllCapabilities specifies if capabilities should be dropped for this pod containers
Deprecated: This field is added for backward compatibility. Will be removed in 1.1.0.
description: DropAllCapabilities specifies if capabilities should be dropped for this pod containers
type: boolean
fsGroup:
description: FSGroup is a special supplemental group that applies to all containers in a pod.
@ -40137,7 +40053,7 @@ v2alpha1:
type: object
type: array
volumeAllowShrink:
description: 'Deprecated: VolumeAllowShrink allows shrink the volume'
description: VolumeAllowShrink allows shrinking of the volume
type: boolean
volumeClaimTemplate:
description: |-

View file

@ -244,7 +244,6 @@ v1:
description: Checksum keep the Pod Spec Checksum (with ignored fields).
type: string
endpoint:
description: 'Deprecated: Endpoint is not saved into the template'
type: string
podSpec:
description: PodSpec specifies the Pod Spec used for this Member.
@ -3296,7 +3295,6 @@ v1alpha:
description: Checksum keep the Pod Spec Checksum (with ignored fields).
type: string
endpoint:
description: 'Deprecated: Endpoint is not saved into the template'
type: string
podSpec:
description: PodSpec specifies the Pod Spec used for this Member.
@ -6348,7 +6346,6 @@ v2alpha1:
description: Checksum keep the Pod Spec Checksum (with ignored fields).
type: string
endpoint:
description: 'Deprecated: Endpoint is not saved into the template'
type: string
podSpec:
description: PodSpec specifies the Pod Spec used for this Member.

View file

@ -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.
@ -103,6 +103,7 @@ func TestEnsurePod_Metrics(t *testing.T) {
Metrics: func() api.MetricsSpec {
m := metricsSpec.DeepCopy()
//nolint:staticcheck
m.Mode = api.MetricsModeExporter.New()
return *m
@ -163,6 +164,7 @@ func TestEnsurePod_Metrics(t *testing.T) {
Metrics: func() api.MetricsSpec {
m := metricsSpec.DeepCopy()
//nolint:staticcheck
m.Mode = api.MetricsModeInternal.New()
return *m
@ -231,6 +233,7 @@ func TestEnsurePod_Metrics(t *testing.T) {
Metrics: func() api.MetricsSpec {
m := metricsSpec.DeepCopy()
//nolint:staticcheck
m.Mode = api.MetricsModeInternal.New()
return *m

View file

@ -110,6 +110,7 @@ func (a *ArangoDContainer) GetPorts() []core.ContainerPort {
}
if a.spec.Metrics.IsEnabled() {
//nolint:staticcheck
switch a.spec.Metrics.Mode.Get() {
case api.MetricsModeInternal:
ports = append(ports, core.ContainerPort{
@ -410,6 +411,7 @@ func (m *MemberArangoDPod) GetServiceAccountName() string {
}
func (m *MemberArangoDPod) GetSidecars(pod *core.Pod) error {
//nolint:staticcheck
if m.spec.Metrics.IsEnabled() && m.spec.Metrics.Mode.Get() != api.MetricsModeInternal {
var c *core.Container

View file

@ -85,6 +85,7 @@ func (r *Resources) serviceMonitorSpec() (coreosv1.ServiceMonitorSpec, error) {
deploymentName := apiObject.GetName()
spec := r.context.GetSpec()
//nolint:staticcheck
switch spec.Metrics.Mode.Get() {
case deploymentApi.MetricsModeInternal:
if spec.Metrics.Authentication.JWTTokenSecretName == nil {