Skip to content

Commit 7776ae3

Browse files
authored
Merge branch 'master' into bugfix/fix_secret_discovery
2 parents 8d9a39f + b791e3a commit 7776ae3

File tree

17 files changed

+36
-4
lines changed

17 files changed

+36
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- (Feature) Previous Pod Logs in DebugPackage
1616
- (Feature) (Platform) Login & Logout Endpoints
1717
- (Feature) (Platform) OpenID Integration
18+
- (Maintenance) Operator Labeling Skip
1819
- (Bugfix) Align JWT Discovery
1920

2021
## [1.2.48](https://github.com/arangodb/kube-arangodb/tree/1.2.48) (2025-05-08)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ Flags:
200200
--kubernetes.burst int Burst for the k8s API (default 64)
201201
--kubernetes.max-batch-size int Size of batch during objects read (default 256)
202202
--kubernetes.qps float32 Number of queries per second for k8s API (default 32)
203+
--leader.label.skip Skips Leader Label for the Pod
203204
--log.format string Set log format. Allowed values: 'pretty', 'JSON'. If empty, default format is used (default "pretty")
204205
--log.level stringArray Set log levels in format <level> or <logger>=<level>. Possible loggers: action, agency, api-server, assertion, backup-operator, chaos-monkey, crd, deployment, deployment-ci, deployment-reconcile, deployment-replication, deployment-resilience, deployment-resources, deployment-storage, deployment-storage-pc, deployment-storage-service, generic-parent-operator, helm, http, inspector, integration-authn-v1, integration-config-v1, integration-envoy-auth-v3, integration-envoy-auth-v3-impl-auth-bearer, integration-envoy-auth-v3-impl-auth-cookie, integration-envoy-auth-v3-impl-custom-openid, integration-envoy-auth-v3-impl-pass-mode, integration-scheduler-v2, integration-storage-v1-s3, integration-storage-v2, integrations, k8s-client, kubernetes, kubernetes-access, kubernetes-client, kubernetes-informer, monitor, networking-route-operator, operator, operator-arangojob-handler, operator-v2, operator-v2-event, operator-v2-worker, panics, platform-chart-operator, platform-pod-shutdown, platform-storage-operator, pod_compare, root, root-event-recorder, scheduler-batchjob-operator, scheduler-cronjob-operator, scheduler-deployment-operator, scheduler-pod-operator, scheduler-profile-operator, server, server-authentication, webhook (default [info])
205206
--log.sampling If true, operator will try to minimize duplication of logging events (default true)

chart/kube-arangodb-arm64/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ spec:
111111
{{- if or .Values.operator.debug (eq ( int .Values.operator.replicaCount) 1) }}
112112
- --mode.single
113113
{{- end }}
114+
{{- if .Values.operator.skipLeaderLabels }}
115+
- --leader.label.skip
116+
{{- end }}
114117
{{ if .Values.operator.features.apps }}
115118
- --operator.apps
116119
{{- end }}

chart/kube-arangodb-arm64/templates/service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@ spec:
3232
app.kubernetes.io/managed-by: {{ .Release.Service }}
3333
app.kubernetes.io/instance: {{ .Release.Name }}
3434
release: {{ .Release.Name }}
35+
{{- if .Values.operator.skipLeaderLabels }}
3536
role: leader
37+
{{- end }}
3638
type: {{ .Values.operator.service.type }}

chart/kube-arangodb-enterprise-arm64/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ spec:
111111
{{- if or .Values.operator.debug (eq ( int .Values.operator.replicaCount) 1) }}
112112
- --mode.single
113113
{{- end }}
114+
{{- if .Values.operator.skipLeaderLabels }}
115+
- --leader.label.skip
116+
{{- end }}
114117
{{ if .Values.operator.features.apps }}
115118
- --operator.apps
116119
{{- end }}

