Skip to content

Commit 047a76c

Browse files
authored
feat: allow configuring replica count for jaeger operator (#552)
Enable leader election if the given number is greater than 1 Signed-off-by: Alex Szakaly <alex.szakaly@gmail.com>
1 parent d4e163e commit 047a76c

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

charts/jaeger-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
description: jaeger-operator Helm chart for Kubernetes
33
name: jaeger-operator
4-
version: 2.50.1
4+
version: 2.51.0
55
appVersion: 1.52.0
66
home: https://www.jaegertracing.io/
77
icon: https://www.jaegertracing.io/img/jaeger-icon-reverse-color.svg

charts/jaeger-operator/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ The following table lists the configurable parameters of the jaeger-operator cha
6969
| `rbac.clusterRole` | ClusterRole will be used by operator ServiceAccount | `false` |
7070
| `serviceAccount.name` | Service account name to use. If not set and create is true, a name is generated using the fullname template | `nil` |
7171
| `extraEnv` | Additional environment variables passed to the operator. For example: name: LOG-LEVEL value: debug | `[]` |
72+
| `replicaCount` | Desired number of operator pods | `1` |
7273
| `resources` | K8s pod resources | `None` |
7374
| `nodeSelector` | Node labels for pod assignment | `{}` |
7475
| `tolerations` | Toleration labels for pod assignment | `[]` |

charts/jaeger-operator/templates/deployment.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
{{ . | toYaml | indent 4 }}
1010
{{- end }}
1111
spec:
12-
replicas: 1
12+
replicas: {{ .Values.replicaCount }}
1313
selector:
1414
matchLabels:
1515
{{ include "jaeger-operator.labels" . | indent 6 }}
@@ -59,6 +59,10 @@ spec:
5959
- start
6060
- {{ printf "--metrics-port=%v" .Values.metricsPort }}
6161
- {{ printf "--webhook-bind-port=%v" .Values.webhooks.port }}
62+
{{- $replicaCount := int .Values.replicaCount }}
63+
{{- if gt $replicaCount 1 }}
64+
- --leader-elect
65+
{{- end }}
6266
env:
6367
- name: WATCH_NAMESPACE
6468
{{- if .Values.rbac.clusterRole }}

charts/jaeger-operator/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ extraLabels: {}
7575
# Specifies extra labels for the operator deployment:
7676
# foo: bar
7777

78+
# Specifies desired number of operator pods
79+
replicaCount: 1
80+
7881
resources: {}
7982
# limits:
8083
# cpu: 100m

0 commit comments

Comments
 (0)