chart/kube-arangodb-enterprise-arm64/templates/service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@ spec:
3232
app.kubernetes.io/managed-by: {{ .Release.Service }}
3333
app.kubernetes.io/instance: {{ .Release.Name }}
3434
release: {{ .Release.Name }}
35+
{{- if .Values.operator.skipLeaderLabels }}
3536
role: leader
37+
{{- end }}
3638
type: {{ .Values.operator.service.type }}

chart/kube-arangodb-enterprise/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ spec:
111111
{{- if or .Values.operator.debug (eq ( int .Values.operator.replicaCount) 1) }}
112112
- --mode.single
113113
{{- end }}
114+
{{- if .Values.operator.skipLeaderLabels }}
115+
- --leader.label.skip
116+
{{- end }}
114117
{{ if .Values.operator.features.apps }}
115118
- --operator.apps
116119
{{- end }}

chart/kube-arangodb-enterprise/templates/service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@ spec:
3232
app.kubernetes.io/managed-by: {{ .Release.Service }}
3333
app.kubernetes.io/instance: {{ .Release.Name }}
3434
release: {{ .Release.Name }}
35+
{{- if .Values.operator.skipLeaderLabels }}
3536
role: leader
37+
{{- end }}
3638
type: {{ .Values.operator.service.type }}

chart/kube-arangodb/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ spec:
111111
{{- if or .Values.operator.debug (eq ( int .Values.operator.replicaCount) 1) }}
112112
- --mode.single
113113
{{- end }}
114+
{{- if .Values.operator.skipLeaderLabels }}
115+
- --leader.label.skip
116+
{{- end }}
114117
{{ if .Values.operator.features.apps }}
115118
- --operator.apps
116119
{{- end }}

chart/kube-arangodb/templates/service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@ spec:
3232
app.kubernetes.io/managed-by: {{ .Release.Service }}
3333
app.kubernetes.io/instance: {{ .Release.Name }}
3434
release: {{ .Release.Name }}
35+
{{- if .Values.operator.skipLeaderLabels }}
3536
role: leader
37+
{{- end }}
3638
type: {{ .Values.operator.service.type }}

chart/kube-arangodb/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ operator:
33
imagePullPolicy: IfNotPresent
44
imagePullSecrets: []
55
scope: legacy
6+
skipLeaderLabels: false
67
architectures:
78
- amd64
89
debug: false

cmd/cmd.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ var (
128128

129129
reconciliationDelay time.Duration
130130

131-
singleMode bool
131+
singleMode, skipLeaderLabel bool
132132
}
133133
shutdownOptions struct {
134134
delay time.Duration
@@ -225,6 +225,7 @@ func init() {
225225
f.StringVar(&deprecatedStr, "operator.arango-image", "arangodb/arangodb:latest", "Docker image used for arango by default")
226226
f.MarkDeprecated("operator.arango-image", "Value is not used anymore")
227227
f.BoolVar(&chaosOptions.allowed, "chaos.allowed", false, "Set to allow chaos in deployments. Only activated when allowed and enabled in deployment")
228+
f.BoolVar(&operatorOptions.skipLeaderLabel, "leader.label.skip", false, "Skips Leader Label for the Pod")
228229
f.BoolVar(&operatorOptions.singleMode, "mode.single", false, "Enable single mode in Operator. WARNING: There should be only one replica of Operator, otherwise Operator can take unexpected actions")
229230
f.String("scope", "", "Define scope on which Operator works. Legacy - pre 1.1.0 scope with limited cluster access")
230231
f.MarkDeprecated("scope", "Value is not used anymore")
@@ -588,6 +589,7 @@ func newOperatorConfigAndDeps(id, namespace, name string) (operator.Config, oper
588589
PodName: name,
589590
ServiceAccount: serviceAccount,
590591
OperatorImage: image,
592+
SkipLeaderLabel: operatorOptions.skipLeaderLabel,
591593
EnableDeployment: operatorOptions.enableDeployment,
592594
EnableDeploymentReplication: operatorOptions.enableDeploymentReplication,
593595
EnableStorage: operatorOptions.enableStorage,

docs/cli/arangodb_operator.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Flags:
8484
--kubernetes.burst int Burst for the k8s API (default 64)
8585
--kubernetes.max-batch-size int Size of batch during objects read (default 256)
8686
--kubernetes.qps float32 Number of queries per second for k8s API (default 32)
87+
--leader.label.skip Skips Leader Label for the Pod
8788
--log.format string Set log format. Allowed values: 'pretty', 'JSON'. If empty, default format is used (default "pretty")
8889
--log.level stringArray Set log levels in format <level> or <logger>=<level>. Possible loggers: action, agency, api-server, assertion, backup-operator, chaos-monkey, crd, deployment, deployment-ci, deployment-reconcile, deployment-replication, deployment-resilience, deployment-resources, deployment-storage, deployment-storage-pc, deployment-storage-service, generic-parent-operator, helm, http, inspector, integration-authn-v1, integration-config-v1, integration-envoy-auth-v3, integration-envoy-auth-v3-impl-auth-bearer, integration-envoy-auth-v3-impl-auth-cookie, integration-envoy-auth-v3-impl-custom-openid, integration-envoy-auth-v3-impl-pass-mode, integration-scheduler-v2, integration-storage-v1-s3, integration-storage-v2, integrations, k8s-client, kubernetes, kubernetes-access, kubernetes-client, kubernetes-informer, monitor, networking-route-operator, operator, operator-arangojob-handler, operator-v2, operator-v2-event, operator-v2-worker, panics, platform-chart-operator, platform-pod-shutdown, platform-storage-operator, pod_compare, root, root-event-recorder, scheduler-batchjob-operator, scheduler-cronjob-operator, scheduler-deployment-operator, scheduler-pod-operator, scheduler-profile-operator, server, server-authentication, webhook (default [info])
8990
--log.sampling If true, operator will try to minimize duplication of logging events (default true)

docs/how-to/debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ helm upgrade --install kube-arangodb \
3232

3333
Then run:
3434
```shell
35-
kubectl exec {POD_kube-arangodb-operator} -- /usr/bin/arangodb_operator debug-package --namespace {namespace} -o - > db.tar.gz
35+
kubectl exec {POD_kube-arangodb-operator} --namespace {namespace} -- /usr/bin/arangodb_operator debug-package --namespace {namespace} -o - > db.tar.gz
3636
```

integrations/envoy/auth/v3/impl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (i *impl) Check(ctx context.Context, request *pbEnvoyAuthV3.CheckRequest) (
9898
q = q.Err(err)
9999
q.Dur("duration", time.Since(start)).Warn("Request Completed with error")
100100
} else {
101-
q.Dur("duration", time.Since(start)).Info("Request Completed")
101+
q.Dur("duration", time.Since(start)).Debug("Request Completed")
102102
}
103103
}()
104104

pkg/operator/operator.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ type Config struct {
111111
PodName string
112112
ServiceAccount string
113113
OperatorImage string
114+
SkipLeaderLabel bool
114115
EnableDeployment bool
115116
EnableDeploymentReplication bool
116117
EnableStorage bool

pkg/operator/operator_leader.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// DISCLAIMER
33
//
4-
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
4+
// Copyright 2016-2025 ArangoDB GmbH, Cologne, Germany
55
//
66
// Licensed under the Apache License, Version 2.0 (the "License");
77
// you may not use this file except in compliance with the License.
@@ -154,6 +154,11 @@ func (o *Operator) getLeaderElectionEventTarget(log logging.Logger) runtime.Obje
154154

155155
// setRoleLabel sets a label with key `role` and given value in the pod metadata.
156156
func (o *Operator) setRoleLabel(log logging.Logger, label, role string) error {
157+
if o.Config.SkipLeaderLabel {
158+
log.Str("label", label).Str("role", role).Info("Skipping Leader Node Labeling")
159+
return nil
160+
}
161+
157162
ns := o.Config.Namespace
158163
kubecli := o.Dependencies.Client.Kubernetes()
159164
pods := kubecli.CoreV1().Pods(ns)

0 commit comments

Comments
 (0)